A source code is a “phone number” (they may also include letters) that are used for sending SMS and MMS from your account. On a user’s device, this source code will appear as the “sender” of the message.
Historically, most source codes were short codes—a 5- or 6-digit numeric code. However, now it is not uncommon to use long codes, which are 10 digits and appear more like a “traditional” phone number. Outside of North America, some countries also allow alphanumeric codes, a mixture of letters, numbers, and spaces up to 11 characters long.
In this section, we’ll show you how to use a GET
method to look up all of the active source codes provisioned to your account.
Available API Methods
Elements & Attributes
Element Name | Type | Description |
---|---|---|
sourcecode | String | The short, long or alphanumeric code value. |
country_code | String | The E.164 Country Calling Code for the country where the code is provisioned. |
sourcecode_type | String | "SC" for short or long numeric codes; "ANC" for alphanumeric codes. |
primary_country_name | String | A human-readable name of the primary country where the code is provisioned. |
sms_enabled | Boolean | Indicates whether the code is provisioned for SMS messaging. |
mms_enabled | Boolean | Indicates whether the code is provisioned for MMS messaging. |
sourcecode_end_date | String | ISO-8601 Date string indicating when the current code lease expires. |
Entity Example
Below is an example of a source code entity.
{
"sourcecode": "12345",
"country_code": "1",
"sourcecode_type": "SC",
"primary_country_name": "United States",
"sms_enabled": true,
"mms_enabled": true,
"sourcecode_end_date": "2025-12-02T05:59:00Z"
}