The Rex API is a JSON HTTP API. All endpoints are relative to your tenant base URL (https://{subdomain}.rexgtm.com).
Include your API key in every request:
curl https://acme.rexgtm.com/contacts \
-H "X-Api-Key: rex_live_..."
See Authentication for key scopes and rate limits.
All list endpoints use cursor-based pagination:
curl "$REX_URL/contacts?limit=25&cursor=eyJpZCI6..."
-H "X-Api-Key: $REX_API_KEY"
Response includes pagination metadata:
{
"data": [ ... ],
"meta": {
"cursor": "eyJpZCI6...",
"has_more": true
}
}
Pass the returned cursor as a query parameter to fetch the next page. When has_more is false, you've reached the end.
List endpoints accept query parameters for filtering:
# Contacts with stage "prospect"
GET /contacts?stage=prospect
# Deals in a specific pipeline
GET /deals?pipeline_id=pipe_01HQ...
# Activities for a contact
GET /activities?contact_id=cont_01HQ...
Request only the fields you need with the fields parameter:
GET /contacts?fields=id,email,first_name,stage
Eager-load related data with the include parameter:
GET /contacts/cont_01HQ...?include=company,activities
GET /contacts?sort=-created_at # newest first
GET /deals?sort=value # lowest value first
Prefix with - for descending order.
Single entity:
{
"data": {
"id": "cont_01HQ...",
"email": "ada@example.com",
...
}
}
List:
{
"data": [ ... ],
"meta": {
"cursor": "...",
"has_more": true
}
}
Error:
{
"error": {
"code": "not_found",
"message": "Contact not found"
}
}
All entity IDs use the TypeID format — a type prefix followed by a ULID:
| Entity | Prefix | Example |
|---|---|---|
| Contact | cont_ | cont_01HQ2X4G5... |
| Company | comp_ | comp_01HQ2X4G5... |
| Deal | deal_ | deal_01HQ2X4G5... |
| Pipeline | pipe_ | pipe_01HQ2X4G5... |
| Activity | act_ | act_01HQ2X4G5... |
| Task | task_ | task_01HQ2X4G5... |
| Product | prod_ | prod_01HQ2X4G5... |
| Event | evt_ | evt_01HQ2X4G5... |
| Webhook | wh_ | wh_01HQ2X4G5... |
The complete OpenAPI 3.0 specification is available at:
GET /openapi.yaml
Use it to generate client libraries, explore in Swagger UI, or feed to AI agents for schema discovery.
Browse detailed endpoint documentation for each resource: