Register a Live Activity's token
PUT
/v1/live-activities
const url = 'https://api.pocketbell.dev/v1/live-activities';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"source_id":"src_01jz9k6q8r3tfv0x2m4n5p7s8a","key":"deploy-4f2a91c","push_token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.pocketbell.dev/v1/live-activities \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "source_id": "src_01jz9k6q8r3tfv0x2m4n5p7s8a", "key": "deploy-4f2a91c", "push_token": "example" }'Sent by the app when a Live Activity on this session’s device gets its push token, and whenever the token changes.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
source_id
required
string
Example
src_01jz9k6q8r3tfv0x2m4n5p7s8akey
required
The event’s replace key.
string
Example
deploy-4f2a91cpush_token
required
string
Responses
Section titled “Responses”Registered.
The request was invalid.
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" }}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, or no device for this 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" }}