Skip to content

Update a webhook endpoint

PATCH
/v1/webhook-endpoints/{id}
curl --request PATCH \
--url https://api.inboxcnx.com/v1/webhook-endpoints/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "events": [ "message.received", "message.updated", "grant.created" ] }'

Changes a webhook endpoint’s URL, subscribed events or description. Removing an event type cancels the endpoint’s open deliveries of that type. Adding one delivers the events of that type that no endpoint has received yet, from the last 7 days, at once.

Requires the write:webhooks scope.

id
required
string format: uuid
Media typeapplication/json
object
url
string format: uri
events
Array<string>
>= 1 items
Allowed values: message.received message.updated message.deleted message.enrich connection.error connection.restored grant.created grant.cap_reached grant.backfill_completed grant.revocation_scheduled grant.revoked usage.period.closed
description
string | null
<= 200 characters

Example

{
"events": [
"message.received",
"message.updated",
"grant.created"
]
}

The updated endpoint

Media typeapplication/json
object
id
required
string
url
required
string
description
required
string | null
events
required
Array<string>
createdAt
required
string
updatedAt
required
string
secret
string

Example generated

{
"id": "example",
"url": "example",
"description": "example",
"events": [
"example"
],
"createdAt": "example",
"updatedAt": "example",
"secret": "example"
}

Invalid body, or invalid_webhook_target: the URL must be https and must not point at a private address or an internal hostname

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The credential lacks the write:webhooks scope

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No such endpoint for the caller’s application

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Another endpoint already takes message.enrich

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}