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

# Download DOCX

Download a completed Response to Office Action document in DOCX format.

## Authentication

This endpoint uses **signed URL tokens** instead of API keys. The token is included
in the `download_url` from the Poll Draft Status endpoint response.

No `X-API-Key` header is needed -- the token IS the authentication.

## Token expiration

Download tokens expire after **1 hour**. If the token has expired, re-poll the
draft status endpoint to get a fresh URL:

```bash theme={null}
# Get fresh download URL
curl -H "X-API-Key: abi_sk_..." \
  https://api.abigail.app/v1/openclaw/draft-roa/status/roa_abc123

# Use the new download_url from the response
curl -o response.docx \
  "https://api.abigail.app/v1/openclaw/download/roa_abc123?token=eyJhbGci..."
```


## OpenAPI

````yaml api-reference/downloads/openapi.json get /v1/openclaw/download/{job_id}
openapi: 3.1.0
info:
  title: Abigail API
  description: >-
    Patent prosecution AI API. Analyze office actions, draft response documents,
    and access examiner intelligence.
  version: 1.0.0
  contact:
    name: Abigail Support
    url: https://abigail.app
    email: support@abigail.app
servers:
  - url: https://api.abigail.app
    description: Production
security: []
paths:
  /v1/openclaw/download/{job_id}:
    get:
      tags:
        - Downloads
      summary: Download DOCX
      description: >-
        Download a completed ROA document in DOCX format.


        Authenticated via a signed URL token (included in the draft status
        response). No API key needed -- the token IS the auth.


        Tokens expire after 1 hour. Re-poll `/draft-roa/status/{job_id}` for a
        fresh URL.
      operationId: download_docx
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
        - name: token
          in: query
          required: true
          description: Signed JWT download token from the draft status response.
          schema:
            type: string
      responses:
        '200':
          description: DOCX file ready for download
          content:
            application/vnd.openxmlformats-officedocument.wordprocessingml.document:
              schema:
                type: string
                format: binary
        '401':
          description: Invalid or expired download token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      description: Structured error with agent_suggestion for LLM consumers.
      properties:
        error:
          type: boolean
          const: true
        error_code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        agent_suggestion:
          type: string
          description: Actionable suggestion for AI agents consuming this API.

````