Identify a person
Create or update one person and their traits, keyed on your own user id. This is the primary ingestion route for a people-first integration.
Requires people:write or the narrower people:identify. The latter authorizes this route and nothing else, which is what makes it safe on a key shipped inside an app.
curl -X POST "https://api.flameup.ai/api/v1/identify" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"userId": "example_string",
"external_id": "example_string",
"user_id": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"anonymousId": "example_string",
"traits": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
import requests
import json
url = "https://api.flameup.ai/api/v1/identify"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"userId": "example_string",
"external_id": "example_string",
"user_id": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"anonymousId": "example_string",
"traits": {},
"timestamp": "2024-12-25T10:00:00Z"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.flameup.ai/api/v1/identify", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"userId": "example_string",
"external_id": "example_string",
"user_id": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"anonymousId": "example_string",
"traits": {},
"timestamp": "2024-12-25T10:00:00Z"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"userId": "example_string",
"external_id": "example_string",
"user_id": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"anonymousId": "example_string",
"traits": {},
"timestamp": "2024-12-25T10:00:00Z"
}`)
req, err := http.NewRequest("POST", "https://api.flameup.ai/api/v1/identify", 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/identify')
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 = '{
"userId": "example_string",
"external_id": "example_string",
"user_id": "example_string",
"email": "user@example.com",
"phone": "+1-555-0123",
"anonymousId": "example_string",
"traits": {},
"timestamp": "2024-12-25T10:00:00Z"
}'
response = http.request(request)
puts response.body
{
"success": true,
"person": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"workspace_id": "123e4567-e89b-12d3-a456-426614174000",
"userId": "example_string"
}
}
{
"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": {}
}
}
/identify
Target server for requests. Edit to use your own host.
Your Flameup API key (passed as Bearer token)
The media type of the request body
Your own user id. external_id and user_id are accepted aliases. Send only one — if two are present and disagree the request is rejected rather than one being picked for you.
Anonymous id to merge into this person.
Merged with existing traits; new values win.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Your Flameup API key (passed as Bearer token)
Body
Your own user id. external_id and user_id are accepted aliases. Send only one — if two are present and disagree the request is rejected rather than one being picked for you.
Anonymous id to merge into this person.
Merged with existing traits; new values win.
Responses
IdentifiedPerson for a key without people:read — the common case for a pk_live_ key. The full Person for a key that holds people:read and could have read the record anyway. anyOf rather than oneOf because the trimmed shape is a subset of the full one and validates against both; the permission decides which you get, and that is not expressible in the schema.