Start a push Live Activity
curl --request POST \
--url https://api.sendrealm.com/push/live-activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_id": "<string>",
"activity_id": "<string>",
"tokens": [
{
"token": "<string>"
}
],
"title": "<string>",
"subtitle": "<string>",
"body": "<string>",
"status": "<string>",
"progress": 0.5,
"eta": "<string>",
"image_url": "<string>",
"accent_color": "<string>",
"launch_url": "<string>",
"dismiss_at": "2023-11-07T05:31:56Z",
"buttons": [
{
"id": "<string>",
"text": "<string>",
"title": "<string>",
"icon": "<string>",
"launch_url": "<string>"
}
],
"data": {},
"device_ids": [
"<string>"
],
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"external_ids": [
"<string>"
],
"emails": [
"jsmith@example.com"
],
"audiences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_audiences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"platforms": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: '<string>',
activity_id: '<string>',
tokens: [{token: '<string>'}],
title: '<string>',
subtitle: '<string>',
body: JSON.stringify('<string>'),
status: '<string>',
progress: 0.5,
eta: '<string>',
image_url: '<string>',
accent_color: '<string>',
launch_url: '<string>',
dismiss_at: '2023-11-07T05:31:56Z',
buttons: [
{
id: '<string>',
text: '<string>',
title: '<string>',
icon: '<string>',
launch_url: '<string>'
}
],
data: {},
device_ids: ['<string>'],
contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
external_ids: ['<string>'],
emails: ['jsmith@example.com'],
audiences: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_audiences: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
platforms: []
})
};
fetch('https://api.sendrealm.com/push/live-activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/push/live-activities"
payload = {
"app_id": "<string>",
"activity_id": "<string>",
"tokens": [{ "token": "<string>" }],
"title": "<string>",
"subtitle": "<string>",
"body": "<string>",
"status": "<string>",
"progress": 0.5,
"eta": "<string>",
"image_url": "<string>",
"accent_color": "<string>",
"launch_url": "<string>",
"dismiss_at": "2023-11-07T05:31:56Z",
"buttons": [
{
"id": "<string>",
"text": "<string>",
"title": "<string>",
"icon": "<string>",
"launch_url": "<string>"
}
],
"data": {},
"device_ids": ["<string>"],
"contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"external_ids": ["<string>"],
"emails": ["jsmith@example.com"],
"audiences": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_audiences": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"platforms": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"activity_id": "<string>",
"event": "<string>",
"total": 123,
"sent": 123,
"failed": 123
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Push Notifications
Start Push Live Activity
Start a Live Activity session for targeted push devices.
POST
/
push
/
live-activities
Start a push Live Activity
curl --request POST \
--url https://api.sendrealm.com/push/live-activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_id": "<string>",
"activity_id": "<string>",
"tokens": [
{
"token": "<string>"
}
],
"title": "<string>",
"subtitle": "<string>",
"body": "<string>",
"status": "<string>",
"progress": 0.5,
"eta": "<string>",
"image_url": "<string>",
"accent_color": "<string>",
"launch_url": "<string>",
"dismiss_at": "2023-11-07T05:31:56Z",
"buttons": [
{
"id": "<string>",
"text": "<string>",
"title": "<string>",
"icon": "<string>",
"launch_url": "<string>"
}
],
"data": {},
"device_ids": [
"<string>"
],
"contact_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"external_ids": [
"<string>"
],
"emails": [
"jsmith@example.com"
],
"audiences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_audiences": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"platforms": []
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
app_id: '<string>',
activity_id: '<string>',
tokens: [{token: '<string>'}],
title: '<string>',
subtitle: '<string>',
body: JSON.stringify('<string>'),
status: '<string>',
progress: 0.5,
eta: '<string>',
image_url: '<string>',
accent_color: '<string>',
launch_url: '<string>',
dismiss_at: '2023-11-07T05:31:56Z',
buttons: [
{
id: '<string>',
text: '<string>',
title: '<string>',
icon: '<string>',
launch_url: '<string>'
}
],
data: {},
device_ids: ['<string>'],
contact_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
external_ids: ['<string>'],
emails: ['jsmith@example.com'],
audiences: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_audiences: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
platforms: []
})
};
fetch('https://api.sendrealm.com/push/live-activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/push/live-activities"
payload = {
"app_id": "<string>",
"activity_id": "<string>",
"tokens": [{ "token": "<string>" }],
"title": "<string>",
"subtitle": "<string>",
"body": "<string>",
"status": "<string>",
"progress": 0.5,
"eta": "<string>",
"image_url": "<string>",
"accent_color": "<string>",
"launch_url": "<string>",
"dismiss_at": "2023-11-07T05:31:56Z",
"buttons": [
{
"id": "<string>",
"text": "<string>",
"title": "<string>",
"icon": "<string>",
"launch_url": "<string>"
}
],
"data": {},
"device_ids": ["<string>"],
"contact_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"external_ids": ["<string>"],
"emails": ["jsmith@example.com"],
"audiences": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_audiences": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"platforms": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": 123,
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"activity_id": "<string>",
"event": "<string>",
"total": 123,
"sent": 123,
"failed": 123
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Start a Live Activity session for matching push devices. iOS delivery uses
ActivityKit push-to-start tokens registered by the SDK. Android delivery uses
ongoing notifications with the same live activity payload shape.
Targeting supports the same identifiers as push notification sends:
{
"app_id": "push_app_short_id",
"activity_id": "order-123",
"device_ids": ["push_device_id"],
"title": "Delivery",
"status": "Preparing order",
"progress": 0.25,
"launch_url": "myapp://orders/123",
"buttons": [
{
"id": "track",
"text": "Track",
"launch_url": "myapp://orders/123/track"
}
],
"data": {
"order_id": "123"
}
}
tokens,
device_ids, contact_ids, external_ids, emails, and audiences.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Live Activity start payload
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Push app short ID.
Minimum array length:
1Show child attributes
Show child attributes
Required range:
0 <= x <= 1Maximum string length:
2048Maximum array length:
3- Option 1
- Option 2
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Minimum array length:
1Available options:
android, ios ⌘I