Skip to main content

Update a phone number with messaging settings

PATCH 
/phone_numbers/:id/messaging

Update a phone number with messaging settings

Request

Path Parameters

    id stringrequired

    Identifies the type of resource.

Body

required

Updated messaging settings for the phone number

    messaging_profile_id string

    Unique identifier for a messaging profile.

    messaging_product string

    The requested messaging product the number should be on

Responses

200: Successful response with details about a phone number including messaging settings.

default: Unexpected error

Request samples


curl -L -X PATCH 'https://api.telnyx.com/v2/phone_numbers/:id/messaging' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"messaging_profile_id": "dd50eba1-a0c0-4563-9925-b25e842a7cb6",
"messaging_product": "P2P"
}'

Response samples


{
"data": {
"record_type": "messaging_settings",
"id": "1293384261075731499",
"phone_number": "+18005550001",
"messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"country_code": "US",
"type": "toll-free",
"health": {
"message_count": 122,
"inbound_outbound_ratio": 0.43,
"success_ratio": 0.94,
"spam_ratio": 0.06
},
"eligible_messaging_products": [
"A2P"
],
"traffic_type": "A2P",
"messaging_product": "A2P",
"features": {
"sms": {
"domestic_two_way": true,
"international_inbound": true,
"international_outbound": true
},
"mms": null
}
}
}