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

# GET /v1/crm/tasks/:id

> Fetch a single task by id.

Returns one task.

## Endpoint

```
GET https://api.keebai.com/v1/crm/tasks/{id}
```

## Required scope

`crm:tasks:read`

## Headers

| Header          | Required | Value                    |
| --------------- | -------- | ------------------------ |
| `Authorization` | Yes      | `Bearer kbai_pk_<token>` |

## Path parameters

| Field | Type     | Required | Description             |
| ----- | -------- | -------- | ----------------------- |
| `id`  | `string` | Yes      | `ObjectId` of the task. |

## Example request

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.keebai.com/v1/crm/tasks/65a1f2b3c4d5e6f7a8b9c0d1 \
    -H "Authorization: Bearer kbai_pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  ```

  ```js JavaScript theme={null}
  const response = await fetch(`https://api.keebai.com/v1/crm/tasks/${taskId}`, {
    headers: { Authorization: `Bearer ${process.env.KEEBAI_API_TOKEN}` },
  });
  const { task } = await response.json();
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
      f"https://api.keebai.com/v1/crm/tasks/{task_id}",
      headers={"Authorization": f"Bearer {os.environ['KEEBAI_API_TOKEN']}"},
      timeout=10,
  )
  resp.raise_for_status()
  task = resp.json()["task"]
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={null}
{
  "task": {
    "_id": "65a1f2b3c4d5e6f7a8b9c0d1",
    "title": "Llamar a Juan Pérez",
    "description": "Confirmar propuesta del plan anual",
    "status": "pending",
    "priority": "high",
    "assigned_to": "68e1f2a3b4c5d6e7f8a9b0c1",
    "due_at": "2026-05-05T13:00:00.000Z",
    "created_at": "2026-05-02T14:31:07.221Z",
    "updated_at": "2026-05-02T14:31:07.221Z"
  }
}
```

### 401 Unauthorized

Missing, invalid, revoked, or expired token.

### 403 Forbidden

The token does not have the `crm:tasks:read` scope.

### 404 Not Found

No task with that id, or the task belongs to a different company.


## OpenAPI

````yaml GET /v1/crm/tasks/{id}
openapi: 3.0.0
info:
  title: Keebai Public API
  description: Superficie pública REST autenticada con Personal Access Tokens (PAT).
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.keebai.com
    description: Production
security: []
tags: []
paths:
  /v1/crm/tasks/{id}:
    get:
      tags:
        - crm-tasks
      summary: Obtener detalle de una tarea
      operationId: PublicTasksController_get
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTaskEnvelopeDto'
      security:
        - PAT: []
components:
  schemas:
    PublicTaskEnvelopeDto:
      type: object
      properties:
        task:
          $ref: '#/components/schemas/PublicTaskResponseDto'
      required:
        - task
    PublicTaskResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: ObjectId de la tarea
        title:
          type: string
        description:
          type: string
        status:
          type: string
          description: >-
            Estado libre. Los valores del portal son pending, in_progress,
            completed y cancelled.
        priority:
          type: string
          enum:
            - low
            - medium
            - high
            - urgent
        assigned_to:
          type: string
          description: ObjectId del usuario asignado
        due_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - _id
        - title
        - status
        - priority
        - created_at
        - updated_at
  securitySchemes:
    PAT:
      scheme: bearer
      bearerFormat: kbai_pk_<hex>
      type: http
      description: >-
        Personal Access Token con prefijo `kbai_pk_`. Generar desde el portal
        con permiso `developer.manage_tokens`.

````