Skip to main content
PUT
/
webhooks
/
{webhook_id}
Update webhook
curl --request PUT \
  --url https://app.timelines.ai/integrations/api/webhooks/{webhook_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_type": "message:sent:new",
  "enabled": true,
  "url": "http://www.example.com/api/hook"
}
'
{
  "status": "ok",
  "data": {
    "id": 789456,
    "event_type": "message:sent:new",
    "enabled": true,
    "url": "http://www.example.com/api/hook",
    "errors_counter": 0
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

webhook_id
string
required

an ID of webhook

Body

application/json

A JSON describing webhook.

Partial representation used to update an existing webhook. Any omitted field keeps its current value.

event_type
string

New event topic that will trigger the webhook.

Example:

"message:sent:new"

enabled
boolean

Set to true to resume deliveries or false to pause them.

Example:

true

url
string

New destination HTTPS endpoint.

Example:

"http://www.example.com/api/hook"

Response

Success

Standard envelope returning a single webhook in the data field.

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required

Server generated representation of a webhook subscription including its unique identifier and delivery error statistics.