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

# Respond to action request

> Answer the retrieval request's open client action request (the request is `action_required` and `pending_action_request` is set). A request has at most one open action request at a time; this endpoint always answers that one. Send a text `message`, and optionally attach one file uploaded with [Request presigned upload URL](/api-reference/v2/endpoint/cases/sign-upload). Some action requests require an attachment: a missing HIPAA authorization must be answered with a signed PDF. A rejected response returns `400` and leaves the action request open so you can retry. See [Responding to action requests](/guides/v2/retrieval-guide#responding-to-action-requests).



## OpenAPI

````yaml POST /v2/retrieval-requests/{retrieval_request_id}/action-response
openapi: 3.0.1
info:
  title: Tavrn Platform API
  version: 1.0.0
  description: >-
    Enterprise API for medical record retrieval: cases, retrieval requests,
    retrieved records and provider invoices, case documents, and webhook
    notifications.
  contact:
    name: Tavrn Support
    email: contact@tavrn.ai
servers:
  - url: https://enterprise.tavrn.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Cases
    description: Case management operations
  - name: Documents
    description: Document upload and management
  - name: Retrieval Requests
    description: Medical record retrieval requests submitted to healthcare facilities
  - name: Requestors
    description: Multiple retrieval profiles within one organization
  - name: Webhooks
    description: Webhook registration and event notifications
paths:
  /v2/retrieval-requests/{retrieval_request_id}/action-response:
    post:
      tags:
        - Retrieval Requests
      summary: Respond to action request
      description: >-
        Answer the retrieval request's open client action request (the request
        is `action_required` and `pending_action_request` is set). A request has
        at most one open action request at a time; this endpoint always answers
        that one. Send a text `message`, and optionally attach one file uploaded
        with [Request presigned upload
        URL](/api-reference/v2/endpoint/cases/sign-upload). Some action requests
        require an attachment: a missing HIPAA authorization must be answered
        with a signed PDF. A rejected response returns `400` and leaves the
        action request open so you can retry. See [Responding to action
        requests](/guides/v2/retrieval-guide#responding-to-action-requests).
      operationId: respondToActionRequest
      parameters:
        - name: retrieval_request_id
          in: path
          required: true
          description: Retrieval request ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActionResponseCreate'
      responses:
        '200':
          description: Response recorded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: >-
            Validation error: missing or too-long `message`, invalid
            `requester_email`, an `upload_id` that is unknown, expired, already
            used, empty, or belongs to a different case, or an attachment the
            action request does not accept (for example a non-PDF HIPAA
            authorization). The action request stays open.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: API key lacks the `retrievals:write` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Retrieval request not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The retrieval request has no open action request (none was raised,
            or it was already answered or resolved)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ActionResponseCreate:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          minLength: 1
          maxLength: 10000
          description: >-
            Your answer to the action request. Leading and trailing whitespace
            is trimmed; must not be empty.
          example: Approved. Please pay the $85.00 invoice.
        requester_email:
          type: string
          format: email
          description: >-
            Email of the person at your firm who answered. Recorded as the
            responder; defaults to the API key.
          example: paralegal@yourfirm.com
        attachment:
          $ref: '#/components/schemas/ActionResponseAttachment'
    ActionResponse:
      type: object
      required:
        - id
        - retrieval_request_id
        - status
        - responded_at
      properties:
        id:
          type: string
          description: >-
            ID of the action request that was answered (matches
            `pending_action_request.id`)
          example: car_abc123
        retrieval_request_id:
          type: string
          example: rr_abc123
        status:
          type: string
          enum:
            - responded
          example: responded
        responded_at:
          type: string
          format: date-time
          example: '2025-02-03T16:05:00Z'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: validation_error
            message:
              type: string
              description: Human-readable error message
              example: The patient.date_of_birth field is required
    ActionResponseAttachment:
      type: object
      required:
        - upload_id
      description: >-
        A file to send with the response, uploaded under the retrieval request's
        case.
      properties:
        upload_id:
          type: string
          description: >-
            `upload_id` from [Request presigned upload
            URL](/api-reference/v2/endpoint/cases/sign-upload) for the retrieval
            request's case. PUT the file to `upload_url` within 15 minutes, then
            use the `upload_id` within one hour. Each `upload_id` can be used
            once.
          example: 11111111-1111-4111-8111-111111111111
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Use format: `Authorization: Bearer
        tavrn_sk_live_...`

````