Skip to content

Send a test notification

POST
/v1/sources/{id}/test
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" }'
id
required
string
Example
src_01jz9k6q8r3tfv0x2m4n5p7s8a
Media typeapplication/json
object
priority

The test’s priority, to see how each level arrives. Without it, the Source’s default priority.

string
Allowed values: silent quiet normal important critical
title

The test’s title in the reader’s language, as the app writes it. Without it, “Test notification”.

string
>= 1 characters <= 250 characters
message

The test’s message in the reader’s language. Without it, English that names the Source.

string
>= 1 characters <= 4096 characters

Queued.

Media typeapplication/json
object
id
required
string
status
required

Awaiting_answer for a question; awaiting_acknowledgment for a Critical notification, which repeats until acknowledged; scheduled when deliver_at is ahead.

string
Allowed values: queued scheduled awaiting_acknowledgment awaiting_answer
repeats

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.

boolean
Example
{
"id": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a",
"status": "queued"
}

Missing or ended session.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Which fields were wrong, for invalid_request.

Array<object>
object
field
required
string
message
required
string
Example
{
"error": {
"code": "invalid_request"
}
}

No such Source on this account.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Which fields were wrong, for invalid_request.

Array<object>
object
field
required
string
message
required
string
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.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Which fields were wrong, for invalid_request.

Array<object>
object
field
required
string
message
required
string
Example
{
"error": {
"code": "invalid_request"
}
}