> ## Documentation Index
> Fetch the complete documentation index at: https://guide.rolodexcrm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Tasks

## `GET` Tasks

`GET` `/user-api/v1/tasks`

### Headers

| Header              | Value               |
| ------------------- | ------------------- |
| `x-rolodex-api-key` | `f1e2d3c4b5a697...` |

### Query Parameters

<ParamField path="limit" type="string">
  Set a limit to the number of records to return (Default:25)
</ParamField>

<ParamField path="offset" type="string">
  Number of records to skip.
</ParamField>

<ParamField path="order_by" type="string">
  Sort order: `due_date:asc`, `due_date:desc`
</ParamField>

<ParamField path="include" type="string">
  Related data to include: `tags`
</ParamField>

### Response

```json theme={null}
{
  "pagination": {
    "limit": 25,
    "offset": 0,
    "total": 75
  },
  "data": [
    {
      "id": "task_12345",
      "body": "Follow up with prospect about pricing",
      "due_date": "2025-01-20T15:00:00Z",
      "completed_at": null,
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z",
      "contacts": [
        {
          "id": "contact_123",
          "full_name": "John Doe",
          "image_url": "https://example.com/avatar.jpg"
        }
      ],
      "assignee": {
        "id": "user_456",
        "full_name": "Alice Smith",
        "avatar_url": "https://example.com/user-avatar.jpg"
      },
      "creator": {
        "id": "user_789",
        "full_name": "Bob Johnson",
        "avatar_url": "https://example.com/creator-avatar.jpg"
      }
    },
    {
      "id": "task_67890",
      "body": "Schedule demo for next week",
      "due_date": "2025-01-18T14:00:00Z",
      "completed_at": "2025-01-17T11:30:00Z",
      "created_at": "2025-01-14T09:15:00Z",
      "updated_at": "2025-01-17T11:30:00Z",
      "contacts": [],
      "assignee": null,
      "creator": {
        "id": "user_789",
        "full_name": "Bob Johnson",
        "avatar_url": "https://example.com/creator-avatar.jpg"
      }
    }
  ]
}
```

### With Include Parameters

`GET` `/user-api/v1/tasks?include=tags`

### Response with all includes

```json theme={null}
{
  "pagination": {
    "limit": 25,
    "offset": 0,
    "total": 75
  },
  "data": [
    {
      "id": "task_12345",
      "body": "Follow up with prospect about pricing",
      "due_date": "2025-01-20T15:00:00Z",
      "completed_at": null,
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z",
      "contacts": [
        {
          "id": "contact_123",
          "full_name": "John Doe",
          "image_url": "https://example.com/avatar.jpg"
        }
      ],
      "assignee": {
        "id": "user_456",
        "full_name": "Alice Smith",
        "avatar_url": "https://example.com/user-avatar.jpg"
      },
      "creator": {
        "id": "user_789",
        "full_name": "Bob Johnson",
        "avatar_url": "https://example.com/creator-avatar.jpg"
      },
      "tags": [
        {
          "id": "tag_101",
          "name": "High Priority"
        },
        {
          "id": "tag_102",
          "name": "Sales"
        }
      ]
    }
  ]
}
```

## `GET` a Task

`GET` `/user-api/v1/tasks/:id`

### Path Parameters

<ParamField path="id" type="string">
  Task ID

  ### Query Parameters

  <ParamField path="include" type="string">
    Related data to include: tags
  </ParamField>
</ParamField>

### Endpoint Example

`GET` `/user-api/v1/tasks/task_12345?include=tags`

### Response

```json theme={null}
{
  "data": {
    "id": "task_12345",
    "body": "Follow up with prospect about pricing",
    "due_date": "2025-01-20T15:00:00Z",
    "completed_at": null,
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T10:30:00Z",
    "contacts": [
      {
        "id": "contact_123",
        "full_name": "John Doe",
        "image_url": "https://example.com/avatar.jpg"
      }
    ],
    "assignee": {
      "id": "user_456",
      "full_name": "Alice Smith",
      "avatar_url": "https://example.com/user-avatar.jpg"
    },
    "creator": {
      "id": "user_789",
      "full_name": "Bob Johnson",
      "avatar_url": "https://example.com/creator-avatar.jpg"
    }
  }
}
```
