Skip to main content
POST
/
webhooks
Create webhook
curl --request POST \
  --url https://app.timelines.ai/integrations/api/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "event_type": "message:sent:new",
  "url": "http://www.example.com/api/hook",
  "enabled": true
}
'
{
  "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.

Body

application/json

A JSON describing webhook.

A client‑defined subscription that instructs TimelinesAI to send an HTTP POST request to the specified url whenever the chosen event_type occurs in the workspace. The POST body is delivered as JSON and contains the event payload.

event_type
string
required

Event topic that will trigger the webhook. For the current list of supported values see TimelinesAI Event Types documentation at https://app.timelines.ai/integrations/webhooks_v2/swagger (for example: message:sent:new, message:received:new).

Example:

"message:sent:new"

url
string
required

Destination HTTPS endpoint that TimelinesAI will call. Must be publicly accessible and respond with 2xx status within 5 seconds.

Example:

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

enabled
boolean

Flag indicating whether the subscription is active. When false, deliveries are paused but the definition is kept.

Example:

true

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.