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

# Update Number



## OpenAPI

````yaml post /v1/numbers/update
openapi: 3.0.2
info:
  title: Vocode Hosted API
  description: |2-

            Vocode's Hosted API helps you automate phone calls in minutes. 🚀

            ## Numbers

            You can buy phone lines and place agents on them.

            ## Calls

            You can start, end, and get information about calls.
            
  termsOfService: http://example.com/terms/
  contact:
    name: Support
    email: support@vocode.dev
  version: 1.0.0
servers:
  - url: https://api.vocode.dev
    description: Production environment
  - url: https://staging.vocode.dev
    description: Staging environment
security: []
tags:
  - name: numbers
    description: Operations with phone numbers.
  - name: calls
    description: Manage calls.
paths:
  /v1/numbers/update:
    post:
      tags:
        - numbers
      summary: Update Number
      operationId: update_number
      parameters:
        - required: true
          schema:
            title: Phone Number
            type: string
          name: phone_number
          in: query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNumberRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateNumberRequest:
      title: UpdateNumberRequest
      required:
        - inbound_agent
      type: object
      properties:
        inbound_agent:
          title: Inbound Agent
          anyOf:
            - type: string
              format: uuid
            - $ref: '#/components/schemas/AgentUpdateParams'
    PhoneNumber:
      title: PhoneNumber
      required:
        - id
        - user_id
        - inbound_agent
        - number
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        active:
          title: Active
          type: boolean
          default: true
        inbound_agent:
          $ref: '#/components/schemas/Agent'
        number:
          title: Number
          type: string
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    AgentUpdateParams:
      title: AgentUpdateParams
      type: object
      properties:
        prompt:
          title: Prompt
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
        actions:
          title: Actions
          anyOf:
            - type: array
              items:
                anyOf:
                  - type: string
                    format: uuid
                  - $ref: '#/components/schemas/TransferCallActionUpdateParams'
                  - $ref: '#/components/schemas/EndConversationActionUpdateParams'
                  - $ref: '#/components/schemas/DTMFActionUpdateParams'
            - $ref: '#/components/schemas/Undefined'
        voice:
          title: Voice
          anyOf:
            - type: string
              format: uuid
            - $ref: '#/components/schemas/AzureVoiceUpdateParams'
            - $ref: '#/components/schemas/RimeVoiceUpdateParams'
            - $ref: '#/components/schemas/ElevenLabsVoiceUpdateParams'
            - $ref: '#/components/schemas/Undefined'
        initial_message:
          title: Initial Message
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
        webhook:
          title: Webhook
          anyOf:
            - type: string
              format: uuid
            - $ref: '#/components/schemas/WebhookUpdateParams'
            - $ref: '#/components/schemas/Undefined'
    Agent:
      title: Agent
      required:
        - id
        - user_id
        - prompt
        - actions
        - voice
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        prompt:
          title: Prompt
          type: string
        actions:
          title: Actions
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/TransferCallAction'
              - $ref: '#/components/schemas/EndConversationAction'
              - $ref: '#/components/schemas/DTMFAction'
        voice:
          title: Voice
          anyOf:
            - $ref: '#/components/schemas/AzureVoice'
            - $ref: '#/components/schemas/RimeVoice'
            - $ref: '#/components/schemas/ElevenLabsVoice'
        initial_message:
          title: Initial Message
          type: string
        webhook:
          $ref: '#/components/schemas/Webhook'
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    Undefined:
      title: Undefined
      type: object
      properties: {}
    TransferCallActionUpdateParams:
      title: TransferCallActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/TransferCallConfig'
            - $ref: '#/components/schemas/Undefined'
    EndConversationActionUpdateParams:
      title: EndConversationActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/EmptyActionConfig'
            - $ref: '#/components/schemas/Undefined'
    DTMFActionUpdateParams:
      title: DTMFActionUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ActionType'
        config:
          title: Config
          anyOf:
            - $ref: '#/components/schemas/EmptyActionConfig'
            - $ref: '#/components/schemas/Undefined'
    AzureVoiceUpdateParams:
      title: AzureVoiceUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/VoiceType'
        voice_name:
          title: Voice Name
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
        pitch:
          title: Pitch
          anyOf:
            - type: integer
            - $ref: '#/components/schemas/Undefined'
        rate:
          title: Rate
          anyOf:
            - type: integer
            - $ref: '#/components/schemas/Undefined'
    RimeVoiceUpdateParams:
      title: RimeVoiceUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/VoiceType'
        speaker:
          title: Speaker
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
    ElevenLabsVoiceUpdateParams:
      title: ElevenLabsVoiceUpdateParams
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/VoiceType'
        voice_id:
          title: Voice Id
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
        stability:
          title: Stability
          anyOf:
            - type: number
            - $ref: '#/components/schemas/Undefined'
        similarity_boost:
          title: Similarity Boost
          anyOf:
            - type: number
            - $ref: '#/components/schemas/Undefined'
        api_key:
          title: Api Key
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
    WebhookUpdateParams:
      title: WebhookUpdateParams
      type: object
      properties:
        subscriptions:
          title: Subscriptions
          anyOf:
            - type: array
              items:
                $ref: '#/components/schemas/EventType'
            - $ref: '#/components/schemas/Undefined'
        url:
          title: Url
          anyOf:
            - type: string
            - $ref: '#/components/schemas/Undefined'
        method:
          title: Method
          anyOf:
            - $ref: '#/components/schemas/HTTPMethod'
            - $ref: '#/components/schemas/Undefined'
    TransferCallAction:
      title: TransferCallAction
      required:
        - id
        - user_id
        - config
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_transfer_call
        config:
          $ref: '#/components/schemas/TransferCallConfig'
    EndConversationAction:
      title: EndConversationAction
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_end_conversation
        config:
          $ref: '#/components/schemas/EmptyActionConfig'
    DTMFAction:
      title: DTMFAction
      required:
        - id
        - user_id
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/ActionType'
          default: action_dtmf
        config:
          $ref: '#/components/schemas/EmptyActionConfig'
    AzureVoice:
      title: AzureVoice
      required:
        - id
        - user_id
        - voice_name
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/VoiceType'
          default: voice_azure
        voice_name:
          title: Voice Name
          type: string
        pitch:
          title: Pitch
          type: integer
          default: 0
        rate:
          title: Rate
          type: integer
          default: 15
    RimeVoice:
      title: RimeVoice
      required:
        - id
        - user_id
        - speaker
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/VoiceType'
          default: voice_rime
        speaker:
          title: Speaker
          type: string
    ElevenLabsVoice:
      title: ElevenLabsVoice
      required:
        - id
        - user_id
        - voice_id
        - api_key
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        type:
          allOf:
            - $ref: '#/components/schemas/VoiceType'
          default: voice_eleven_labs
        voice_id:
          title: Voice Id
          type: string
        stability:
          title: Stability
          type: number
        similarity_boost:
          title: Similarity Boost
          type: number
        api_key:
          title: Api Key
          type: string
    Webhook:
      title: Webhook
      required:
        - id
        - user_id
        - subscriptions
        - url
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
        user_id:
          title: User Id
          type: string
          format: uuid
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/EventType'
        url:
          title: Url
          type: string
        method:
          allOf:
            - $ref: '#/components/schemas/HTTPMethod'
          default: POST
    ActionType:
      title: ActionType
      enum:
        - action_end_conversation
        - action_dtmf
        - action_transfer_call
      type: string
      description: An enumeration.
    TransferCallConfig:
      title: TransferCallConfig
      required:
        - phone_number
      type: object
      properties:
        phone_number:
          title: Phone Number
          type: string
    EmptyActionConfig:
      title: EmptyActionConfig
      type: object
      properties: {}
    VoiceType:
      title: VoiceType
      enum:
        - voice_base
        - voice_azure
        - voice_rime
        - voice_eleven_labs
      type: string
      description: An enumeration.
    EventType:
      title: EventType
      enum:
        - event_message
        - event_action
        - event_phone_call_connected
        - event_phone_call_ended
        - event_transcript
        - event_recording
      type: string
      description: An enumeration.
    HTTPMethod:
      title: HTTPMethod
      enum:
        - GET
        - POST
      type: string
      description: An enumeration.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````