Send an event to a webhook Source
const url = 'https://api.pocketbell.dev/v1/hooks/pbw_7fk2mq9xr4tlp8vn3wz6cb1s';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pocketbell.dev/v1/hooks/pbw_7fk2mq9xr4tlp8vn3wz6cb1sPost any JSON, form or text (up to 64 KB). The Source’s templates turn it into a notification; with none, it reads as a summary of the event’s fields.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
pbw_7fk2mq9xr4tlp8vn3wz6cb1sResponses
Section titled “Responses”Received and queued.
object
Awaiting_answer for a question; awaiting_acknowledgment for a Critical notification, which repeats until acknowledged; scheduled when deliver_at is ahead.
Critical only: false when the account already has 10 Critical notifications repeating. This one is delivered once, without repeats, and still waits for acknowledgment until it expires.
Example
{ "id": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a", "status": "queued"}No webhook Source has this URL.
object
object
Which fields were wrong, for invalid_request.
object
Example
{ "error": { "code": "invalid_request" }}Rate_limited: too many at once, retry after the Retry-After header’s seconds; or monthly_limit_reached: the account’s notifications for the month are used up (a Critical one still goes out).
object
object
Which fields were wrong, for invalid_request.
object
Example
{ "error": { "code": "invalid_request" }}