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

# Get Task

> Get a single task by ID

Retrieve a single task by its ID.

<ParamField path="id" type="string" required>
  Task ID.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.v2.dealmachine.com/v1/tasks/task_001" \
    -H "Authorization: Bearer dm_sk_live_xxx"
  ```

  ```typescript Node.js theme={null}
  const response = await fetch(
    `https://api.v2.dealmachine.com/v1/tasks/${taskId}`,
    {
      headers: { Authorization: `Bearer ${apiKey}` },
    }
  );

  const { data } = await response.json();
  console.log(`${data.title} — ${data.is_completed ? "done" : "open"}`);
  ```

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

  response = requests.get(
      f"https://api.v2.dealmachine.com/v1/tasks/{task_id}",
      headers={"Authorization": f"Bearer {api_key}"},
  )

  data = response.json()["data"]
  print(f"{data['title']} — {'done' if data['is_completed'] else 'open'}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": {
      "id": "task_001",
      "organization_id": 1,
      "opportunity_id": "42",
      "property_id": "prop_12345",
      "person_id": null,
      "created_by_user_id": 5,
      "assigned_to_user_id": 12,
      "assigned_to_agent_id": null,
      "title": "Schedule property walkthrough",
      "description": "Contact seller to arrange a visit",
      "is_completed": false,
      "completed_at": null,
      "completed_by_user_id": null,
      "due_date": "2026-03-10T00:00:00Z",
      "sort_order": 0,
      "created_at": "2026-03-01T09:00:00Z",
      "updated_at": "2026-03-01T09:00:00Z"
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": {
      "code": "task_not_found",
      "message": "Task not found"
    }
  }
  ```
</ResponseExample>
