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

# Update Number

> To attach or detach assistant to the number, or enable or disable the inbound/outbound call.



## OpenAPI

````yaml https://api-prod.interactly.ai/api-docs/common/api.json put /assistants/v1/numbers/{id}
openapi: 3.1.0
info:
  title: Interactly API
  description: API for building interactly.ai services
  version: 1.1.0
  contact:
    name: Interactly
    url: https://interactly.ai
    email: developers@interactly.ai
servers:
  - url: https://api-prod.interactly.ai
    description: API Server
security: []
paths:
  /assistants/v1/numbers/{id}:
    put:
      tags:
        - Phone Numbers
      summary: Update Number
      description: >-
        To attach or detach assistant to the number, or enable or disable the
        inbound/outbound call.
      operationId: updateNumber
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The ID of the number to update.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assistantId:
                  type: string
                  description: >-
                    To attach assistant, give id of the assistant. To detach
                    assistant, give empty string.
                  example: a12f9c88-c155-461f-9771-4d240cdc9a04
                inboundEnabled:
                  type: boolean
                  description: >-
                    To enable inbound call, set to true. To disable inbound
                    call, set to false.
                  example: true
                outboundEnabled:
                  type: boolean
                  description: >-
                    To enable outbound call, set to true. To disable outbound
                    call, set to false.
                  example: true
      responses:
        '200':
          description: Successfully updated the number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Number'
        '400':
          description: Invalid request body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Not received valid inputs!
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Failed to update number
                  error:
                    type: string
                    example: INTERNAL_ERROR
      security:
        - bearer: []
components:
  schemas:
    Number:
      type: object
      required:
        - _id
        - teamId
        - number
        - provider
      properties:
        _id:
          type: string
          format: objectId
          description: Unique identifier of the number
          example: a12f9c88-c155-461f-9771-4d240cdc9a04
        teamId:
          type: string
          format: objectId
          description: This is unique identifier of the team.
          example: 1f7b1b1b1b1b1b1b1b1b1b1b
        number:
          type: string
          description: Phone number associated with the team
          example: '+1234567890'
        provider:
          type: object
          properties:
            name:
              type: string
              description: Name of the provider
              example: twilio
        assistantId:
          type: string
          description: ID of the associated assistant (if any)
          example: a12f9c88-c155-461f-9771-4d240cdc9a04
        inboundEnabled:
          type: boolean
          description: >-
            If true, inbound call is enabled. If false, inbound call is
            disabled.
          example: true
        outboundEnabled:
          type: boolean
          description: >-
            If true, outbound call is enabled. If false, outbound call is
            disabled.
          example: true
        label:
          type: string
          description: Label for the number
          example: friendly-name-1
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: >-
        Retrieve your API Key from [Dashboard API Keys
        Section](https://dashboard.interactly.ai/api-keys).

````