Skip to content

Replace an automation's webhook signing secret

POST
/projects/{id}/automations/{automationId}/webhook-secret
Code sample: Shell / cURL
curl --request POST \
--url https://example.com/api/v1/projects/example/automations/example/webhook-secret \
--header 'Authorization: Bearer <token>'

Requires the projects.manage permission and reach to the project. The automation must have the INCOMING_WEBHOOK trigger. Creates or replaces its signing secret and returns it once, with the webhook URL; the previous secret stops working. Another system then POSTs { taskId } or { taskIds } to the URL with a unique X-Chelsea-Delivery header and X-Chelsea-Signature: sha256=<hex HMAC-SHA256 of the raw body with the secret>. A wrong signature answers 401, an unknown URL 404, and a delivery id already received runs nothing again.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

automationId
required

Project automation identifier (CUID2).

string
>= 1 characters

Project automation identifier (CUID2).

The webhook URL and the new secret.

Media typeapplication/json
object
data
required

An automation’s webhook URL and its new signing secret.

object
secret
required

The new signing secret, shown only in this response.

string
webhookUrl
required

Where another system sends its deliveries.

string

Example generated

{
"data": {
"secret": "example",
"webhookUrl": "example"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.