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

# Agent Adopt

> Human takes over an agent account IN PLACE. Auth = the human's Firebase ID token.

Called by the web app's adopt page after the human signs in. Verifies the
human's Firebase identity (WITHOUT the get-or-create middleware, to avoid
minting a duplicate row), then re-points the agent account row to that
identity — `users.id` is preserved, so the agent's documents, usage, and API
key all stay. If the human already has an account, returns 409.



## OpenAPI

````yaml /openapi.json post /v1/agents/adopt
openapi: 3.1.0
info:
  title: Universal Document AI API
  description: AI-powered document editing with multi-tenant organization support
  version: 2.0.0
servers: []
security: []
paths:
  /v1/agents/adopt:
    post:
      tags:
        - agents
      summary: Agent Adopt
      description: >-
        Human takes over an agent account IN PLACE. Auth = the human's Firebase
        ID token.


        Called by the web app's adopt page after the human signs in. Verifies
        the

        human's Firebase identity (WITHOUT the get-or-create middleware, to
        avoid

        minting a duplicate row), then re-points the agent account row to that

        identity — `users.id` is preserved, so the agent's documents, usage, and
        API

        key all stay. If the human already has an account, returns 409.
      operationId: agent_adopt_v1_agents_adopt_post
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentAdoptRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgentAdoptRequest:
      properties:
        token:
          type: string
          maxLength: 128
          title: Token
          description: The handoff token from the adopt link.
        code:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Code
          description: >-
            The one-time takeover code your AI agent shows you (8 characters
            like ABCD-1234). Required for accounts handed off with a code.
      type: object
      required:
        - token
      title: AgentAdoptRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````