Customers
Manage tracked users and their state
Get customer statistics
Authorization
bearerAuth AuthorizationBearer <token>
API key (rt_live_... or rt_test_...)
In: header
Response Body
application/json
curl -X GET "https://retivo.ai/api/customers/stats"{
"stats": {
"total": 0,
"active": 0,
"at_risk": 0,
"churned": 0
}
}List customers
Authorization
bearerAuth AuthorizationBearer <token>
API key (rt_live_... or rt_test_...)
In: header
Response Body
application/json
curl -X GET "https://retivo.ai/api/customers"{
"customers": [
{
"id": "string",
"name": "string",
"email": "string",
"company": "string",
"role": "string",
"team_size": 0,
"locale": "string",
"lifecycle_stage": "string",
"health": 0,
"engagement_score": 0,
"expansion_score": 0,
"risk_level": "string",
"last_activity_at": "string",
"created_at": "string",
"next_action": {
"channel": "string",
"status": "string",
"playbook": "string"
}
}
]
}Create a customer
Authorization
bearerAuth AuthorizationBearer <token>
API key (rt_live_... or rt_test_...)
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://retivo.ai/api/customers" \ -H "Content-Type: application/json" \ -d '{ "user_id": "string" }'{
"user": {
"property1": null,
"property2": null
}
}{
"user": {
"property1": null,
"property2": null
}
}Get customer detail
Authorization
bearerAuth AuthorizationBearer <token>
API key (rt_live_... or rt_test_...)
In: header
Path Parameters
id*string
Customer user ID
Length
1 <= lengthResponse Body
application/json
application/json
curl -X GET "https://retivo.ai/api/customers/string"{
"customer": {
"id": "string",
"name": "string",
"email": "string",
"company": "string",
"role": "string",
"team_size": 0,
"locale": "string",
"lifecycle_stage": "string",
"health": 0,
"engagement_score": 0,
"expansion_score": 0,
"risk_level": "string",
"last_activity_at": "string",
"created_at": "string",
"milestone_progress": null,
"segment_memberships": null
},
"events": [
{
"property1": null,
"property2": null
}
],
"interventions": [
{
"property1": null,
"property2": null
}
]
}{
"error": "string"
}