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

# Set Agent



## OpenAPI

````yaml post /phones/{phone}/set_agent
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api-west.millis.ai
    description: US Region API Gateway
  - url: https://api-eu-west.millis.ai
    description: EU Region API Gateway
security: []
paths:
  /phones/{phone}/set_agent:
    post:
      tags:
        - Phones
      summary: Set Agent
      operationId: set_agent_phones__phone__set_agent_post
      parameters:
        - name: phone
          in: path
          required: true
          schema:
            type: string
            title: Phone
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetAgentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SetAgentRequest:
      properties:
        agent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Id
      type: object
      title: SetAgentRequest
    GenericResponse:
      properties:
        success:
          type: boolean
          title: Success
      type: object
      required:
        - success
      title: GenericResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````