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

# Patch agents



## OpenAPI

````yaml /openapi.json patch /agents/{id}
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:
  /agents/{id}:
    patch:
      operationId: agent.update
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[cC][^\s-]{8,}$
            description: Unique identifier of the agent to update
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 2
                  maxLength: 100
                  description: Updated display name for the agent
                slug:
                  type: string
                  minLength: 2
                  maxLength: 64
                  pattern: ^[a-z0-9-]+$
                  description: Updated URL-friendly unique identifier
                status:
                  enum:
                    - ACTIVE
                    - SUSPENDED
                    - DELETED
                  type: string
                  description: Updated lifecycle status
                metadata:
                  type: object
                  additionalProperties: {}
                  description: Updated key-value metadata (replaces existing metadata)
                voiceId:
                  anyOf:
                    - type: string
                    - type: 'null'
                  description: >-
                    Updated voice id (from GET /voice/catalog), or null to reset
                    to the system default.
              required: []
              description: Request body for updating an existing agent
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                    description: Unique identifier of the agent
                  orgId:
                    type: string
                    pattern: ^[cC][^\s-]{8,}$
                    description: Organization ID that owns this agent
                  name:
                    type: string
                    description: Human-readable display name
                  slug:
                    type: string
                    description: URL-friendly unique identifier
                  status:
                    enum:
                      - ACTIVE
                      - SUSPENDED
                      - DELETED
                    type: string
                    description: Current lifecycle status
                  apiKeyPrefix:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      Prefix of the agent's API key for identification, or null
                      if no key is set
                  keyRotatedAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                    description: >-
                      ISO 8601 timestamp of the last API-key rotation, null if
                      never rotated
                  metadata:
                    type: object
                    additionalProperties: {}
                    description: Arbitrary key-value metadata
                  voiceId:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: >-
                      The agent's chosen voice id, or null for the system
                      default.
                  emailIdentities:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: ^[cC][^\s-]{8,}$
                          description: Unique identifier of the email identity
                        email:
                          type: string
                          format: email
                          description: Full email address
                        domain:
                          type: string
                          description: Domain portion of the email address
                        localPart:
                          type: string
                          description: Local part (before the @) of the email address
                        isPrimary:
                          type: boolean
                          description: Whether this is the agent's primary email identity
                        verified:
                          type: boolean
                          description: Whether the email address has been verified
                        createdAt:
                          type: string
                          format: date-time
                          description: Timestamp when the email identity was created
                      required:
                        - id
                        - email
                        - domain
                        - localPart
                        - isPrimary
                        - verified
                        - createdAt
                      description: Email identity associated with an agent
                    description: Email identities associated with this agent
                  phoneIdentities:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: ^[cC][^\s-]{8,}$
                          description: Unique identifier of the phone identity
                        phoneNumber:
                          type: string
                          description: Phone number in E.164 format
                        providerId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: Opaque carrier-side identifier for this phone number
                        capabilities:
                          type: object
                          properties:
                            sms:
                              default: false
                              type: boolean
                              description: Whether the number supports SMS messaging
                            mms:
                              default: false
                              type: boolean
                              description: Whether the number supports MMS messaging
                            voice:
                              default: false
                              type: boolean
                              description: Whether the number supports voice calls
                          description: >-
                            Communication capabilities supported by this phone
                            number
                        tenDlcStatus:
                          enum:
                            - PENDING
                            - REGISTERED
                            - REJECTED
                            - NOT_REQUIRED
                            - UNREGISTERED
                          type: string
                          description: 10DLC campaign registration status
                        isPrimary:
                          type: boolean
                          description: Whether this is the agent's primary phone identity
                        voiceId:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The voice this number answers with, from the voice
                            catalog. Null means it uses the agent's voice, and
                            then the system default. Set it per number so one
                            agent's support line and sales line can sound
                            different.
                        createdAt:
                          type: string
                          format: date-time
                          description: Timestamp when the phone identity was created
                      required:
                        - id
                        - phoneNumber
                        - providerId
                        - capabilities
                        - tenDlcStatus
                        - isPrimary
                        - voiceId
                        - createdAt
                      description: Phone identity associated with an agent
                    description: Phone identities associated with this agent
                  readiness:
                    type: object
                    properties:
                      canSendEmail:
                        type: boolean
                        description: >-
                          True iff the agent has at least one verified email
                          identity right now
                      canReceiveEmail:
                        type: boolean
                        description: >-
                          True iff inbound MX is configured for the agent's
                          primary domain
                      canSendSms:
                        type: boolean
                        description: >-
                          True iff the agent has a provisioned phone identity
                          with SMS capability that's past 10DLC if required
                      canPlaceVoiceCall:
                        type: boolean
                        description: >-
                          True iff the agent has a phone identity with voice
                          capability
                      blockers:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              enum:
                                - IDENTITY_NOT_VERIFIED
                                - DOMAIN_NOT_VERIFIED
                                - PHONE_NOT_PROVISIONED
                              type: string
                              description: >-
                                Stable code matching the typed error thrown at
                                call time
                            field:
                              type: string
                              description: >-
                                JSON-path-ish location of the failing field,
                                e.g. emailIdentities[0]
                            hint:
                              type: string
                              description: Human-readable remediation hint
                            remediationUrl:
                              type: string
                              description: >-
                                Optional pointer to where the user can resolve
                                this blocker
                          required:
                            - code
                            - field
                            - hint
                          description: One reason a capability isn't currently usable
                        description: >-
                          All current blockers across capabilities; empty array
                          means fully ready
                    required:
                      - canSendEmail
                      - canReceiveEmail
                      - canSendSms
                      - canPlaceVoiceCall
                      - blockers
                    description: >-
                      Per-capability readiness summary. Optional for backward
                      compatibility — clients without readiness handling
                      continue to work; clients that branch on it get the
                      delayed-verification gap closed.
                  createdAt:
                    type: string
                    format: date-time
                    description: Timestamp when the agent was created
                  updatedAt:
                    type: string
                    format: date-time
                    description: Timestamp when the agent was last updated
                required:
                  - id
                  - orgId
                  - name
                  - slug
                  - status
                  - apiKeyPrefix
                  - keyRotatedAt
                  - metadata
                  - voiceId
                  - emailIdentities
                  - phoneIdentities
                  - createdAt
                  - updatedAt
                description: Full agent resource representation
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.