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

# Where an action request stands

> Status of a request from gates-api/actions/request. `wait_seconds` (≤ 25) holds the call until the status changes. Once `approved`, `token` is the action token (claims.act) for `token_expires_in` seconds — check it with sdk/verify-token; it works once. After the collection window (10 minutes from the approval) the status stays `approved` with `token: null`.



## OpenAPI

````yaml /openapi.json get /gates-api/actions/request-status
openapi: 3.1.0
info:
  title: BotShield API
  version: 2.0.0
  description: >-
    The BotShield partner API.


    **BotShield Gate** — ask whether a live human is present (Human Gate) or
    over an age threshold (Age Gate). The person confirms with their passkey in
    the BotShield app and you receive a signed result. Partners learn *that* a
    user is human, never *who*.


    **Agents Ask** — your agent proposes an action, a verified human confirms or
    denies it, and BotShield signs a Proof of Resolution you can verify offline.


    **Gates API** — place and run gates and BotShield Actions from your server.


    **Verified Accounts** — a person links their account on your platform with a
    passkey; your server reads the status and the registry, and can unlink
    (revoke) an account with its API key.


    Every operation answers HTTP 200 with a `data` envelope; handler errors
    arrive as `data.error`. See the API overview and error reference. In the
    `botshield-sdk` package (2.2.1) these operations live under
    `client.census.*`, `client.verification.*`, `client.gates.*`,
    `client.securedAccounts.*` and `client.actions.*`.
  contact:
    name: BotShield Support
    email: support@botshield.ai
    url: https://botshield.ai
servers:
  - url: https://api.botshield.ai/operations
    description: Production
security: []
tags:
  - name: BotShield Gate
    description: >-
      Ask whether a present human (Human Gate) or a human over an age threshold
      (Age Gate) confirmed, and verify the signed result.
  - name: Gates API
    description: >-
      Place, open, extend and close gates, and place BotShield Actions, from
      your server with an API key that has the `gates:write` scope.
  - name: Verified Accounts
    description: >-
      Read and end the Verified Accounts on your platform from your server with
      your API key: status, the registry, and revoke (unlink).
  - name: Agents Ask
    description: >-
      Your agent proposes an action; a verified human confirms or denies it in
      the BotShield app; you receive a signed Proof of Resolution.
paths:
  /gates-api/actions/request-status:
    get:
      tags:
        - Gates API
      summary: Where an action request stands
      description: >-
        Status of a request from gates-api/actions/request. `wait_seconds` (≤
        25) holds the call until the status changes. Once `approved`, `token` is
        the action token (claims.act) for `token_expires_in` seconds — check it
        with sdk/verify-token; it works once. After the collection window (10
        minutes from the approval) the status stays `approved` with `token:
        null`.
      operationId: GatesApiActionsRequestStatus
      parameters:
        - name: request_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: wait_seconds
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 25
      responses:
        '200':
          description: >-
            The request. Errors as data.error — codes: `invalid_key`,
            `gates_scope_required`, `request_not_found` (404).
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    properties:
                      data:
                        type: object
                        required:
                          - request_id
                          - status
                          - act
                          - expires_at
                        properties:
                          request_id:
                            type: string
                          status:
                            type: string
                            enum:
                              - queued
                              - approved
                              - denied
                              - expired
                              - cancelled
                          act:
                            type: string
                          expires_at:
                            type: string
                            format: date-time
                          resolved_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                          token:
                            type:
                              - string
                              - 'null'
                            description: >-
                              Present once approved, until the collection window
                              closes.
                          token_expires_in:
                            type: integer
                      error:
                        $ref: '#/components/schemas/GatesApiError'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - GatesKeyAuth: []
components:
  schemas:
    GatesApiError:
      type: object
      required:
        - message
        - statusCode
        - code
      description: >-
        Gates API handler error. Arrives inside `data.error` with HTTP 200 —
        check for it before reading the result.
      properties:
        message:
          type: string
        statusCode:
          type: integer
          example: 409
        code:
          type: string
          example: gate_key_taken
    InvalidInputError:
      type: object
      required:
        - message
        - input
        - errors
      properties:
        message:
          type: string
          example: Invalid input provided
        input:
          type: object
          additionalProperties: true
        errors:
          type: array
          items:
            type: object
            required:
              - propertyPath
              - invalidValue
              - message
            properties:
              propertyPath:
                type: string
              invalidValue:
                description: The invalid value
              message:
                type: string
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - statusCode
          properties:
            message:
              type: string
            statusCode:
              type: integer
  responses:
    BadRequest:
      description: Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InvalidInputError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    GatesKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret server API key (`bs_dev_…` or `bs_production_…`) with Gates
        API access: the `gates:write` scope, granted in the Console under
        Settings → Developer Tools → API Keys. Without it every Gates API call
        answers `gates_scope_required`. The organization and environment always
        come from the key. Site keys are refused.

````

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