Skip to content

Create an outbound webhook

POST
/webhooks
curl --request POST \
--url https://api.vendorica.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "triggers": [ "example" ], "endpoint": "https://example.com", "customHeaders": [ { "name": "example", "value": "example" } ], "signingEnabled": true, "retryPolicy": { "enabled": true, "maxAttempts": 1, "backoff": "exponential", "initialDelaySeconds": 1, "maxDelaySeconds": 1, "retryOn": [ "timeout" ] }, "failureHandling": { "autoDisableAfter": 1, "disableOnGone": true } }'

Creates one webhook entry (name + triggers + endpoint + optional custom headers + optional HMAC signing + optional retryPolicy / failureHandling; an omitted policy field takes its default). Every trigger must be available on the org’s plan (see GET /webhooks/triggers); the endpoint must be a public HTTPS URL (private / loopback / metadata addresses are rejected). When signingEnabled is true the response carries signingSecret exactly once. Subject to the plan’s webhook-count cap (409 when exceeded). A trigger name that is not in the catalogue is a 422 VALIDATION_ERROR naming triggers; a trigger that exists but is not on the plan is a 403. Either way the whole request is refused — no subset is created.

Webhook configuration

Media typeapplication/json
object
name
required
string
>= 1 characters <= 120 characters
triggers
required
Array<string>
>= 1 items <= 50 items
endpoint
required
string format: uri
<= 2048 characters
customHeaders
Array<object>
<= 20 items
object
name
required
string
>= 1 characters <= 128 characters
value
required
string
<= 4096 characters
signingEnabled
boolean
retryPolicy
object
enabled
boolean
maxAttempts
integer
>= 1 <= 10
backoff
string
Allowed values: exponential fixed
initialDelaySeconds
integer
>= 10 <= 3600
maxDelaySeconds
integer
>= 60 <= 86400
retryOn
Array<string>
<= 6 items
Allowed values: timeout network http_408 http_429 http_5xx http_4xx
failureHandling
object
autoDisableAfter
integer
>= 1 <= 100
disableOnGone
boolean

Success

Media typeapplication/json
object
success
required
boolean
data
required
object
webhook
required
object
id
required
string format: uuid
organizationId
required
string format: uuid
name
required
string
triggers
required
Array<string>
endpoint
required
string format: uri
status
required
string
Allowed values: active disabled suspended
apiVersion
required
string
customHeaders
required
Array<object>
object
name
required
string
valueHint
required
string
signing
required
object
enabled
required
boolean
secretHint
required
string | null
retryPolicy
required
object
enabled
required
boolean
maxAttempts
required
integer
backoff
required
string
Allowed values: exponential fixed
initialDelaySeconds
required
integer
maxDelaySeconds
required
integer
retryOn
required
Array<string>
Allowed values: timeout network http_408 http_429 http_5xx http_4xx
failureHandling
required
object
autoDisableAfter
required
integer
disableOnGone
required
boolean
consecutiveFailures
required
integer
lastSuccessAt
required
string | null format: date-time
lastFailureAt
required
string | null format: date-time
disabledReason
required
string | null
createdAt
required
string | null format: date-time
updatedAt
required
string | null format: date-time
signingSecret
string
timestamp
required
string format: date-time
requestId
string
message
string
Example
{
"success": true,
"data": {
"webhook": {
"id": "53cbd165-50da-4525-8e31-fad24eaddee2",
"organizationId": "8a0d4fa0-f4f4-4c06-81ac-dbdf5e1e19c1",
"name": "string",
"triggers": [
"string"
],
"endpoint": "https://example.com",
"status": "active",
"apiVersion": "string",
"customHeaders": [
{
"name": "string",
"valueHint": "string"
}
],
"signing": {
"enabled": true,
"secretHint": "string"
},
"retryPolicy": {
"enabled": true,
"maxAttempts": 1,
"backoff": "exponential",
"initialDelaySeconds": 1,
"maxDelaySeconds": 1,
"retryOn": [
"timeout"
]
},
"failureHandling": {
"autoDisableAfter": 1,
"disableOnGone": true
},
"consecutiveFailures": 1,
"lastSuccessAt": "2026-08-19T09:41:12.004Z",
"lastFailureAt": "2026-08-19T09:41:12.004Z",
"disabledReason": "string",
"createdAt": "2026-08-19T09:41:12.004Z",
"updatedAt": "2026-08-19T09:41:12.004Z"
},
"signingSecret": "string"
},
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H",
"message": "string"
}

Validation error

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Bad request",
"code": "BAD_REQUEST",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Unauthorized

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Unauthorized",
"code": "UNAUTHORIZED",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Forbidden — missing scope

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Forbidden",
"code": "FORBIDDEN",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Not found

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Resource not found",
"code": "NOT_FOUND",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}

Rate limit exceeded

Media typeapplication/json
object
success
required
boolean
error
required
string
code
required
string
details
timestamp
required
string format: date-time
requestId
string
Example
{
"success": false,
"error": "Too many requests",
"code": "TOO_MANY_REQUESTS",
"timestamp": "2026-08-19T09:41:12.004Z",
"requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"
}