List devices for a person
Retrieve all device tokens registered for a person. The workspace is resolved from the API key, so it is not part of the path.
This endpoint takes no query parameters and is not paginated. Devices are ordered
by last_used_at (most recent first), then created_at descending.
Accepts devices:read or devices:write. A devices:register key is
deliberately rejected here — it must not be able to enumerate device tokens.
curl -X GET "https://api.flameup.ai/api/v1/people/example_string/devices" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.flameup.ai/api/v1/people/example_string/devices"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.flameup.ai/api/v1/people/example_string/devices", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.flameup.ai/api/v1/people/example_string/devices", nil)
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/people/example_string/devices')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"success": true,
"devices": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"person_id": "123e4567-e89b-12d3-a456-426614174000",
"device_token": "example_string",
"platform": "ios",
"device_name": "John Doe",
"device_model": "example_string",
"os_version": "example_string",
"app_version": "example_string",
"is_active": true,
"is_valid": true,
"last_used_at": "2024-12-25T10:00:00Z",
"registration_count": 10,
"created_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z"
}
],
"count": 10
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/people/{externalId}/devicesTarget server for requests. Edit to use your own host.
Your Flameup API key (passed as Bearer token)
Your own user id — the same userId you send to /identify and /track. This is NOT the Flameup person UUID. Every API-key route keys on this identifier; the Flameup UUID is used only by the dashboard's workspace-scoped routes.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Your Flameup API key (passed as Bearer token)
Path Parameters
Your own user id — the same userId you send to /identify and /track. This is NOT the Flameup person UUID. Every API-key route keys on this identifier; the Flameup UUID is used only by the dashboard's workspace-scoped routes.
Responses
Number of devices returned