Skip to content
This site documents the main branch, which may hold changes not yet released. Latest release: v0.3.0 (changelog).

Edit a webhook endpoint (`secret` set when rotated)

PATCH
/capture/webhooks/{id}
curl --request PATCH \
--url http://localhost:3000/capture/webhooks/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "connectionId": "example", "url": "https://example.com", "payloadFormat": "unified", "events": [ "example" ], "description": "example", "brevoAuth": { "type": "none" }, "customHeaders": [ { "key": "example", "value": "example" } ], "enabled": true, "rotateSecret": true }'
id
required
string
/^whe_[A-Za-z0-9-]{1,64}$/
Media typeapplication/json
object
connectionId
Any of:
string
/^con_[A-Za-z0-9-]{1,64}$/
url
string format: uri
<= 2000 characters
payloadFormat
string
Allowed values: unified resend brevo
events
Array<string>
>= 1 items <= 50 items
description
Any of:
string
<= 200 characters
brevoAuth
One of:
object
type
required
string
Allowed value: none
customHeaders
Array<object>
<= 10 items
object
key
required
string
/^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$/
value
required
string
<= 1000 characters
enabled
boolean
rotateSecret
boolean

The endpoint.

Media typeapplication/json
object
id
required
string
/^whe_[A-Za-z0-9-]{1,64}$/
numericId
required
integer
>= -9007199254740991 <= 9007199254740991
connectionId
required
Any of:
string
/^con_[A-Za-z0-9-]{1,64}$/
url
required
string
payloadFormat
required
string
Allowed values: unified resend brevo
events
required
Array<string>
canonicalEvents
required
Array<string>
Allowed values: email.sent email.delivered email.deferred email.soft_bounced email.hard_bounced email.complained email.opened email.clicked email.suppressed email.failed email.invalid
unsupportedEvents
required
Array<string>
Allowed values: email.sent email.delivered email.deferred email.soft_bounced email.hard_bounced email.complained email.opened email.clicked email.suppressed email.failed email.invalid
description
required
string | null
brevoAuth
required
object
type
required
string
Allowed values: none bearer basic
username
string
customHeaders
required
Array<object>
object
key
required
string
/^[A-Za-z0-9!#$%&'*+.^_`|~-]{1,100}$/
value
required
string
<= 1000 characters
secretPreview
required
string | null
enabled
required
boolean
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
secret
required
string | null

Example

{
"payloadFormat": "unified",
"canonicalEvents": [
"email.sent"
],
"unsupportedEvents": [
"email.sent"
],
"brevoAuth": {
"type": "none"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: validation_error

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: unauthorized

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

WWW-Authenticate
required

Sent with every 401.

string
Allowed value: Bearer

Sent with every 401.

Error: forbidden

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: not_found

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: payload_too_large

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: validation_error

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.

Error: internal_error

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: unauthorized forbidden validation_error not_found conflict idempotency_mismatch rate_limited payload_too_large chaos_injected wait_timeout internal_error
message
required
string
details
requestId
required
string

Example

{
"error": {
"code": "unauthorized"
}
}
X-Request-Id
required

Id of the request (req_…), also the id of its request log row.

string

Id of the request (req_…), also the id of its request log row.