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

# Get Work Order

> Retrieve details of a work order

<ParamField path="id" type="string" required>
  Work order ID (format: `wo_xxxxx`).
</ParamField>

<ResponseField name="id" type="string">
  Work order identifier.
</ResponseField>

<ResponseField name="taskPrompt" type="string">
  The task description.
</ResponseField>

<ResponseField name="workspaceSource" type="object">
  Workspace source configuration.
</ResponseField>

<ResponseField name="runId" type="string">
  Associated run identifier.
</ResponseField>

<ResponseField name="status" type="string">
  Current status of the work order.
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp of creation.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://agentgate.mynewapi.com/v1/work-orders/wo_abc123 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "wo_abc123xyz",
    "taskPrompt": "Add input validation to the user registration endpoint",
    "workspaceSource": {
      "type": "git",
      "repository": "https://github.com/your-org/your-repo",
      "branch": "main"
    },
    "runId": "run_def456uvw",
    "status": "running",
    "maxIterations": 5,
    "tenantContext": {
      "tenantId": "acme-corp",
      "tenantUserId": "user_123"
    },
    "createdAt": "2024-01-15T10:30:00Z"
  }
  ```

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