POST
/
api
/
v2
/
public
/
webhook
curl --request POST \
  --url https://api.gocobalt.io/api/v2/public/webhook \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "webhook_url": "<string>",
  "webhook_events": [
    "<string>"
  ],
  "is_enabled": true,
  "webhook_type": "<string>"
}'
    {
        "is_enabled": false,
        "webhook_events": [
            "Connection Created",
            "Connection Deleted",
            "Workflow Completed",
            "Workflow Errored",
            "Connection Expired"
        ],
        "webhook_url": "https://webhookurl.com",
        "_id": "66e31564c0287b4136f77ef8",
        "createdAt": "2024-09-12T16:23:00.587Z",
        "webhook_type": "slack"
    }

This API registers a Cobalt webhook.

Request description

Body Parameters

webhook_url
string
required

Provide a url where you wish to listen to the event.

webhook_events
string[]
required

Array of strings of webhooks events to subscribe.. Accepted values are, Connection Created, Connection Deleted, Workflow Completed, Workflow Errored, Connection Expired.

is_enabled
boolean

Determines whether the webhook is active or not.

webhook_type
string

The type of webhook. Accepted values are default and slack.

Response description

is_enabled
boolean

Whether the webhook is active or not.

webhook_events
array

Webhook events subscribed.

created_At
string

Timestamp of webhook creation.

webhook_url
string

Webhook URL to listen to the events.

_id
string

Unique ID of the webhook.

webhook_type
string

The type of webhook. Accepted values are default and slack.

    {
        "is_enabled": false,
        "webhook_events": [
            "Connection Created",
            "Connection Deleted",
            "Workflow Completed",
            "Workflow Errored",
            "Connection Expired"
        ],
        "webhook_url": "https://webhookurl.com",
        "_id": "66e31564c0287b4136f77ef8",
        "createdAt": "2024-09-12T16:23:00.587Z",
        "webhook_type": "slack"
    }