Mute or unmute a push device
import requests
url = "https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "ios",
"apns_environment": "<string>",
"device_name": "<string>",
"app_version": "<string>",
"os_version": "<string>",
"token_suffix": "<string>",
"enabled": true,
"disabled_reason": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"last_delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Notifications
Mute or unmute a push device
Turns push delivery to one of the caller’s devices on or off.
PATCH
/
api
/
v1
/
org
/
notifications
/
push-devices
/
{device_id}
Mute or unmute a push device
import requests
url = "https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://platform.ankra.app/api/v1/org/notifications/push-devices/{device_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"platform": "ios",
"apns_environment": "<string>",
"device_name": "<string>",
"app_version": "<string>",
"os_version": "<string>",
"token_suffix": "<string>",
"enabled": true,
"disabled_reason": "<string>",
"last_seen_at": "2023-11-07T05:31:56Z",
"last_delivered_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
The device
A mobile device registered for the caller's push notifications.
Available options:
ios, android The end of the device token, enough to tell devices apart.