# Update a phone number

PUT https://api.close.com/api/v1/phone_number/{id}/
Content-Type: application/json

You need the "Manage Group Phone Numbers" permission to update a group number. You can only update your own personal numbers.

You can:

- Change a `label` of your number.
- Set up call forwarding via `forward_to` and `forward_to_enabled`.
- Set up a voicemail greeting by including a URL of an mp3 recording in `voicemail_greeting_url`. We require the URL to be secure (i.e. starting with https://).
- Modify which team members are part of a group number via `participants`. This should be a list of user IDs.
- Modify which external phone numbers are part of a group number via `phone_numbers`. This should be a list of phone numbers in E.164 international format, e.g. "+16503334444".

Reference: https://developer.close.com/api/resources/phone-numbers/update

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Close API
  version: 1.0.0
paths:
  /phone_number/{id}/:
    put:
      operationId: update
      summary: Update a phone number
      description: >-
        You need the "Manage Group Phone Numbers" permission to update a group
        number. You can only update your own personal numbers.


        You can:


        - Change a `label` of your number.

        - Set up call forwarding via `forward_to` and `forward_to_enabled`.

        - Set up a voicemail greeting by including a URL of an mp3 recording in
        `voicemail_greeting_url`. We require the URL to be secure (i.e. starting
        with https://).

        - Modify which team members are part of a group number via
        `participants`. This should be a list of user IDs.

        - Modify which external phone numbers are part of a group number via
        `phone_numbers`. This should be a list of phone numbers in E.164
        international format, e.g. "+16503334444".
      tags:
        - subpackage_phoneNumbers
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Basic authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumber'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Not found
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePhoneNumber'
servers:
  - url: https://api.close.com/api/v1
components:
  schemas:
    UpdatePhoneNumber:
      type: object
      properties:
        forward_to:
          type: string
        forward_to_enabled:
          type: boolean
        label:
          type: string
        participants:
          type: array
          items:
            type: string
        phone_numbers:
          type: array
          items:
            type: string
        press_1_to_accept:
          type: boolean
        voicemail_greeting_url:
          type:
            - string
            - 'null'
      title: UpdatePhoneNumber
    UnderlyingCarrier:
      type: string
      enum:
        - twilio
        - plivo
      title: UnderlyingCarrier
    CarrierNumberType:
      type: string
      enum:
        - local
        - national
        - mobile
        - tollfree
        - shortcode
      description: The type of number the carrier has rented.
      title: CarrierNumberType
    PhoneNumberType:
      type: string
      enum:
        - internal
        - external
        - virtual
      title: PhoneNumberType
    PhoneNumber:
      type: object
      properties:
        address_id:
          type:
            - string
            - 'null'
        bundle_id:
          type:
            - string
            - 'null'
        carrier:
          oneOf:
            - $ref: '#/components/schemas/UnderlyingCarrier'
            - type: 'null'
        carrier_type:
          oneOf:
            - $ref: '#/components/schemas/CarrierNumberType'
            - type: 'null'
        country:
          type:
            - string
            - 'null'
        date_created:
          type: string
          format: date-time
        date_updated:
          type: string
          format: date-time
        forward_to:
          type:
            - string
            - 'null'
        forward_to_enabled:
          type: boolean
        forward_to_formatted:
          type:
            - string
            - 'null'
        id:
          type: string
        is_group_number:
          type: boolean
        is_premium:
          type: boolean
        is_verified:
          type: boolean
        label:
          type: string
        last_billed_price:
          type:
            - number
            - 'null'
          format: double
        mms_enabled:
          type: boolean
        next_billing_on:
          type:
            - string
            - 'null'
          format: date-time
        number:
          type: string
        number_formatted:
          type: string
        organization_id:
          type: string
        participants:
          type: array
          items:
            type: string
        phone_numbers:
          type: array
          items:
            type: string
        phone_numbers_formatted:
          type: array
          items:
            type: string
        press_1_to_accept:
          type: boolean
        sms_enabled:
          type: boolean
        supports_mms_to_countries:
          type: array
          items:
            type: string
        supports_sms_to_countries:
          type: array
          items:
            type: string
        type:
          $ref: '#/components/schemas/PhoneNumberType'
        user_id:
          type:
            - string
            - 'null'
        voicemail_greeting_url:
          type:
            - string
            - 'null'
        was_ported:
          type: boolean
      required:
        - address_id
        - bundle_id
        - carrier
        - carrier_type
        - country
        - date_created
        - date_updated
        - id
        - is_group_number
        - is_premium
        - is_verified
        - label
        - last_billed_price
        - mms_enabled
        - next_billing_on
        - number
        - number_formatted
        - organization_id
        - sms_enabled
        - supports_mms_to_countries
        - supports_sms_to_countries
        - type
        - user_id
      title: PhoneNumber
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: basic
    OAuth2:
      type: http
      scheme: bearer

```