Contacts API

Manage contacts — the people you track through your go-to-market process.

See also: Contacts & Companies concepts

Endpoints

MethodPathDescription
POST/contactsCreate a contact
GET/contactsList contacts
GET/contacts/:idGet a contact
PATCH/contacts/:idUpdate a contact
DELETE/contacts/:idDelete a contact
GET/contacts/:id/dealsList deals for a contact
GET/contacts/:id/activitiesList activities for a contact
GET/contacts/:id/tasksList tasks for a contact
POST/contacts/mergeMerge duplicate contacts

Create a contact

POST /contacts

Request body

FieldTypeRequiredDescription
emailstringyesEmail address (unique per org)
first_namestringnoFirst name
last_namestringnoLast name
phonestringnoPhone number
titlestringnoJob title
stagestringnoLifecycle stage: lead, prospect, customer, churned
sourcestringnoAcquisition source: organic, referral, paid, social, email, event, outbound, other
source_detailstringnoFreeform source detail (e.g. campaign name)
company_idstringnoLink to a company
owner_idstringnoAssigned team member
icp_scoreintegernoIdeal customer profile score
icp_score_reasonstringnoExplanation for the ICP score
icp_scored_atdatetimenoWhen the ICP score was computed
metadataobjectnoArbitrary key-value data

Example

curl -X POST "$REX_URL/contacts" \
  -H "X-Api-Key: $REX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "stage": "lead",
    "source": "organic"
  }'

Response

{
  "data": {
    "id": "cont_01HQ...",
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "stage": "lead",
    "source": "organic",
    "created_at": "2026-03-16T12:00:00Z",
    "updated_at": "2026-03-16T12:00:00Z"
  }
}

List contacts

GET /contacts

Query parameters

ParameterTypeDescription
cursorstringPagination cursor
limitintegerResults per page (default 50, max 200)
stagestringFilter by lifecycle stage
sourcestringFilter by acquisition source
company_idstringFilter by company
owner_idstringFilter by owner
searchstringSearch by name or email
icp_score_minintegerMinimum ICP score
icp_score_maxintegerMaximum ICP score
icp_scored_afterdatetimeICP score computed after this time
icp_scored_beforedatetimeICP score computed before this time
created_afterdatetimeCreated after this time
created_beforedatetimeCreated before this time

Example

curl "$REX_URL/contacts?stage=prospect&limit=25" \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": [
    {
      "id": "cont_01HQ...",
      "email": "ada@example.com",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "stage": "prospect",
      "source": "organic",
      "created_at": "2026-03-16T12:00:00Z",
      "updated_at": "2026-03-16T12:00:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6..."
}

Get a contact

GET /contacts/:id

Example

curl "$REX_URL/contacts/cont_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": {
    "id": "cont_01HQ...",
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "phone": "+1-555-0100",
    "title": "CTO",
    "stage": "prospect",
    "source": "organic",
    "company_id": "comp_01HQ...",
    "owner_id": "user_01HQ...",
    "icp_score": 85,
    "icp_score_reason": "Strong title match, target industry",
    "icp_scored_at": "2026-03-15T10:00:00Z",
    "metadata": {},
    "relationships": {
      "company": { "type": "company", "id": "comp_01HQ...", "name": "Acme Corp" },
      "owner": { "type": "user", "id": "user_01HQ...", "name": "Jane Smith" }
    },
    "created_at": "2026-03-16T12:00:00Z",
    "updated_at": "2026-03-16T12:00:00Z"
  },
  "included": [
    { "type": "company", "id": "comp_01HQ...", "name": "Acme Corp" }
  ]
}

Update a contact

PATCH /contacts/:id

All fields from the create request body are accepted. Only provided fields are updated.

Example

curl -X PATCH "$REX_URL/contacts/cont_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stage": "customer",
    "title": "VP Engineering"
  }'

Response

Returns the full updated contact object in the same format as Get a contact.

Delete a contact

DELETE /contacts/:id

Example

curl -X DELETE "$REX_URL/contacts/cont_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY"

Response

204 No Content on success.

List deals for a contact

GET /contacts/:id/deals

Returns deals linked to this contact. Supports cursor and limit query parameters.

Example

curl "$REX_URL/contacts/cont_01HQ.../deals" \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": [
    {
      "id": "deal_01HQ...",
      "name": "Acme Enterprise Plan",
      "pipeline_id": "pipe_01HQ...",
      "stage_id": "stg_01HQ...",
      "value": 500000,
      "currency": "USD",
      "status": "open",
      "created_at": "2026-03-16T12:00:00Z",
      "updated_at": "2026-03-16T12:00:00Z"
    }
  ],
  "has_more": false
}

List activities for a contact

GET /contacts/:id/activities

Returns activities linked to this contact. Supports cursor and limit query parameters.

Example

curl "$REX_URL/contacts/cont_01HQ.../activities" \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": [
    {
      "id": "act_01HQ...",
      "type": "email",
      "status": "completed",
      "subject": "Follow-up on proposal",
      "occurred_at": "2026-03-15T14:30:00Z",
      "created_at": "2026-03-15T14:30:00Z",
      "updated_at": "2026-03-15T14:30:00Z"
    }
  ],
  "has_more": false
}

List tasks for a contact

GET /contacts/:id/tasks

Returns tasks linked to this contact. Supports cursor and limit query parameters.

Example

curl "$REX_URL/contacts/cont_01HQ.../tasks" \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": [
    {
      "id": "task_01HQ...",
      "title": "Send contract",
      "priority": "high",
      "status": "pending",
      "due_at": "2026-03-20T17:00:00Z",
      "created_at": "2026-03-16T12:00:00Z",
      "updated_at": "2026-03-16T12:00:00Z"
    }
  ],
  "has_more": false
}

Merge duplicate contacts

POST /contacts/merge

Merges two contacts. The winner keeps its ID; the loser's relationships (deals, activities, tasks) transfer to the winner. The loser is deleted.

Request body

FieldTypeRequiredDescription
winner_idstringyesContact ID to keep
loser_idstringyesContact ID to merge into the winner and delete

Example

curl -X POST "$REX_URL/contacts/merge" \
  -H "X-Api-Key: $REX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "winner_id": "cont_01HQ...",
    "loser_id": "cont_01HQ..."
  }'

Response

Returns the merged (winner) contact in the same format as Get a contact.

Was this page helpful?

·