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

# Register

> Creates a new API agent with a dedicated Privy server wallet, queues background onboarding, and returns a one-time API key. Use `GET /v1/auth/status` to fetch the wallet address after registration.



## OpenAPI

````yaml POST /v1/auth/register
openapi: 3.1.0
info:
  title: Docent API
  description: >-
    REST API for programmatic trading on Hyperliquid and Polymarket via Docent.
    Create API agents, fund a dedicated wallet, place trades, check balances,
    and move funds between venues with API keys.
  version: 1.0.0
  contact:
    email: support@trydocent.com
servers:
  - url: https://api.trydocent.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Registration, key management, and auth status
  - name: Balances
    description: Unified balance across all trading venues
  - name: Positions
    description: Open positions on Hyperliquid and Polymarket
  - name: Markets
    description: Market metadata and search
  - name: Orders
    description: Place orders on Hyperliquid perpetuals, spot, and Polymarket
  - name: Transfers
    description: Move funds between trading venues
  - name: Actions
    description: Poll workflow execution status
  - name: Strategies
    description: Coming soon. Reserved for future strategy endpoints.
paths:
  /v1/auth/register:
    post:
      tags:
        - Auth
      summary: Register a new API account
      description: >-
        Creates a new API agent with a dedicated Privy server wallet, queues
        background onboarding, and returns a one-time API key. Use `GET
        /v1/auth/status` to fetch the wallet address after registration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
      responses:
        '201':
          description: API agent created. API key returned once.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
        '400':
          description: Registration failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security: []
components:
  schemas:
    RegisterRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Human-readable name for this API agent
          example: my-trading-bot
          minLength: 1
          maxLength: 64
    RegisterResponse:
      type: object
      required:
        - agentId
        - apiKey
      properties:
        agentId:
          type: string
          description: Your API agent ID
        apiKey:
          type: string
          description: Your API key. Shown exactly once. Store it securely.
          example: dk_live_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Machine-readable error code
          enum:
            - UNAUTHORIZED
            - FORBIDDEN
            - RATE_LIMITED
            - BAD_REQUEST
            - VALIDATION_ERROR
            - NOT_FOUND
            - ORDER_REJECTED
            - ORDER_FAILED
            - TRANSFER_FAILED
            - REGISTRATION_FAILED
            - ROTATION_FAILED
            - NOT_IMPLEMENTED
        retryAfter:
          type: number
          description: Milliseconds until rate limit resets (only on 429)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in the format `dk_live_...`. Pass as `Authorization: Bearer
        dk_live_...`

````