Skip to main content

Update short code

PATCH 
/short_codes/:id

Update the settings for a specific short code. To unbind a short code from a profile, set the messaging_profile_id to null or an empty string.

Request

Path Parameters

    id uuidrequired

    The id of the short code

Body

required

Short code update

    messaging_profile_id stringrequired

    Unique identifier for a messaging profile.

Responses

200: Successful response with details about a short code.

default: Unexpected error

Request samples


curl -L -X PATCH 'https://api.telnyx.com/v2/short_codes/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000"
}'

Response samples


{
"data": {
"record_type": "short_code",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"short_code": "12345",
"country_code": "US",
"messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z"
}
}