Skip to content
Status

Attach webhook

POSThttps://app.shuttleglobal.com/c/api/instances/{instance_key}/webhooks

POST
/webhooks

Adds a URL to the instance’s webhook_target, alongside any URLs already there (see Webhook configuration). Attaching a URL that is already attached updates its retries instead of adding it again.

Media typeapplication/json
object
webhook
required
object
object
url
required
string · uri
e.g. "https://your-app.com/webhooks/shuttle"

The HTTPS URL that will receive webhooks

retries
integer
e.g. 3

The total number of delivery attempts for each webhook, including the first. For example, 3 means the first attempt plus up to two retries. Leave it out (or send 0 or 1) for a single attempt with no retries.

Webhook successfully attached

Media typeapplication/json
object
webhook
object
object
id
string
e.g. "5d41402abc4b2a76b9719d911017c592"

Identifier for the attached URL. Use it to detach the webhook.

Pattern /^[a-f0-9]{32}$/
url
string · uri
e.g. "https://your-app.com/webhooks/shuttle"

The URL you attached

retries
integer
e.g. 3

The retries value you sent, if any

Bad request

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Authentication required

Media typeapplication/json

Every error has a code and a message. Some add more fields alongside them, with detail about the error.

object
code
string

The error code, for example VALIDATION_ERROR, INVALID, INVALID_REQUEST, UNAUTHORIZED, FORBIDDEN or NOT_FOUND. Program against this, not the message.

message
string

What went wrong, in words, for logs and support.

Example
{
"code": "UNAUTHORIZED",
"message": "Unauthorised"
}

Was this page helpful?