Send push to multiple recipients
Send one title/body to up to 1000 recipients. Requires push:send.
Recipient semantics: user_id must be the Flameup person UUID (not an external id — a non-UUID value fails that recipient), and device_token acts as a selector among that person's active devices, not a raw address — a token that is not one of the person's active devices yields status: skipped, never a send to an unregistered device. Content renders against the named person, with variables merged per recipient (recipient values win).
Always 200: per-recipient failures come back as status: failed entries in results, in request order. The workspace send policy applies per recipient, as on the single-send route.
curl -X POST "https://api.flameup.ai/api/v1/workspaces/example_string/push/send/batch" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"title": "example_string",
"body": "example_string",
"image_url": "example_string",
"action_url": "example_string",
"recipients": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"variables": {}
}
],
"variables": {},
"tags": [
"example_string"
]
}'
import requests
import json
url = "https://api.flameup.ai/api/v1/workspaces/example_string/push/send/batch"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"title": "example_string",
"body": "example_string",
"image_url": "example_string",
"action_url": "example_string",
"recipients": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"variables": {}
}
],
"variables": {},
"tags": [
"example_string"
]
}
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/send/batch", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"title": "example_string",
"body": "example_string",
"image_url": "example_string",
"action_url": "example_string",
"recipients": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"variables": {}
}
],
"variables": {},
"tags": [
"example_string"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"title": "example_string",
"body": "example_string",
"image_url": "example_string",
"action_url": "example_string",
"recipients": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"variables": {}
}
],
"variables": {},
"tags": [
"example_string"
]
}`)
req, err := http.NewRequest("POST", "https://api.flameup.ai/api/v1/workspaces/example_string/push/send/batch", 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/send/batch')
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 = '{
"title": "example_string",
"body": "example_string",
"image_url": "example_string",
"action_url": "example_string",
"recipients": [
{
"user_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"variables": {}
}
],
"variables": {},
"tags": [
"example_string"
]
}'
response = http.request(request)
puts response.body
{
"results": [
{
"message_id": "9f2c1e77-4a1b-4c2e-9a0f-51a6b2d3c8e4",
"status": "sent",
"sent_at": "2024-12-25T10:00:00Z",
"provider": "fcm",
"provider_id": "example_string",
"error": "example_string",
"skip_reason": "no_active_device_tokens"
}
],
"summary": {
"total": 42,
"sent": 42,
"failed": 42,
"processed": "2024-12-25T10:00:00Z"
}
}
{
"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/send/batchTarget 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
Template variables shared by all recipients.
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
Template variables shared by all recipients.
Responses
One result per recipient, in request order.