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

# Get Agent Deployment

> Returns which version production serves, or the two versions of an A/B test and their shares. The first call records the version that is live now.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/voice-agents/{voiceAgentId}/deployment
openapi: 3.0.1
info:
  title: Hamsa API
  description: >-
    The Hamsa API: voice agents and their calls, phone numbers, batch calls and
    knowledge bases; speech to text, text to speech, voices and AI content.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v2/voice-agents/{voiceAgentId}/deployment:
    get:
      summary: Get agent deployment
      description: >-
        Returns which version production serves, or the two versions of an A/B
        test and their shares. The first call records the version that is live
        now.
      parameters:
        - in: path
          name: voiceAgentId
          required: true
          description: ID of the voice agent.
          schema:
            type: string
            format: uuid
            example: fc6f158b-24c2-45a6-957b-c57c0a8979b5
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: success
                  data:
                    $ref: '#/components/schemas/AgentVersionDeployment'
        '400':
          description: Invalid request (for example a missing or invalid field).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionError'
        '401':
          description: 'Unauthorized: missing or invalid API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionError'
        '403':
          description: Your API key or role does not have the `agents:read` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionError'
        '404':
          description: Voice agent not found in this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionError'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AgentVersionDeployment:
      type: object
      description: What production serves.
      properties:
        agentId:
          type: string
          format: uuid
          example: fc6f158b-24c2-45a6-957b-c57c0a8979b5
        entries:
          type: array
          items:
            $ref: '#/components/schemas/AgentVersionDeploymentEntry'
          description: One version at 100, or two versions in an A/B test.
          example:
            - versionNumber: 4
              weight: 100
        updatedAt:
          type: string
          format: date-time
          example: '2026-10-28T09:15:00.000Z'
    AgentVersionError:
      type: object
      properties:
        code:
          type: integer
          description: Service error code (8400, 8403, 8404, 8409, ...).
          example: 8409
        message:
          type: string
          example: >-
            Your draft changed in another tab or through your API key. Reload it
            and try again.
        messageKey:
          type: string
          description: Stable error key.
          example: DraftStaleRevision
        params:
          type: object
          additionalProperties: true
          description: >-
            Details. `reason` names the case (for example `STALE_REVISION`,
            `NO_DRAFT`, `SESSION_ONLY`); `action` names a missing permission
            (for example `agents:deploy`).
          example:
            reason: STALE_REVISION
            revision: e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56
    AgentVersionDeploymentEntry:
      type: object
      required:
        - versionNumber
        - weight
      properties:
        versionNumber:
          type: integer
          minimum: 1
          example: 4
        weight:
          type: integer
          minimum: 0
          maximum: 100
          description: Share of calls, in percent.
          example: 100
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````

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