Skip to main content

Uniphore Help Center Portal

WebhookService Endpoints
Create Webhook

Creates a new webhook based on the provided request. Below are examples to use this API and more details please refer to the API definition.

Curl

Bash

Copy

curl -X POST "https://api.orby.ai/v1/webhooks" \

-H "Content-Type: application/json" \

-H "ORBY-API-KEY: <YOUR_API_KEY>" \

-H "ORBY-ORG-ID: <YOUR_ORG_ID>" \

--data '{

"displayName": "My Webhook",

"description": "A description of the webhook", "eventTypes": ["execution.completed", "execution.failed"], "status": "enabled",

"endpointUrl": "https://example.com/webhook", "workflowIds": ["<YOUR_WORKFLOW_ID>"]

}'

Python

Python

Copy

import requests import json

orby_api_key = '<YOUR_API_KEY>' orby_org_id = '<YOUR_ORG_ID>'

url = "https://api.orby.ai/v1/webhooks" payload = {

"displayName": "My Webhook",

"description": "Webhook for workflow events", "eventTypes": ["execution.completed", "execution.failed"], "status": "enabled",

"endpointUrl": "https://your.webhook.endpoint/receive", "workflowIds": ["671ca15c38e799cecd4"]

}

headers = {

"ORBY-API-KEY": orby_api_key, "ORBY-ORG-ID": orby_org_id, "Content-Type": "application/json"

}

response = requests.post(url, headers=headers, json=payload) print(response.status_code)

print(json.dumps(response.json(), indent=2, ensure_ascii=False))

Go

Go

Copy

package main

import (

"bytes" "fmt" "io/ioutil" "net/http"

)

func main() {

orbyAPIKey := "<YOUR_API_KEY>"

orbyOrgID := "<YOUR_ORG_ID>"

url := "https://api.orby.ai/v1/webhooks" payload := []byte(`{

"displayName": "My Webhook",

"description": "Webhook for workflow events", "eventTypes": ["EXECUTION_COMPLETED"],

"status": "ENABLED",

"endpointUrl": "https://your.webhook.endpoint/receive", "workflowIds": ["your_workflow_id"]

}`)

req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil {

fmt .Println("Error creating request:", err) return

}

req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.Header.Set("ORBY-API-KEY", orbyAPIKey) req.Header.Set("ORBY-ORG-ID", orbyOrgID)

client := &http.Client{} resp, err := client.Do(req)

if err != nil {

fmt .Println("Request failed:", err) return

}

defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body) if err != nil {

fmt .Println("Error reading response:", err) return

}

fmt.Println("Status Code:", resp.StatusCode) fmt.Println("Response Body:") fmt.Println(string(body))

}

Response example

JSON

Copy

{

"id": "wbhk_1234567890abcdef", "displayName": "My Webhook",

"description": "Webhook for workflow events", "eventTypes": [

"execution.completed", "execution.failed"

],

"status": "enabled",

"endpointUrl": "https://your.webhook.endpoint/receive", "orgId": "641aae5b328566b887c424ff",

"workflowIds": [ "671ca15c38e799cecd4"

],

"secret": "whsec_AbC1234SecretKeyUsedToSignPayloads", "disabledReason": "",

"createdAt": "2025-04-18T15:00:00Z",

"createdBy": "user_abc123", "updatedAt": "2025-04-18T15:00:00Z",

"updatedBy": "user_abc123"

}

Get Webhook Details

Retrieves the details of a specific webhook by its id. Below are examples to use this API and more details please refer to the API definition.

Curl

Bash

Copy

curl -X GET "https://api.orby.ai/v1/webhooks/<YOUR_WEBHOOK_ID>" \

-H "ORBY-API-KEY: <YOUR_API_KEY>" \

-H "ORBY-ORG-ID: <YOUR_ORG_ID>"

Python

Python

Copy

import requests import json

orby_api_key = '<YOUR_API_KEY>' orby_org_id = '<YOUR_ORG_ID>' webhook_id = '<YOUR_WEBHOOK_ID>'

url = f'https://api.orby.ai/v1/webhooks/{webhook_id}' headers = {

"ORBY-API-KEY": orby_api_key, "ORBY-ORG-ID": orby_org_id

}

response = requests.get(url, headers=headers) print(response.status_code)

print(json.dumps(response.json(), indent=2, ensure_ascii=False))

Go

Go

Copy

package main

import (

"fmt" "io/ioutil" "net/http"

)

func main() {

orbyAPIKey := "<YOUR_API_KEY>"

orbyOrgID := "<YOUR_ORG_ID>" webhookID := "<YOUR_WEBHOOK_ID>"

url := fmt.Sprintf("https://api.orby.ai/v1/webhooks/%s", webhookID) req, err := http.NewRequest("GET", url, nil)

if err != nil { panic(err)

}

req.Header.Set("ORBY-API-KEY", orbyAPIKey) req.Header.Set("ORBY-ORG-ID", orbyOrgID)

client := &http.Client{} resp, err := client.Do(req)

if err != nil { panic(err)

}

defer resp.Body.Close()

body, _ := ioutil.ReadAll(resp.Body) fmt.Println("Status Code:", resp.StatusCode) fmt.Println(string(body))

}

Response example

JSON

Copy

{

"id": "1234567890abcdef",

"displayName": "Webhook for Execution Events", "description": "Triggered on execution updates", "eventTypes": [

"execution.completed", "execution.failed"

],

"status": "enabled",

"endpointUrl": "https://your-endpoint.com/webhook", "orgId": "<YOUR_ORG_ID>",

"workflowIds": [ "workflow-123", "workflow-456"

],

"secret": "abc123secret", "disabledReason": "",

"createdAt": "2024-12-01T10:30:00Z",

"createdBy": "user-001", "updatedAt": "2024-12-05T12:00:00Z",

"updatedBy": "user-002"

}

List Webhook

Lists all webhooks based on the provided request parameters. Below are examples to use this API and more details please refer to the API definition.

Curl

Bash

Copy

curl -X GET "https://api.orby.ai/v1/webhooks?pageSize=20&pageToken=

<YOUR_PAGE_TOKEN>" \

-H "ORBY-API-KEY: <YOUR_API_KEY>" \

-H "ORBY-ORG-ID: <YOUR_ORG_ID>"

Python

Python

Copy

import requests import json

orby_api_key = '<YOUR_API_KEY>' orby_org_id = '<YOUR_ORG_ID>' page_size = 10

page_token = '<YOUR_PAGE_TOKEN>' # Leave empty if not paginating

params = {

"pageSize": page_size, "pageToken": page_token

}

headers = {

"ORBY-API-KEY": orby_api_key, "ORBY-ORG-ID": orby_org_id

}

response = requests.get("https://api.orby.ai/v1/webhooks", params=params, headers=headers)

print(response.status_code)

print(json.dumps(response.json(), indent=2, ensure_ascii=False))

Go

Go

Copy

package main

import (

"fmt" "io/ioutil" "net/http"

)

func main() {

orbyAPIKey := "<YOUR_API_KEY>"

orbyOrgID := "<YOUR_ORG_ID>" pageSize := 10

pageToken := "<YOUR_PAGE_TOKEN>"

url := fmt.Sprintf("https://api.orby.ai/v1/webhooks? pageSize=%d&pageToken=%s", pageSize, pageToken)

req, err := http.NewRequest("GET", url, nil) if err != nil {

panic(err)

}

req.Header.Set("ORBY-API-KEY", orbyAPIKey) req.Header.Set("ORBY-ORG-ID", orbyOrgID)

client := &http.Client{} resp, err := client.Do(req)

if err != nil { panic(err)

}

defer resp.Body.Close()

body, _ := ioutil.ReadAll(resp.Body) fmt.Println("Status Code:", resp.StatusCode) fmt.Println(string(body))

}

Response example

JSON

Copy

{

"webhooks": [

{

"id": "webhook-001", "displayName": "Webhook A",

"description": "Listens for execution completions", "eventTypes": ["execution.completed"],

"status": "enabled",

"endpointUrl": "https://webhook.site/abc123", "orgId": "<YOUR_ORG_ID>",

"workflowIds": ["workflow-001", "workflow-002"], "secret": "secret-key-xyz",

"disabledReason": "",

"createdAt": "2024-12-01T10:30:00Z",

"createdBy": "user-001", "updatedAt": "2024-12-10T15:45:00Z",

"updatedBy": "user-002"

},

{

"id": "webhook-002", "displayName": "Webhook B",

"description": "For execution failures", "eventTypes": ["execution.failed"], "status": "disabled",

"endpointUrl": "https://example.com/webhook-b", "orgId": "<YOUR_ORG_ID>",

"workflowIds": ["workflow-003"], "secret": "secret-key-abc",

"disabledReason": "Temporarily disabled for maintenance", "createdAt": "2024-11-25T08:00:00Z",

"createdBy": "user-003", "updatedAt": "2024-12-02T09:20:00Z",

"updatedBy": "user-003"

}

],

"nextPageToken": "eyJhbGciOiJIUzI1..."

}

Delete Webhook

Delete a specific webhook by its id. Successful deletion would return 200. Below are examples to use this API and more details please refer to the API definition.

Curl

Bash

Copy

curl -X DELETE "https://api.orby.ai/v1/webhooks/<YOUR_WEBHOOK_ID>" \

-H "ORBY-API-KEY: <YOUR_API_KEY>" \

-H "ORBY-ORG-ID: <YOUR_ORG_ID>"

Python

Python

Copy

import requests

orby_api_key = '<YOUR_API_KEY>' orby_org_id = '<YOUR_ORG_ID>' webhook_id = '<YOUR_webhook_ID>'

url = f'https://api.orby.ai/v1/webhooks/{webhook_id}' headers = {

"ORBY-API-KEY": orby_api_key, "ORBY-ORG-ID": orby_org_id

}

response = requests.delete(url, headers=headers) print(response.status_code)

Go

Go

Copy

package main

import (

"fmt" "net/http"

)

func main() {

orbyAPIKey := "<YOUR_API_KEY>"

orbyOrgID := "<YOUR_ORG_ID>" webhookID := "<YOUR_webhook_ID>"

url := fmt.Sprintf("https://api.orby.ai/v1/webhooks/%s", webhookID) req, err := http.NewRequest("DELETE", url, nil)

if err != nil { panic(err)

}

req.Header.Set("ORBY-API-KEY", orbyAPIKey) req.Header.Set("ORBY-ORG-ID", orbyOrgID)

client := &http.Client{} resp, err := client.Do(req)

if err != nil { panic(err)

}

defer resp.Body.Close()

fmt.Println("Status Code:", resp.StatusCode)

}

Update Webhook

Update the details of a specific webhook by its id. The fields can update include 'displayName', 'description', 'eventTypes', 'status', 'endpointUrl', 'workflowIds'. Below are examples to use this API and more details please refer to the API definition.

Curl

Bash

Copy

curl -X PATCH "https://api.orby.ai/v1/webhooks/<YOUR_WEBHOOK_ID>? fieldMask=displayName,description,status" \

-H "Content-Type: application/json" \

-H "ORBY-API-KEY: <YOUR_API_KEY>" \

-H "ORBY-ORG-ID: <YOUR_ORG_ID>" \

--data '{

"displayName": "Updated Webhook",

"description": "Updated description of the webhook"

}'

Python

Python

Copy

import requests import json

orby_api_key = '<YOUR_API_KEY>' orby_org_id = '<YOUR_ORG_ID>' webhook_id = '<YOUR_WEBHOOK_ID>'

url = f'https://api.orby.ai/v1/webhooks/{webhook_id}' payload = {

"displayName": "New Webhook Name", "description": "Updated webhook description.",

"eventTypes": ["execution.completed", "execution.failed"], "status": "enabled",

"endpointUrl": "https://example.com/webhook", "workflowIds": ["workflow_id1", "workflow_id2"]

}

headers = {

"Content-Type": "application/json", "ORBY-API-KEY": orby_api_key,

"ORBY-ORG-ID": orby_org_id

}

response = requests.patch(url, headers=headers, json=payload) print(response.status_code)

print(json.dumps(response.json(), indent=2, ensure_ascii=False))

Go

Go

Copy

package main

import (

"bytes" "encoding/json" "fmt"

"log"

"net/http"

)

func main() {

orbyAPIKey := "<YOUR_API_KEY>"

orbyOrgID := "<YOUR_ORG_ID>" webhookID := "<YOUR_WEBHOOK_ID>"

url := fmt.Sprintf("https://api.orby.ai/v1/webhooks/%s", webhookID) payload := map[string]interface{}{

"displayName": "New Webhook Name", "description": "Updated webhook description.", "eventTypes": []string{"execution.completed",

"execution.failed"},

"status": "enabled",

"endpointUrl": "https://example.com/webhook", "workflowIds": []string{"workflow_id1", "workflow_id2"},

}

data, err := json.Marshal(payload) if err != nil {

log .Fatal(err)

}

req, err := http.NewRequest("PATCH", url, bytes.NewBuffer(data)) if err != nil {

log .Fatal(err)

}

req.Header.Set("Content-Type", "application/json") req.Header.Set("ORBY-API-KEY", orbyAPIKey) req.Header.Set("ORBY-ORG-ID", orbyOrgID)

client := &http.Client{} resp, err := client.Do(req)

if err != nil { log .Fatal(err)

}

defer resp.Body.Close()

fmt.Println("Response Status:", resp.Status) var result map[string]interface{}

json.NewDecoder(resp.Body).Decode(&result) fmt.Println("Response Body:", result)

}

Response example

JSON

Copy

{

"id": "webhook_id_12345", "displayName": "New Webhook Name",

"description": "Updated webhook description.", "eventTypes": ["execution.completed", "execution.failed"], "status": "enabled",

"endpointUrl": "https://example.com/webhook", "orgId": "<YOUR_ORG_ID>",

"workflowIds": ["workflow_id1", "workflow_id2"], "secret": "random_secret_key",

"disabledReason": null,

"createdAt": "2025-04-22T12:34:56Z",

"createdBy": "user_id_12345", "updatedAt": "2025-04-22T12:45:56Z",

"updatedBy": "user_id_67890"