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

# Post agentelevate



## OpenAPI

````yaml /openapi.json post /agent/elevate
openapi: 3.1.1
info:
  title: Anima API
  version: 0.1.0
  description: >-
    The Anima API provides programmatic access to unified infrastructure for AI
    agents: create and manage agents; send and receive email; place phone calls
    and send/receive SMS and voice; store and retrieve vault credentials; manage
    agent identity; and configure webhooks for real-time events. Authenticate
    using a Bearer token or an API key passed via the X-API-Key header.
  contact:
    name: Anima Labs
    url: https://useanima.sh
    email: support@useanima.sh
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.useanima.sh/v1
    description: Production
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /agent/elevate:
    post:
      operationId: agentSelfService.elevate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                otp_code:
                  type: string
                  minLength: 1
                  description: >-
                    The 6-digit code emailed to the owner by
                    /agent/elevate/request
                grant:
                  type: string
                  minLength: 1
                  description: >-
                    An owner grant from a previous enrolment, used instead of an
                    emailed code. The caller is expected to have kept it behind
                    a local human-presence gate.
                enroll:
                  type: boolean
                  description: >-
                    Also return a durable owner grant, so later step-ups on this
                    machine need no email. Honoured only when authorising with
                    otp_code — a grant cannot mint its successor.
              description: Step-up parameters
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    description: >-
                      Short-lived key with master capability. Shown once; store
                      it now.
                  expires_at:
                    type: string
                    format: date-time
                    description: When the key stops working
                  api_key_id:
                    type: string
                    description: Id of the issued key, for revoking it early
                  grant:
                    type: string
                    description: >-
                      Durable owner grant. Shown once; store it behind a
                      human-presence gate.
                  grant_expires_at:
                    type: string
                    format: date-time
                    description: >-
                      When the grant stops being accepted and an emailed code is
                      needed again
                required:
                  - api_key
                  - expires_at
                  - api_key_id
                description: Short-lived master credential
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token obtained from authentication. Pass as: Authorization:
        Bearer <token>
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for programmatic access. Pass as: X-API-Key: <your-key>'

````