Short Codes API

Short codes API

List short codes

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[messaging_profile_id]
string

Filter by Messaging Profile ID. Use the string null for phone numbers without assigned profiles. A synonym for the /messaging_profiles/{id}/short_codes endpoint when querying about an extant profile.

Responses
200

Successful response with a list of short codes.

Response Schema: application/json
Array of objects (ShortCode)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/short_codes
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "country_code": "US",
      • "created_at": "2019-01-23T18:10:02.574Z",
      • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      • "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      • "record_type": "short_code",
      • "short_code": "12345",
      • "updated_at": "2019-01-23T18:10:02.574Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Retrieve a short code

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

The id of the short code

Responses
200

Successful response with details about a short code.

Response Schema: application/json
object (ShortCode)
country_code
string^[A-Z]{2}$

ISO 3166-1 alpha-2 country code.

created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

id
string <uuid>

Identifies the type of resource.

messaging_profile_id
required
string

Unique identifier for a messaging profile.

record_type
string

Identifies the type of the resource.

Value: "short_code"
short_code
string

Short digit sequence used to address messages.

updated_at
string <date-time>

ISO 8601 formatted date indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/short_codes/{id}
Request samples
Response samples
application/json
{
  • "data": {
    • "country_code": "US",
    • "created_at": "2019-01-23T18:10:02.574Z",
    • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "record_type": "short_code",
    • "short_code": "12345",
    • "updated_at": "2019-01-23T18:10:02.574Z"
    }
}

Update short code

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.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

The id of the short code

Request Body schema: application/json
required

Short code update

messaging_profile_id
required
string

Unique identifier for a messaging profile.

Responses
200

Successful response with details about a short code.

Response Schema: application/json
object (ShortCode)
country_code
string^[A-Z]{2}$

ISO 3166-1 alpha-2 country code.

created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

id
string <uuid>

Identifies the type of resource.

messaging_profile_id
required
string

Unique identifier for a messaging profile.

record_type
string

Identifies the type of the resource.

Value: "short_code"
short_code
string

Short digit sequence used to address messages.

updated_at
string <date-time>

ISO 8601 formatted date indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
patch/short_codes/{id}
Request samples
application/json
{
  • "messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000"
}
Response samples
application/json
{
  • "data": {
    • "country_code": "US",
    • "created_at": "2019-01-23T18:10:02.574Z",
    • "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    • "record_type": "short_code",
    • "short_code": "12345",
    • "updated_at": "2019-01-23T18:10:02.574Z"
    }
}