Skip to content

Change an endpoint, or pause and resume it

PATCH
/v1/webhooks/subscriptions/{id}
curl --request PATCH \
--url https://api.threadkite.app/v1/webhooks/subscriptions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "url": "example", "filters": { "inboxIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "sourceIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "locationIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }, "events": [ "lead.created" ], "description": "example", "status": "active" }'
id
required
string format: uuid
Media typeapplication/json
object
url
string
>= 1 characters <= 2000 characters
filters

Only events in these inboxes, from these lead sources or at these locations. A filter applies only to events that say (a thread’s inbox, a lead’s source, a location); others are sent. Empty sends everything the endpoint asked for.

object
inboxIds
Array<string>
<= 50 items
sourceIds
Array<string>
<= 50 items
locationIds
Array<string>
<= 50 items
events

The events to send: their names, a namespace of them (thread.*), * for everything, event.* for every event your systems send through POST /v1/events, or one of those by name (event.order.paid). Industry packs add their own, sent only for organisations with the pack (Automotive: automotive.contact_item.mot_due, automotive.contact_item.equity_calculated, automotive.contact_item.finance_ending).

Array
>= 1 items <= 100 items
description

What it is for; empty or null clears it

string
nullable <= 200 characters
status

paused stops deliveries; active resumes, and turns an endpoint we switched off back on

string
Allowed values: active paused
Media typeapplication/json
object
id
required
string format: uuid
url
required
string
events
required

The events to send: their names, a namespace of them (thread.*), * for everything, event.* for every event your systems send through POST /v1/events, or one of those by name (event.order.paid). Industry packs add their own, sent only for organisations with the pack (Automotive: automotive.contact_item.mot_due, automotive.contact_item.equity_calculated, automotive.contact_item.finance_ending).

Array<string>
filters
required

Only events in these inboxes, from these lead sources or at these locations. A filter applies only to events that say (a thread’s inbox, a lead’s source, a location); others are sent. Empty sends everything the endpoint asked for.

object
inboxIds
Array<string>
sourceIds
Array<string>
locationIds
Array<string>
status
required

paused by you; disabled by us after every delivery failed for 24 hours (turn it on again with status: active once fixed)

string
Allowed values: active paused disabled
description
required

What it is for, in your words

string
nullable
disabledAt
required

When we switched it off (disabled)

string format: date-time
nullable
disabledReason
required

Why we switched it off, in plain words (only while disabled)

string
nullable
previousSecretExpiresAt
required

While a rolled secret is in its grace period: when the old secret stops signing

string format: date-time
nullable
health
required
object
delivered
required

Deliveries accepted in the last 24 hours

number
failed
required

Deliveries that gave up in the last 24 hours

number
retrying
required

Deliveries still being tried (created in the last 24 hours)

number
lastDeliveryAt
required

When the newest delivery was created

string format: date-time
nullable
createdAt
required
string format: date-time

Example

{
"url": "https://dms.example.co.uk/hooks/threadkite",
"status": "active",
"disabledReason": "Every delivery failed for 24 hours. The last answer was HTTP 500.",
"health": {
"delivered": 212,
"failed": 1
}
}
Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Missing or invalid API key

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

The organisation is on the Free plan (code upgrade_required)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
feature
required

The feature that needs Pro

string
nullable
Allowed values: extraSeats connections aiAssistant aiReplies rules fullReports api inboxes bulkMessages videoMessages
upgradePath
required

Where to upgrade or pay, in the web app

string

Example

{
"statusCode": 402,
"code": "upgrade_required",
"message": "Connections are part of Pro. Upgrade to connect texts, calls and more.",
"feature": "extraSeats",
"upgradePath": "/settings/billing"
}

Refused during support access, a partner’s or Threadkite staff’s (code support_access_not_allowed)

The key does not have the scope (or the person the permission)

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}
Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
errors

With code invalid: every problem with the request, by field (message is the first)

Array<object>
object
path
required

Dotted path inside the item, e.g. attributes.price.amountMinor

string
message
required
string

Example

{
"statusCode": 403,
"code": "forbidden",
"message": "You do not have permission to do that.",
"errors": [
{
"message": "Enter the make"
}
]
}

Rate limit reached

Media typeapplication/json
object
statusCode
required
number
code
required

Stable machine-readable reason

string
message
required
string
retryAfter
required

Seconds until another request will be accepted

number

Example

{
"statusCode": 429,
"code": "rate_limited",
"message": "Too many requests. Each key can make 120 requests a minute; try again in 12 seconds.",
"retryAfter": 12
}