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

# Claim an agent

> Links an unclaimed agent to the authenticated user's dashboard account using the claim code from the agent's `claimUrl`.



## OpenAPI

````yaml /openapi.json post /api/agents/claim
openapi: 3.1.0
info:
  title: Mandate API
  version: 1.2.0
  description: >-
    Non-custodial agent wallet policy layer. Enforces spend limits, allowlists,
    and approval workflows for AI agent transactions without ever receiving
    private keys.
  contact:
    name: Mandate
    url: https://mandate.md
    email: support@mandate.md
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://app.mandate.md
    description: Production
security: []
tags:
  - name: Registration
    description: >-
      Agent registration and claiming. No auth required for register; Sanctum
      auth for claim.
  - name: Agent API
    description: >-
      Endpoints authenticated with a runtime key (Bearer mndt_live_... or
      mndt_test_...). Used by agents to validate transactions, post events, and
      poll status.
  - name: Intent Lifecycle
    description: >-
      Post transaction hashes after broadcast and poll intent status until
      confirmed.
  - name: Dashboard
    description: >-
      Dashboard endpoints for human operators. Authenticated via Sanctum
      (cookie-based session).
  - name: Policies
    description: >-
      Policy management for agents. List, create, and view policy
      configurations.
  - name: Approvals
    description: Approval queue for transactions that require human review.
paths:
  /api/agents/claim:
    post:
      tags:
        - Dashboard
      summary: Claim an agent
      description: >-
        Links an unclaimed agent to the authenticated user's dashboard account
        using the claim code from the agent's `claimUrl`.
      operationId: claimAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimRequest'
            example:
              claimCode: A1B2C3D4
      responses:
        '200':
          description: Agent claimed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimResponse'
              example:
                agentId: 9e5f1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b
                claimed: true
                claimedAt: '2026-03-26T12:00:00.000000Z'
        '404':
          description: Invalid or already used claim code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Invalid or already used claim code.
      security:
        - SanctumAuth: []
components:
  schemas:
    ClaimRequest:
      type: object
      required:
        - claimCode
      properties:
        claimCode:
          type: string
          description: 8-character claim code from the agent's claimUrl.
    ClaimResponse:
      type: object
      required:
        - agentId
        - claimed
      properties:
        agentId:
          type: string
          format: uuid
        claimed:
          type: boolean
          enum:
            - true
        claimedAt:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
  securitySchemes:
    SanctumAuth:
      type: apiKey
      in: cookie
      name: laravel_session
      description: >-
        Laravel Sanctum cookie-based session authentication. Obtained via GitHub
        OAuth login on the dashboard.

````