List the account's devices
GET
/v1/devices
const url = 'https://api.pocketbell.dev/v1/devices';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/devices \ --header 'Authorization: Bearer <token>'Every device receiving this account’s notifications, most recently seen first.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The devices.
Media typeapplication/json
object
devices
required
Array<object>
object
id
required
string
name
required
string
platform
required
string
last_seen_at
required
string | null format: date-time
is_this_device
required
Registered by the session making the request.
boolean
play_sounds
required
Notifications play sounds here; a Critical one always does.
boolean
quiet_hours
required
The account’s quiet hours apply to this device.
boolean
Example
{ "devices": [ { "id": "dev_01jz9k6q8r3tfv0x2m4n5p7s8a", "name": "iPhone", "platform": "ios" } ]}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" }}