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

# Get Task Status

> Poll for automation task completion and results

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.narada.ai/fast/v2/remote-dispatch/responses/req_abc123def456' \
    -H 'x-api-key: YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    `https://api.narada.ai/fast/v2/remote-dispatch/responses/${requestId}`,
    {
      headers: {
        "x-api-key": process.env.NARADA_API_KEY,
      },
    }
  );

  const data = await response.json();
  console.log(data); // { "status": "success", "response": { "output": { "type": "text", "content": "Successfully clicked on Insurance header..." } }, "createdAt": "...", "completedAt": "..." }
  ```

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

  response = requests.get(
    f'https://api.narada.ai/fast/v2/remote-dispatch/responses/{request_id}',
    headers={'x-api-key': os.getenv('NARADA_API_KEY')}
  )

  data = response.json()
  print(data) # { "status": "success", "response": { "output": { "type": "text", "content": "Successfully clicked on Insurance header..." } }, "createdAt": "...", "completedAt": "..." }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Pending theme={null}
  {
    "status": "pending",
    "response": null,
    "createdAt": "2024-12-19T00:00:00.000000+00:00",
    "completedAt": null
  }
  ```

  ```json 200 Success theme={null}
  {
    "status": "success",
    "response": {
      "output": {
        "type": "text",
        "content": "Successfully clicked on Insurance header and navigated to the insurance section"
      }
    },
    "createdAt": "2024-12-19T00:00:00.000000+00:00",
    "completedAt": "2024-12-19T00:00:30.000000+00:00"
  }
  ```

  ```json 200 Error theme={null}
  {
    "status": "error",
    "response": null,
    "createdAt": "2024-12-19T00:00:00.000000+00:00",
    "completedAt": "2024-12-19T00:00:30.000000+00:00"
  }
  ```

  ```json 200 Input Required theme={null}
  {
    "status": "input-required",
    "response": {
      "output": {
        "type": "text",
        "content": "The operation could not be completed without additional user input."
      }
    },
    "createdAt": "2024-12-19T00:00:00.000000+00:00",
    "completedAt": null
  }
  ```
</ResponseExample>

Use this endpoint to poll for the completion status and results of a previously submitted automation task. This is an alternative to using webhooks for receiving task results.

## Authorization

<ParamField header="x-api-key" type="string" required>
  Your Narada API key for authentication. Must be the same key used to create
  the original task.
</ParamField>

## Path Parameters

<ParamField path="requestId" type="string" required>
  The unique identifier returned from the [Remote Dispatch
  API](/api-reference/remote-dispatch) when the task was created.
</ParamField>

## Response

<ResponseField name="status" type="string" required>
  Current status of the automation task. Possible values:

  * `"pending"` - Task is still running
  * `"success"` - Task completed successfully
  * `"error"` - Task failed with an error
  * `"input-required"` - Task requires additional user input to continue
</ResponseField>

<ResponseField name="browserWindowId" type="string | null">
  The browser window ID where the task was executed. `null` if not applicable.
</ResponseField>

<ResponseField name="response" type="object | null">
  Task response data. `null` when status is `"pending"`.

  <Expandable title="Response Object Properties">
    <ResponseField name="output" type="object">
      The agent's output. Either a text response or structured data, depending on whether `responseFormat` was provided:

      ```typescript theme={null}
      { type: "text", content: string }
      | { type: "structured", content: object }
      ```
    </ResponseField>

    <ResponseField name="actionTrace" type="array | null">
      A detailed log of every action the agent took during execution. See [Action Trace](/documentation/action-trace) for the trace format.
    </ResponseField>

    <ResponseField name="text" type="string" deprecated>
      Deprecated. Use `output.content` instead.
    </ResponseField>

    <ResponseField name="structuredOutput" type="object | null" deprecated>
      Deprecated. Use `output.content` instead (when `output.type` is `"structured"`). See [Structured Output](/documentation/structured-output) for details.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO 8601 timestamp when the task was initially created.
</ResponseField>

<ResponseField name="completedAt" type="string | null">
  ISO 8601 timestamp when the task completed. `null` if still pending.
</ResponseField>

<ResponseField name="usage" type="object | null">
  Usage statistics for the task. `null` if not yet available.

  <Expandable title="Usage Object Properties">
    <ResponseField name="actions" type="integer">
      Number of actions performed during execution.
    </ResponseField>

    <ResponseField name="credits" type="number">
      Credits consumed by the task.
    </ResponseField>
  </Expandable>
</ResponseField>

## Response Handling Options

This endpoint provides synchronous access to task results. For production applications, consider these alternatives:

<CardGroup cols={2}>
  <Card title="Webhooks (Recommended)" icon="bell" href="/documentation/webhooks">
    Receive real-time notifications when tasks complete. More efficient and scalable than polling.
  </Card>

  <Card title="Polling Implementation" icon="arrows-rotate" href="/documentation/polling">
    Complete polling implementation examples with error handling and best practices.
  </Card>
</CardGroup>

<Warning>
  **Rate Limiting**: Implement reasonable polling intervals (5-10 seconds) to
  avoid overwhelming the API. Use exponential backoff for production
  applications.
</Warning>

## Comparison: Polling vs Webhooks

| Feature               | Polling                  | Webhooks            |
| --------------------- | ------------------------ | ------------------- |
| **Setup Complexity**  | Low                      | Medium              |
| **Real-time Updates** | No (delayed by interval) | Yes                 |
| **Resource Usage**    | Higher (active requests) | Lower               |
| **Reliability**       | Medium                   | High (with retries) |
| **Firewall Friendly** | Yes                      | Requires open ports |
