Skip to content

Updates a webhook

PATCH
/webhook/{name}
curl --request PATCH \
--url https://web.exactly.app/api/webhook/example \
--header 'Content-Type: application/json' \
--cookie __Secure-better-auth.session_token=<__Secure-better-auth.session_token> \
--data '{ "url": "https://example.com", "transaction": { "created": "https://example.com", "updated": "https://example.com", "completed": "https://example.com" }, "card": { "updated": "https://example.com" }, "user": { "updated": "https://example.com" } }'

Partially updates an existing webhook by name. Only fields included in the request body are modified; omitted fields (including the top-level url and any nested per-event URLs) keep their stored value. Passing null for a per-event URL clears it; the parent group is dropped when it has no per-event URLs left. Returns 400 when the path name fails the slug pattern, the body fails validation, or any URL uses a non-https scheme, fails to resolve, or resolves to a private/loopback address. Returns 404 when the organization has no source configured or no webhook with that name exists. The signing secret is preserved and is not returned in the response. Only owner and admin roles can update a webhook.

name
required
string
/^[a-z0-9-]{1,64}$/
Media typeapplication/json
object
url
string format: uri
transaction
object
created
Any of:
string format: uri
nullable
updated
Any of:
string format: uri
nullable
completed
Any of:
string format: uri
nullable
card
object
updated
Any of:
string format: uri
nullable
user
object
updated
Any of:
string format: uri
nullable
Examplegenerated
{
"url": "https://example.com",
"transaction": {
"created": "https://example.com",
"updated": "https://example.com",
"completed": "https://example.com"
},
"card": {
"updated": "https://example.com"
},
"user": {
"updated": "https://example.com"
}
}

Webhook updated

Media typeapplication/json
object
url
required
string format: uri
transaction
object
created
string format: uri
updated
string format: uri
completed
string format: uri
card
object
updated
string format: uri
user
object
updated
string format: uri
name
required
string
/^[a-z0-9-]{1,64}$/
Examplegenerated
{
"url": "https://example.com",
"transaction": {
"created": "https://example.com",
"updated": "https://example.com",
"completed": "https://example.com"
},
"card": {
"updated": "https://example.com"
},
"user": {
"updated": "https://example.com"
},
"name": "example"
}

Invalid webhook name, body, or URL

Media typeapplication/json
object
code
required
string
message
Array<string>
Example
{
"code": "invalid name"
}

Unauthorized

Media typeapplication/json
object
code
required
Allowed values: unauthorized
Example
{
"code": "unauthorized"
}

User doesn't belong to the organization

Media typeapplication/json
Any of:
object
code
required
Allowed values: no organization
Example
{
"code": "no organization"
}

Webhook not found

Media typeapplication/json
object
code
required
Allowed values: not found
Example
{
"code": "not found"
}