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

# The Request object

> An asynchronous unit of work — its state, and its result or error when it lands.

Slow Workbench products return a request instead of an inline result. You get its id from the accepting `POST`, then read it at `GET /v1/requests/:id` — or catch a `request.completed` / `request.failed` [webhook](/api-reference/webhook-endpoint). See [Requests](/guides/requests) for the full lifecycle.

Pending:

```json theme={null}
{ "id": "req_8f2c...", "product": "extract", "state": "pending" }
```

Completed:

```json theme={null}
{
  "id": "req_8f2c...",
  "product": "extract",
  "state": "completed",
  "result": { "…": "the product's result object" }
}
```

Failed:

```json theme={null}
{
  "id": "req_8f2c...",
  "product": "extract",
  "state": "failed",
  "error": { "code": "internal_server_error", "message": "Extract timed out" }
}
```

## Attributes

<ResponseField name="id" type="string" required>
  The request id (`req_…`). The same string in the accepting response, this poll, and the webhook.
</ResponseField>

<ResponseField name="product" type="string" required>
  The Workbench product that owns the work, e.g. `extract`.
</ResponseField>

<ResponseField name="state" type="enum" required>
  One of `pending`, `completed`, or `failed`.
</ResponseField>

<ResponseField name="result" type="object">
  The product's result object. Present only when `state` is `completed`. For extract this is [The Extract Result object](/api-reference/extract).
</ResponseField>

<ResponseField name="error" type="object">
  Present only when `state` is `failed`.

  <Expandable title="properties">
    <ResponseField name="code" type="string">
      Stable machine-readable code. See [Errors](/api-reference/errors).
    </ResponseField>

    <ResponseField name="message" type="string">
      Human-readable explanation.
    </ResponseField>
  </Expandable>
</ResponseField>

A request id from another workspace returns `404`. The webhook payload carries this same object as its `data`; dedupe on `id`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.