---
title: "Update a messaging hosted number"
method: PATCH
path: "/messaging_hosted_numbers/{id}"
tags: ["Messaging"]
---

# Update a messaging hosted number

`PATCH /messaging_hosted_numbers/{id}`

Update the messaging settings for a hosted number.

## Path parameters

- `id` string, required

## Request body

- UpdatePhoneNumberMessagingSettingsRequest
  - `messaging_profile_id` string — Configure the messaging profile this phone number is assigned to: * Omit this field or set its value to `null` to keep the current value. * Set this field to `""` to unassign the number from its messaging profile * Set this field to a quoted UUID of a messaging profile to assign this number to that messaging profile
  - `messaging_product` string — Configure the messaging product for this number: * Omit this field or set its value to `null` to keep the current value. * Set this field to a quoted product ID to set this phone number to that product
  - `tags` string[] — Tags to set on this phone number.

## Response `200`

Successful response with the updated hosted number.

- object
  - `data` PhoneNumberWithMessagingSettings
    - `record_type` 'messaging_phone_number' | 'messaging_settings' — Identifies the type of the resource.
    - `id` string — Identifies the type of resource.
    - `phone_number` string — +E.164 formatted phone number.
    - `messaging_profile_id` string, nullable — Unique identifier for a messaging profile.
    - `created_at` string, date-time — ISO 8601 formatted date indicating when the resource was created.
    - `updated_at` string, date-time — ISO 8601 formatted date indicating when the resource was updated.
    - `country_code` string — ISO 3166-1 alpha-2 country code.
    - `type` 'long-code' | 'toll-free' | 'short-code' | 'longcode' | 'tollfree' | 'shortcode' — The type of the phone number
    - `health` NumberHealthMetrics — High level health metrics about the number and it's messaging sending patterns.
      - `message_count` integer, required — The number of messages analyzed for the health metrics.
      - `inbound_outbound_ratio` number, float, required — The ratio of messages received to the number of messages sent.
      - `success_ratio` number, float, required — The ratio of messages sucessfully delivered to the number of messages attempted.
      - `spam_ratio` number, float, required — The ratio of messages blocked for spam to the number of messages attempted.
    - `eligible_messaging_products` string[] — The messaging products that this number can be registered to use
    - `traffic_type` string — The messaging traffic or use case for which the number is currently configured.
    - `messaging_product` string — The messaging product that the number is registered to use
    - `features` object
      - `sms` MessagingFeatureSet, nullable — The set of features available for a specific messaging use case (SMS or MMS). Features can vary depending on the characteristics the phone number, as well as its current product configuration.
        - `domestic_two_way` boolean, required — Send messages to and receive messages from numbers in the same country.
        - `international_inbound` boolean, required — Receive messages from numbers in other countries.
        - `international_outbound` boolean, required — Send messages to numbers in other countries.
      - `mms` MessagingFeatureSet, nullable — The set of features available for a specific messaging use case (SMS or MMS). Features can vary depending on the characteristics the phone number, as well as its current product configuration.
        - `domestic_two_way` boolean, required — Send messages to and receive messages from numbers in the same country.
        - `international_inbound` boolean, required — Receive messages from numbers in other countries.
        - `international_outbound` boolean, required — Send messages to numbers in other countries.
    - `organization_id` string — The organization that owns this phone number.
    - `tags` string[] — Tags associated with this phone number.

## Other responses

- `401` — Unauthorized
- `404` — Not Found

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/versions/8f5f4e537994/schema)
