Track interactions with contacts and deals — calls, emails, meetings, notes, and custom activity types.
See also: Activities & Tasks concepts
| Method | Path | Description |
|---|---|---|
| POST | /activities | Create an activity |
| GET | /activities | List activities |
| GET | /activities/:id | Get an activity |
| PATCH | /activities/:id | Update an activity |
| DELETE | /activities/:id | Delete an activity |
POST /activities
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | Activity type: call, email, meeting, note, task, custom, other |
subtype | string | no | Freeform subtype (e.g. reply, bounce, demo) |
status | string | no | Status: draft, completed, scheduled, rejected |
subject | string | no | One-line summary |
body | string | no | Full content or notes |
contact_id | string | no | Associated contact |
company_id | string | no | Associated company |
deal_id | string | no | Associated deal |
owner_id | string | no | Who performed the activity |
occurred_at | datetime | no | When it happened (defaults to now) |
duration | integer | no | Duration in seconds |
direction | string | no | Direction: inbound, outbound, na |
source | string | no | Where this activity came from (e.g. gmail, instantly) |
external_id | string | no | ID in the source system for dedup |
metadata | object | no | Arbitrary key-value data |
AI-generated activities can also include generated_by, confidence_score, and model fields. See the OpenAPI spec for the complete field list.
curl -X POST "$REX_URL/activities" \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "call",
"status": "completed",
"subject": "Discovery call with Ada",
"contact_id": "cont_01HQ...",
"deal_id": "deal_01HQ...",
"occurred_at": "2026-03-16T14:00:00Z",
"duration": 1800,
"direction": "outbound"
}'
{
"data": {
"id": "act_01HQ...",
"type": "call",
"status": "completed",
"subject": "Discovery call with Ada",
"contact_id": "cont_01HQ...",
"deal_id": "deal_01HQ...",
"occurred_at": "2026-03-16T14:00:00Z",
"duration": 1800,
"direction": "outbound",
"created_at": "2026-03-16T14:00:00Z",
"updated_at": "2026-03-16T14:00:00Z"
}
}
GET /activities
| Parameter | Type | Description |
|---|---|---|
cursor | string | Pagination cursor |
limit | integer | Results per page (default 50, max 200) |
type | string | Filter by activity type |
status | string | Filter by status |
subtype | string | Filter by subtype |
source | string | Filter by source |
contact_id | string | Filter by contact |
company_id | string | Filter by company |
deal_id | string | Filter by deal |
owner_id | string | Filter by owner |
after | datetime | Only activities occurring after this time |
before | datetime | Only activities occurring before this time |
curl "$REX_URL/activities?type=email&contact_id=cont_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
{
"data": [
{
"id": "act_01HQ...",
"type": "email",
"status": "completed",
"subject": "Follow-up on proposal",
"contact_id": "cont_01HQ...",
"occurred_at": "2026-03-15T14:30:00Z",
"direction": "outbound",
"created_at": "2026-03-15T14:30:00Z",
"updated_at": "2026-03-15T14:30:00Z"
}
],
"has_more": false
}
GET /activities/:id
curl "$REX_URL/activities/act_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
{
"data": {
"id": "act_01HQ...",
"type": "call",
"status": "completed",
"subject": "Discovery call with Ada",
"body": "Discussed requirements. Ada interested in enterprise plan.",
"contact_id": "cont_01HQ...",
"deal_id": "deal_01HQ...",
"owner_id": "user_01HQ...",
"occurred_at": "2026-03-16T14:00:00Z",
"duration": 1800,
"direction": "outbound",
"source": "manual",
"metadata": {},
"relationships": {
"contact": { "type": "contact", "id": "cont_01HQ...", "name": "Ada Lovelace" },
"deal": { "type": "deal", "id": "deal_01HQ...", "name": "Acme Enterprise Plan" }
},
"created_at": "2026-03-16T14:00:00Z",
"updated_at": "2026-03-16T14:00:00Z"
},
"included": [
{ "type": "contact", "id": "cont_01HQ...", "name": "Ada Lovelace" }
]
}
PATCH /activities/:id
All fields from the create request body are accepted. Only provided fields are updated.
curl -X PATCH "$REX_URL/activities/act_01HQ..." \
-H "X-Api-Key: $REX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "Discussed requirements. Ada interested in enterprise plan. Follow-up scheduled for next week."
}'
Returns the full updated activity in the same format as Get an activity.
DELETE /activities/:id
curl -X DELETE "$REX_URL/activities/act_01HQ..." \
-H "X-Api-Key: $REX_API_KEY"
204 No Content on success.