Suppress a device token
Add a device token to the workspace's suppression list. This is the only way to block a single token from delivery: the row is read on every send, so the next push to this token comes back with status: skipped and skip_reason: device_token_suppressed, and the provider is never invoked. Requires push:send.
Keep the id from the response — it is the only way to lift the suppression later, and there is no route that lists existing suppressions.
The workspace always comes from the API key; a workspace_id in the body is ignored. The raw token is never echoed back — responses and logs carry only the masked form.
curl -X POST "https://api.flameup.ai/api/v1/workspaces/example_string/push/tokens/suppress" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"reason": "example_string",
"source_push_id": "123e4567-e89b-12d3-a456-426614174000",
"source_campaign_id": "123e4567-e89b-12d3-a456-426614174000"
}'
import requests
import json
url = "https://api.flameup.ai/api/v1/workspaces/example_string/push/tokens/suppress"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"reason": "example_string",
"source_push_id": "123e4567-e89b-12d3-a456-426614174000",
"source_campaign_id": "123e4567-e89b-12d3-a456-426614174000"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.flameup.ai/api/v1/workspaces/example_string/push/tokens/suppress", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"reason": "example_string",
"source_push_id": "123e4567-e89b-12d3-a456-426614174000",
"source_campaign_id": "123e4567-e89b-12d3-a456-426614174000"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"reason": "example_string",
"source_push_id": "123e4567-e89b-12d3-a456-426614174000",
"source_campaign_id": "123e4567-e89b-12d3-a456-426614174000"
}`)
req, err := http.NewRequest("POST", "https://api.flameup.ai/api/v1/workspaces/example_string/push/tokens/suppress", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.flameup.ai/api/v1/workspaces/example_string/push/tokens/suppress')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"reason": "example_string",
"source_push_id": "123e4567-e89b-12d3-a456-426614174000",
"source_campaign_id": "123e4567-e89b-12d3-a456-426614174000"
}'
response = http.request(request)
puts response.body
{
"success": true,
"id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"suppressed_at": "2024-12-25T10:00:00Z",
"already_suppressed": true
}
{
"success": true,
"id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"suppression_type": "uninstalled",
"suppressed_at": "2024-12-25T10:00:00Z",
"already_suppressed": true
}
{
"success": false,
"error": "Person not found",
"code": "example_string"
}
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"details": "Please provide a valid API key in the Authorization header: Bearer <your_api_key>"
}
{
"success": false,
"error": {
"code": "example_string",
"message": "example_string",
"details": {}
}
}
{
"success": false,
"error": "Person not found",
"code": "example_string"
}
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"details": "Please provide a valid API key in the Authorization header: Bearer <your_api_key>"
}
{
"success": false,
"error": {
"code": "example_string",
"message": "example_string",
"details": {}
}
}
{
"success": false,
"error": "Person not found",
"code": "example_string"
}
{
"error": "Unauthorized",
"message": "Invalid or expired API key",
"details": "Please provide a valid API key in the Authorization header: Bearer <your_api_key>"
}
{
"success": false,
"error": {
"code": "example_string",
"message": "example_string",
"details": {}
}
}
/workspaces/{workspaceId}/push/tokens/suppressTarget server for requests. Edit to use your own host.
Your Flameup API key (passed as Bearer token)
Workspace ID
The media type of the request body
The device token to suppress.
Why the token is being suppressed. Anything outside this set is a 400 listing the accepted values.
Optional free-text note.
Optional push record that prompted the suppression. Must be a UUID naming a push record in this workspace — anything else is a 400.
Optional campaign the suppression is attributed to. Must be a UUID.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Your Flameup API key (passed as Bearer token)
Path Parameters
Workspace ID
Body
The device token to suppress.
iosandroidwebhuaweiWhy the token is being suppressed. Anything outside this set is a 400 listing the accepted values.
uninstalleddisabledinvalid_tokenopt_outOptional free-text note.
Optional push record that prompted the suppression. Must be a UUID naming a push record in this workspace — anything else is a 400.
Optional campaign the suppression is attributed to. Must be a UUID.
Responses
The suppression id, required to lift it later.
Masked — the raw token is never echoed back. A token of normal length comes back as its first and last 4 characters around ***.
iosandroidwebhuaweiuninstalleddisabledinvalid_tokenopt_outTrue when the token was already suppressed under this type — the 200 case rather than the 201.