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

# Create agent identity

> Creates a Free-tier account and API key for an AI agent with no email inbox. Returns an `api_key` usable immediately and a `claim_url` the agent should report back to its human to make the account permanent. No authentication required.


This endpoint is designed to be called by an autonomous AI agent - no human, no inbox, no dashboard visit required.

The returned `api_key` is valid immediately. The `claim_url` is a one-time link the agent should report back to its human. Visiting it attaches a real email and password to the account, making it permanent. Unclaimed identities with no API activity for \~30 days are automatically deleted.


## OpenAPI

````yaml /openapi.yaml post /auth/agent-identity
openapi: 3.1.0
info:
  title: Versuno Public API
  description: >
    The Versuno Public API lets you manage AI assets, projects, and version
    history programmatically.


    All endpoints except key management require a Bearer API key in the
    `Authorization` header.

    API keys are formatted as
    `uk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`.
  version: 1.0.0
  contact:
    email: support@versuno.ai
servers:
  - url: https://versuno.ai/api/public
    description: Production
  - url: http://localhost:3000/api/public
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Verify API key validity and retrieve the caller's identity.
  - name: Teams
    description: Teams the authenticated user owns or is an active member of.
  - name: Assets
    description: AI assets — prompts, personas, contexts, system prompts, and skills.
  - name: Asset Trash
    description: Single-asset soft-delete, restore, and permanent delete lifecycle.
  - name: Bulk Asset Trash
    description: Bulk trash operations across multiple assets at once.
  - name: Projects
    description: Project folders for organising assets and teams.
  - name: Project Trash
    description: Project trash lifecycle — trashing deletes the entire subtree.
  - name: Versioning
    description: Full-snapshot version history with non-destructive revert support.
  - name: Public Brains
    description: >-
      Graph-based knowledge structures composed of containers (folders/groups)
      and nodes (content items). Read the graph, or run semantic RAG queries
      against it.
  - name: Memory
    description: >-
      The universal agent-memory layer. Capture coding-agent memory, recall it
      semantically, and resolve contradictions. Capture-only, scoped to your API
      key's account.
  - name: Key Management
    description: >-
      Create, update, and delete API keys. These endpoints do not require a
      Bearer token.
paths:
  /auth/agent-identity:
    post:
      tags:
        - Authentication
      summary: Create agent identity
      description: >
        Creates a Free-tier account and API key for an AI agent with no email
        inbox. Returns an `api_key` usable immediately and a `claim_url` the
        agent should report back to its human to make the account permanent. No
        authentication required.
      operationId: createAgentIdentity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - agent_type
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                  description: Display name for this agent.
                  example: My coding assistant
                agent_type:
                  type: string
                  enum:
                    - claude-code
                    - cursor
                    - cline
                    - windsurf
                    - codex
                    - opencode
                    - hermes
                    - custom
                  description: The type of AI agent.
                  example: claude-code
                description:
                  type: string
                  maxLength: 500
                  description: What this agent does. Optional.
                  example: Handles context lookups for my team repo
                handle:
                  type: string
                  description: >
                    URL-safe slug used as username (3–30 chars, `[a-z0-9_-]`).
                    Auto-generated from the name if omitted.
                  example: my-coding-assistant
            example:
              name: My coding assistant
              agent_type: claude-code
              description: Handles context lookups for my team repo
      responses:
        '200':
          description: Agent identity created. Returns the API key and claim URL.
          content:
            application/json:
              schema:
                type: object
                properties:
                  agent_id:
                    type: string
                    format: uuid
                    description: UUID of the created account.
                    example: b2c3d4e5-f6a7-8901-bcde-f12345678901
                  handle:
                    type: string
                    description: >-
                      The assigned username (may differ from requested on
                      collision).
                    example: my-coding-assistant
                  api_key:
                    type: string
                    description: >
                      Full API key — the credential that ties future sessions to
                      this account. Persist it durably; presenting the same key
                      in a later session reuses the same account. Re-viewable in
                      the dashboard once the account is claimed.
                    example: uk_live_a1b2c3d4e5f6...
                  claim_url:
                    type: string
                    format: uri
                    description: >-
                      URL to open to begin claiming this account (make it
                      permanent). The agent can use it if it has email access,
                      or report it back to its human.
                    example: https://versuno.ai/claim/<token>
                  message:
                    type: string
                    description: Human-readable summary of the account state and next step.
              example:
                agent_id: b2c3d4e5-f6a7-8901-bcde-f12345678901
                handle: my-coding-assistant
                api_key: uk_live_a1b2c3d4e5f6...
                claim_url: https://versuno.ai/claim/abc123...
                message: >-
                  You're a temporary agent identity on the Free tier; your
                  api_key works immediately. To make the account permanent,
                  claim it: if you can access an email inbox (e.g. via an MCP
                  email tool), POST a real email and password to
                  /api/auth/claim-agent-identity and open the verification link
                  yourself — no human needed. Otherwise, give the claim_url to
                  your human to claim it. Unclaimed, idle identities are deleted
                  after ~30 days.
        '422':
          description: >-
            Validation failed — missing required fields, invalid agent_type, or
            invalid handle format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '429':
          description: Too many signups from this IP address (5/day limit).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Too many signups from this network. Try again later.
        '503':
          description: Global daily signup budget exceeded — try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Signup is temporarily paused. Try again later.
      security: []
      servers:
        - url: https://versuno.ai/api
          description: Production (auth namespace)
        - url: http://localhost:3000/api
          description: Local development (auth namespace)
components:
  schemas:
    Error400:
      type: object
      properties:
        error:
          type: string
          example: 'Wrong data: assetType is required'
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Versuno API key. Must be prefixed with `Bearer`. Format: `Bearer
        uk_live_...`
      x-default: Bearer uk_live_your_api_key_here

````