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

# Post inboxes



## OpenAPI

````yaml /openapi.json post /inboxes
openapi: 3.1.1
info:
  title: Anima API
  version: 0.1.0
  description: >-
    The Anima API provides programmatic access to unified infrastructure for AI
    agents: create and manage agents; send and receive email; place phone calls
    and send/receive SMS and voice; store and retrieve vault credentials; manage
    agent identity; and configure webhooks for real-time events. Authenticate
    using a Bearer token or an API key passed via the X-API-Key header.
  contact:
    name: Anima Labs
    url: https://useanima.sh
    email: support@useanima.sh
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.useanima.sh/v1
    description: Production
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /inboxes:
    post:
      operationId: inbox.create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  minLength: 1
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9._-]+$
                  description: >-
                    Local part of the inbox email address (letters, numbers,
                    dots, hyphens, underscores). Normalized to lowercase.
                domain:
                  type: string
                  description: >-
                    Domain for the inbox email address; uses the default domain
                    if omitted
                displayName:
                  type: string
                  maxLength: 128
                  description: >-
                    Human-readable display name for the inbox (max 128
                    characters)
                agentId:
                  type: string
                  pattern: ^[cC][^\s-]{8,}$
                  description: >-
                    ID of the agent to associate with this inbox. With an
                    agent-scoped key, defaults to the calling agent and may only
                    name that agent; naming a different agent requires a master
                    key. With a master key, omitting it creates a dedicated
                    backing agent for the inbox.
              description: Request body for creating a new inbox
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                    description: Unique identifier of the inbox
                  email:
                    type: string
                    format: email
                    description: Full email address of the inbox
                  domain:
                    type: string
                    description: Domain portion of the inbox email address
                  localPart:
                    type: string
                    description: Local part (before the @) of the inbox email address
                  displayName:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Human-readable display name, or null if not set
                  agentId:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                    description: ID of the agent this inbox belongs to
                  createdAt:
                    type: string
                    format: date-time
                    description: Timestamp when the inbox was created
                required:
                  - id
                  - email
                  - domain
                  - localPart
                  - displayName
                  - agentId
                  - createdAt
                description: Inbox resource representation
        '402':
          description: '402'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: PAYMENT_REQUIRED
                      status:
                        const: 402
                      message:
                        type: string
                        default: >-
                          Creating an inbox without an agentId mints an agent,
                          and the plan's agent limit has been reached.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: Agents can only create inboxes for themselves.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: No such agent in this organization.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '409':
          description: '409'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: CONFLICT
                      status:
                        const: 409
                      message:
                        type: string
                        default: >-
                          The agent already has an inbox. Each agent has exactly
                          one.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token obtained from authentication. Pass as: Authorization:
        Bearer <token>
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for programmatic access. Pass as: X-API-Key: <your-key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.