> ## 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.

# Register a new agent

> Creates a new agent identity with a runtime key and claim URL. No authentication required. The agent receives a `runtimeKey` for API calls and a `claimUrl` the human owner visits to link the agent to their dashboard.



## OpenAPI

````yaml /openapi.json post /api/agents/register
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/register:
    post:
      tags:
        - Registration
      summary: Register a new agent
      description: >-
        Creates a new agent identity with a runtime key and claim URL. No
        authentication required. The agent receives a `runtimeKey` for API calls
        and a `claimUrl` the human owner visits to link the agent to their
        dashboard.
      operationId: registerAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
            example:
              name: Treasury Bot
              evmAddress: '0x71C7656EC7ab88b098defB751B7401B5f6d8976F'
              chainId: 84532
              defaultPolicy:
                spendLimitPerTxUsd: 100
                spendLimitPerDayUsd: 1000
      responses:
        '201':
          description: Agent registered successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
              example:
                agentId: 9e5f1a2b-3c4d-5e6f-7a8b-9c0d1e2f3a4b
                runtimeKey: mndt_test_abc123def456ghi789jkl012mno345
                claimUrl: https://app.mandate.md/claim?code=A1B2C3D4
                walletAddress: '0x71c7656ec7ab88b098defb751b7401b5f6d8976f'
                evmAddress: '0x71c7656ec7ab88b098defb751b7401b5f6d8976f'
                chainId: '84532'
                defaultPolicy:
                  spendLimitPerTxUsd: 100
                  spendLimitPerDayUsd: 1000
        '422':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
      security: []
components:
  schemas:
    RegisterRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          maxLength: 100
          description: Display name for the agent.
        walletAddress:
          type: string
          description: >-
            Wallet address (EVM 0x... or other chain format). Required if
            evmAddress not provided.
        evmAddress:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: EVM wallet address. Required if walletAddress not provided.
        chainId:
          type:
            - integer
            - string
          description: Chain ID (e.g. 84532 for Base Sepolia, 8453 for Base).
        defaultPolicy:
          type: object
          description: Optional default policy overrides.
          properties:
            spendLimitPerTxUsd:
              type: number
              minimum: 0
              description: 'Per-transaction USD limit. Default: 100.'
            spendLimitPerDayUsd:
              type: number
              minimum: 0
              description: 'Daily USD limit. Default: 1000.'
    RegisterResponse:
      type: object
      required:
        - agentId
        - runtimeKey
        - claimUrl
      properties:
        agentId:
          type: string
          format: uuid
          description: Unique agent identifier.
        runtimeKey:
          type: string
          description: >-
            Runtime key for API authentication. Store securely. This is the only
            time it is returned in full.
        claimUrl:
          type: string
          format: uri
          description: URL the human owner visits to link the agent to their dashboard.
        walletAddress:
          type: string
          description: Normalized wallet address.
        evmAddress:
          type: string
          description: >-
            Normalized EVM address (lowercase). Same as walletAddress for EVM
            agents.
        chainId:
          type:
            - string
            - 'null'
          description: Chain ID, if provided.
        defaultPolicy:
          type: object
          properties:
            spendLimitPerTxUsd:
              type: number
            spendLimitPerDayUsd:
              type: number
    ValidationError:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: Summary error message.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Per-field validation errors.

````