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

# Change a number's configuration.

> A member that is absent is left as it is; `null` clears a URL.

Live members: `voice_url`, `voice_method`, `voice_fallback_url`,
`voice_fallback_method`, `status_callback`, `status_callback_method`, `campaign_id`.
Set `campaign_id` to assign the number to an approved campaign, or pass null
to remove its assignment under the same rules as the campaign subresource.
All supplied changes commit together.

`friendly_name`, `inbound_message_url` and `inbound_message_method` are not available yet: a
request that names any of them answers `422 unsupported` with the
member in `error.details.field`, and changes nothing.
A missing or unapproved campaign answers 422. A conflicting assignment answers 409.
An iMessage line managed by Sendblue answers 422 with reason `operator_managed`.
A registered sender answers 422 with reason `registered_number`.

Required permission: `numbers:write`. Accepted credentials: a signed-in person, an API key, the account token.




## OpenAPI

````yaml /api-reference/openapi.yaml patch /numbers/{phone_number}
openapi: 3.1.0
info:
  title: Sendblue Omni API
  version: '2026-11-23'
  summary: The native Sendblue communications API served by Omni.
  description: |
    The Sendblue Omni API: messages, numbers, calls, recordings, media, 10DLC
    registration, billing and webhooks for US messaging and calling.

    Every operation on this page is live. Requests and responses are JSON with
    `snake_case` names, at the root of the host with no version prefix. See the
    guides for [authentication](/authentication), [idempotency](/idempotency),
    [errors](/errors), [pagination](/pagination) and [webhooks](/webhooks).
  contact:
    name: Sendblue
    url: https://sendblue.com
servers:
  - url: https://omni-api.sendblue.com
    description: Production
security:
  - person: []
  - bearer: []
  - legacyKeyId: []
    legacyKeySecret: []
tags:
  - name: account
  - name: messages
  - name: numbers
  - name: brands
  - name: campaigns
  - name: calls
  - name: recordings
  - name: media
  - name: contacts
  - name: tags
  - name: variables
  - name: workflows
  - name: admin
  - name: operations
paths:
  /numbers/{phone_number}:
    parameters:
      - $ref: '#/components/parameters/PhoneNumberPath'
    patch:
      tags:
        - numbers
      summary: Change a number's configuration.
      description: >
        A member that is absent is left as it is; `null` clears a URL.


        Live members: `voice_url`, `voice_method`, `voice_fallback_url`,

        `voice_fallback_method`, `status_callback`, `status_callback_method`,
        `campaign_id`.

        Set `campaign_id` to assign the number to an approved campaign, or pass
        null

        to remove its assignment under the same rules as the campaign
        subresource.

        All supplied changes commit together.


        `friendly_name`, `inbound_message_url` and `inbound_message_method` are
        not available yet: a

        request that names any of them answers `422 unsupported` with the

        member in `error.details.field`, and changes nothing.

        A missing or unapproved campaign answers 422. A conflicting assignment
        answers 409.

        An iMessage line managed by Sendblue answers 422 with reason
        `operator_managed`.

        A registered sender answers 422 with reason `registered_number`.


        Required permission: `numbers:write`. Accepted credentials: a signed-in
        person, an API key, the account token.
      operationId: updateNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NumberUpdate'
            example:
              voice_url: https://example.com/voice
              voice_method: POST
      responses:
        '200':
          description: The changed number.
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Number'
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    PhoneNumberPath:
      name: phone_number
      in: path
      required: true
      description: E.164, with the plus sign percent-encoded (`%2B14155550100`).
      schema:
        $ref: '#/components/schemas/PhoneNumber'
  schemas:
    NumberUpdate:
      type: object
      additionalProperties: false
      minProperties: 1
      properties:
        voice_url:
          type:
            - string
            - 'null'
          format: uri
        voice_method:
          $ref: '#/components/schemas/HttpMethod'
        voice_fallback_url:
          type:
            - string
            - 'null'
          format: uri
        voice_fallback_method:
          $ref: '#/components/schemas/HttpMethod'
        status_callback:
          type:
            - string
            - 'null'
          format: uri
        status_callback_method:
          $ref: '#/components/schemas/HttpMethod'
        campaign_id:
          type:
            - string
            - 'null'
    Number:
      type: object
      required:
        - id
        - phone_number
        - friendly_name
        - source
        - channels
        - capabilities
        - sms
        - campaign_id
        - price
        - monthly_price
        - voice_url
        - voice_method
        - voice_fallback_url
        - voice_fallback_method
        - status_callback
        - status_callback_method
        - created_at
      additionalProperties: false
      properties:
        id:
          type:
            - string
            - 'null'
          description: The number's ID. `null` for a registered number, which has none.
        phone_number:
          $ref: '#/components/schemas/PhoneNumber'
        friendly_name:
          type: string
          description: >-
            The number as it is usually written. Setting a name of your own is
            planned.
        source:
          type: string
          description: >
            How the account came to have the number. `requested`: an enrolled
            retained line

            fulfilled against an iMessage number request. `purchased`: bought

            through this API (or the Twilio-compatible one). `registered`: a

            number the company already held, registered for the account by

            Sendblue. A registered number sends and receives like any other

            and is read-only here: it has no ID, creation time or

            configuration, and is not changed or released through this API.
          enum:
            - purchased
            - requested
            - registered
        channels:
          type: array
          description: >
            What the number's kind can be used for: `sms`, `mms` and `voice`

            for a purchased carrier number; for a registered carrier number

            `sms` and `mms` when it is a message sender and `voice` when it

            is enabled for calls; `imessage` for an iMessage line. It is not a
            per-number

            measurement; `capabilities` says what the number can do now.
          items:
            $ref: '#/components/schemas/Channel'
        capabilities:
          type: object
          description: What the number can do now.
          required:
            - messages
            - calls
          additionalProperties: false
          properties:
            messages:
              type: boolean
              description: >
                Whether a message can be sent from the number. A purchased

                number can once its 10DLC campaign is approved and the

                carrier has confirmed the number's assignment to it; a

                registered carrier sender needs both the ready flag and a
                matching

                enabled carrier route. A retained device uses its sender flag.
            calls:
              type: boolean
              description: Whether the number is enabled for calls.
        voice_url:
          type:
            - string
            - 'null'
          format: uri
          description: Where the TwiML for an incoming call is fetched.
        voice_method:
          oneOf:
            - $ref: '#/components/schemas/HttpMethod'
            - type: 'null'
        voice_fallback_url:
          type:
            - string
            - 'null'
          format: uri
        voice_fallback_method:
          oneOf:
            - $ref: '#/components/schemas/HttpMethod'
            - type: 'null'
        status_callback:
          type:
            - string
            - 'null'
          format: uri
          description: Receives the status of incoming calls.
        status_callback_method:
          oneOf:
            - $ref: '#/components/schemas/HttpMethod'
            - type: 'null'
        campaign_id:
          type:
            - string
            - 'null'
          description: >-
            The assigned campaign's ID. Null for unassigned, registered, and
            requested numbers.
        sms:
          $ref: '#/components/schemas/NumberSms'
        price:
          description: >-
            The settled acquisition price, or null for a number with no retail
            purchase.
          oneOf:
            - $ref: '#/components/schemas/Price'
            - type: 'null'
        monthly_price:
          description: >-
            The account's current monthly rate for a settled retail purchase.
            Null for requested and registered numbers, an acquisition without a
            retail purchase record, or an account without a monthly rate.
          oneOf:
            - $ref: '#/components/schemas/Price'
            - type: 'null'
        created_at:
          $ref: '#/components/schemas/NullableTimestamp'
          description: >-
            When the number was bought or the iMessage request was fulfilled.
            `null` for a registered number.
    PhoneNumber:
      type: string
      description: A phone number in E.164 form.
      pattern: ^\+[1-9][0-9]{6,14}$
      example: '+14155550100'
    HttpMethod:
      type: string
      enum:
        - GET
        - POST
    Channel:
      type: string
      enum:
        - sms
        - mms
        - voice
        - imessage
    NumberSms:
      type: object
      required:
        - enabled
        - blocked_reason
      additionalProperties: false
      properties:
        enabled:
          type: boolean
          description: Whether this number is enabled for carrier SMS.
        blocked_reason:
          description: >
            Why it would not: `no_campaign` (the number is in no

            campaign), `campaign_not_approved`,

            `carrier_assignment_pending` (the carrier has not confirmed

            the number's assignment to the campaign, or its last

            confirmation is more than ten minutes old) or

            `number_not_active` (the line or its carrier route is disabled, the
            line is paused, or the

            account owes money), or `channel_not_supported` (a registered line

            for voice or iMessage only). Null when `enabled` is true.
          oneOf:
            - type: string
              enum:
                - no_campaign
                - campaign_not_approved
                - carrier_assignment_pending
                - number_not_active
                - channel_not_supported
            - type: 'null'
    Price:
      type: object
      description: |
        An amount in US dollars. `amount` is a decimal string with two to six
        decimals; `amount_micro_usd` is the same amount as every other money
        member of this API states it.
      required:
        - amount
        - amount_micro_usd
        - currency
      additionalProperties: false
      properties:
        amount:
          type: string
          pattern: ^[0-9]+\.[0-9]{2,6}$
        amount_micro_usd:
          type: integer
          format: int64
          minimum: 0
        currency:
          type: string
          const: USD
      example:
        amount: '4.00'
        amount_micro_usd: 4000000
        currency: USD
    NullableTimestamp:
      type:
        - string
        - 'null'
      format: date-time
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: object
          required:
            - code
            - message
          additionalProperties: false
          properties:
            code:
              $ref: '#/components/schemas/ErrorCode'
            message:
              type: string
            details:
              type: object
              description: >
                Machine-readable context. `field` names the request member,

                parameter or header at fault; `reason` narrows `unprocessable`,

                and `forbidden` for a verified person with no seat (`no_seat`),

                whose active membership could not be confirmed
                (`membership_unclassified`), or

                whose company has no usable account (`account_required`,
                `account_suspended`).
              properties:
                field:
                  type: string
                reason:
                  type: string
                recovery:
                  type: string
                  enum:
                    - retry_same_idempotency_key
                    - read_resource
                    - reconcile_tag_membership
                  description: >-
                    Required for write_outcome_unknown. Follow the
                    operation-specific recovery before attempting another write.
                required_permission:
                  $ref: '#/components/schemas/Permission'
              additionalProperties: true
    ErrorCode:
      type: string
      description: >
        The catalogue of error codes, with the status each is sent with.


        | Code | Status | Meaning |

        | --- | --- | --- |

        | `invalid_request` | 400 | The request is malformed: bad JSON, an
        unknown or mistyped member, a bad parameter or header. |

        | `unauthenticated` | 401 | No credential, or one that does not verify.
        |

        | `insufficient_funds` | 402 | The balance cannot cover the price, or
        debt is outstanding. |

        | `forbidden` | 403 | The account, resource or deployment refuses this
        operation. |

        | `permission_denied` | 403 | The credential lacks the named permission.
        See `details.required_permission`. |

        | `not_found` | 404 | No such route, or no such resource in this
        account. |

        | `method_not_allowed` | 405 | The route exists and does not take this
        method. |

        | `conflict` | 409 | The resource is not in a state that allows the
        change. |

        | `idempotency_conflict` | 409 | The `Idempotency-Key` was used for a
        different request. |

        | `payload_too_large` | 413 | The request body is over the limit. |

        | `unsupported_media_type` | 415 | The body is not `application/json`. |

        | `unprocessable` | 422 | The request is well formed and cannot be
        carried out; `details.reason` says why. |

        | `unsupported` | 422 | The member or value is defined and not available
        yet. |

        | `rate_limited` | 429 | Too many requests; wait `Retry-After` seconds.
        |

        | `internal` | 500 | An unexpected failure. |

        | `unavailable` | 503 | A dependency is unavailable or the request ran
        out of time; retry. |

        | `upstream_unavailable` | 503 | The resource service is unavailable.
        Wait the number of seconds in Retry-After. |

        | `write_outcome_unknown` | 503 | The owner may have committed. Follow
        details.recovery. Retry-After is omitted. |
      enum:
        - invalid_request
        - unauthenticated
        - insufficient_funds
        - forbidden
        - permission_denied
        - not_found
        - method_not_allowed
        - conflict
        - idempotency_conflict
        - payload_too_large
        - unsupported_media_type
        - unprocessable
        - unsupported
        - rate_limited
        - internal
        - unavailable
        - upstream_unavailable
        - write_outcome_unknown
    Permission:
      type: string
      enum:
        - accounts:create
        - billing:history
        - billing:read
        - billing:refill
        - billing:top_up
        - brands:read
        - brands:write
        - calls:create
        - calls:read
        - calls:write
        - campaigns:read
        - campaigns:write
        - company_settings:read
        - contacts:read
        - contacts:write
        - keys:manage
        - me:read
        - media:read
        - media:write
        - messages:read
        - messages:send
        - messages:write
        - number_orders:cancel
        - number_orders:create
        - number_orders:read
        - numbers:purchase
        - numbers:read
        - numbers:release
        - numbers:write
        - operations:read
        - prices:read
        - recordings:read
        - recordings:write
        - settings:read
        - settings:write
        - subaccounts:manage
        - tags:read
        - tags:write
        - team:manage
        - team:read
        - variables:read
        - variables:write
        - webhooks:manage
        - webhooks:receive
        - workflows:read
        - workflows:write
  headers:
    RequestId:
      description: |
        `Request-Id`. Identifies this request in Sendblue's logs. Present on
        every response of this API, success or error, and readable by a page
        on an allowed origin.
      schema:
        type: string
        pattern: ^RQ[0-9a-f]{32}$
      example: RQ0123456789abcdef0123456789abcdef
    RetryAfter:
      description: >-
        Seconds to wait before repeating the request. Present on throttled
        requests and resource service outages.
      schema:
        type: integer
  responses:
    Error:
      description: >
        Any response that is not 2xx: `400 invalid_request`,

        `401 unauthenticated`, `402 insufficient_funds`, `403 forbidden` or
        `permission_denied`,

        `404 not_found`, `405 method_not_allowed`, `409 conflict` or

        `idempotency_conflict`, `413 payload_too_large`,

        `415 unsupported_media_type`, `422 unprocessable`, `429 rate_limited`,

        `500 internal`, `503 unavailable`, `upstream_unavailable` or
        `write_outcome_unknown`.
      headers:
        Request-Id:
          $ref: '#/components/headers/RequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: invalid_request
              message: Unknown field
              details:
                field: colour
  securitySchemes:
    person:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A person's session: `Authorization: Bearer <ID token>`, the ID token the
        Sendblue sign-in issues. The person acts in their company's root account
        with the role of their seat.
    bearer:
      type: http
      scheme: bearer
      bearerFormat: <credential id>.<secret>
      description: >-
        `Authorization: Bearer <credential id>.<secret>`: an API key ID (`SK…`)
        with the key's secret, or an account ID (`AC…`) with the account's
        token. An existing Sendblue API key is accepted in the same form.
    legacyKeyId:
      type: apiKey
      in: header
      name: sb-api-key-id
      description: >-
        The ID of an existing Sendblue API key (or of an `SK…` key or `AC…`
        account), sent together with `sb-api-secret-key`.
    legacyKeySecret:
      type: apiKey
      in: header
      name: sb-api-secret-key
      description: The credential's secret, sent together with `sb-api-key-id`.

````

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