Send a test notification
const url = 'https://api.pocketbell.dev/v1/sources/src_01jz9k6q8r3tfv0x2m4n5p7s8a/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"priority":"silent","title":"example","message":"example"}'};
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/sources/src_01jz9k6q8r3tfv0x2m4n5p7s8a/test \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "priority": "silent", "title": "example", "message": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
src_01jz9k6q8r3tfv0x2m4n5p7s8aRequest Body
Section titled “Request Body”object
The test’s priority, to see how each level arrives. Without it, the Source’s default priority.
The test’s title in the reader’s language, as the app writes it. Without it, “Test notification”.
The test’s message in the reader’s language. Without it, English that names the Source.
Responses
Section titled “Responses”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"}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" }}Rate_limited: too many at once (see Retry-After); or monthly_limit_reached: this month’s notifications are used up.
object
object
Which fields were wrong, for invalid_request.
object
Example
{ "error": { "code": "invalid_request" }}