The latest webhook event
const url = 'https://api.pocketbell.dev/v1/sources/src_01jz9k6q8r3tfv0x2m4n5p7s8a/event';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pocketbell.dev/v1/sources/src_01jz9k6q8r3tfv0x2m4n5p7s8a/event \ --header 'Authorization: Bearer <token>'For setting up a webhook Source: the event as it arrived, and its field paths.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
src_01jz9k6q8r3tfv0x2m4n5p7s8aResponses
Section titled “Responses”The latest event.
object
The latest event, pretty-printed in the order it arrived; null before the first.
What the message reads with no message template.
The event’s field paths, for {{placeholders}}.
The event is from a tool Pocketbell knows: what it becomes with no template, and, with no rules, its priority and event key.
object
Always null: a known tool’s events no longer replace each other; see event.
The event key: a later event about the same thing ends this one’s waiting (a Critical stops repeating), and both stay in the inbox, in order.
Example
{ "recognized": { "tool": "Uptime Kuma", "priority": "silent" }}Missing or ended session.
object
object
Which fields were wrong, for invalid_request.
object
Example
{ "error": { "code": "invalid_request" }}No such Source on this account.
object
object
Which fields were wrong, for invalid_request.
object
Example
{ "error": { "code": "invalid_request" }}