boundry.
RegionSydney, Australia
Documentation/Create a webhook
POST/webhooks

Create a webhook

Authentication

Bearer authentication is required for this operation.

Request body

FieldTypeDescription
descriptionstring

Optional endpoint description.

endpointrequiredstring (uri)

Webhook endpoint URL. Example: "https://hooks.acme.com/boundry".

eventsrequiredarray

Subscribed webhook event types.

headersobject

Optional static endpoint headers.

Request examples

request.sh
bash
curl --request POST 'https://api.au.boundry.dev/webhooks' \
+  -H 'Authorization: Bearer $BOUNDRY_API_KEY' \
+  -H 'Content-Type: application/json' \
+  --data '{"endpoint":"https://hooks.acme.com/boundry","events":["email.sent"]}'

201 response

New webhook and one-time signing secret.

FieldTypeDescription
idrequiredstring

Webhook identifier. Example: "msg_01j0example".

objectrequiredstring

Resource type discriminator. Values: "webhook".

signing_secretrequiredstring

One-time webhook signing secret.

response.jsonExample response
application/json
{
  "endpoint": "https://hooks.acme.com/boundry",
  "events": [
    "email.sent"
  ]
}

400 response

Request body was not valid JSON.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "endpoint": "https://hooks.acme.com/boundry",
  "events": [
    "email.sent"
  ]
}

401 response

Invalid API key.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "endpoint": "https://hooks.acme.com/boundry",
  "events": [
    "email.sent"
  ]
}

422 response

Request validation failed.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "endpoint": "https://hooks.acme.com/boundry",
  "events": [
    "email.sent"
  ]
}