Tasks API

Manage tasks — to-do items linked to contacts, companies, and deals.

See also: Activities & Tasks concepts

Endpoints

MethodPathDescription
POST/tasksCreate a task
GET/tasksList tasks
GET/tasks/:idGet a task
PATCH/tasks/:idUpdate a task
DELETE/tasks/:idDelete a task

Create a task

POST /tasks

Request body

FieldTypeRequiredDescription
titlestringyesTask title
descriptionstringnoDetailed description
contact_idstringnoAssociated contact
company_idstringnoAssociated company
deal_idstringnoAssociated deal
owner_idstringnoAssigned to (the person responsible)
due_atdatetimenoDue date
prioritystringnoPriority: low, normal, high, urgent
statusstringnoStatus: pending, completed, cancelled
metadataobjectnoArbitrary key-value data

Example

curl -X POST "$REX_URL/tasks" \
  -H "X-Api-Key: $REX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Send contract to Ada",
    "contact_id": "cont_01HQ...",
    "deal_id": "deal_01HQ...",
    "owner_id": "user_01HQ...",
    "due_at": "2026-03-20T17:00:00Z",
    "priority": "high"
  }'

Response

{
  "data": {
    "id": "task_01HQ...",
    "title": "Send contract to Ada",
    "contact_id": "cont_01HQ...",
    "deal_id": "deal_01HQ...",
    "owner_id": "user_01HQ...",
    "due_at": "2026-03-20T17:00:00Z",
    "priority": "high",
    "status": "pending",
    "created_at": "2026-03-16T12:00:00Z",
    "updated_at": "2026-03-16T12:00:00Z"
  }
}

List tasks

GET /tasks

Query parameters

ParameterTypeDescription
cursorstringPagination cursor
limitintegerResults per page (default 50, max 200)
statusstringFilter by status: pending, completed, cancelled
prioritystringFilter by priority: low, normal, high, urgent
contact_idstringFilter by contact
company_idstringFilter by company
deal_idstringFilter by deal
owner_idstringFilter by assigned owner
due_beforedatetimeTasks due before this time
due_afterdatetimeTasks due after this time

Example

curl "$REX_URL/tasks?status=pending&priority=high&owner_id=user_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY"

Response

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

Get a task

GET /tasks/:id

Example

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

Response

{
  "data": {
    "id": "task_01HQ...",
    "title": "Send contract to Ada",
    "description": "Enterprise plan contract, annual billing",
    "contact_id": "cont_01HQ...",
    "company_id": "comp_01HQ...",
    "deal_id": "deal_01HQ...",
    "owner_id": "user_01HQ...",
    "created_by": "user_02HQ...",
    "due_at": "2026-03-20T17:00:00Z",
    "priority": "high",
    "status": "pending",
    "metadata": {},
    "relationships": {
      "contact": { "type": "contact", "id": "cont_01HQ...", "name": "Ada Lovelace" },
      "deal": { "type": "deal", "id": "deal_01HQ...", "name": "Acme Enterprise Plan" },
      "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": "contact", "id": "cont_01HQ...", "name": "Ada Lovelace" }
  ]
}

Update a task

PATCH /tasks/:id

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

Example

curl -X PATCH "$REX_URL/tasks/task_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "completed",
    "completed_at": "2026-03-18T10:00:00Z"
  }'

Response

Returns the full updated task in the same format as Get a task.

Delete a task

DELETE /tasks/:id

Example

curl -X DELETE "$REX_URL/tasks/task_01HQ..." \
  -H "X-Api-Key: $REX_API_KEY"

Response

204 No Content on success.

Was this page helpful?

·