v77

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012528701.8 MB
Short Codes

Get short code

Retrieves the details of a short code.

Permissions

The API token used to authenticate must have the following scope(s) enabled to make a successful request: Numbers.

Learn more about API scopes.

get/api/relay/rest/short_codes/{id}

Path parameters

idstring uuid required

Universal Unique Identifier.

Unique ID of the short code.

Response

The request has succeeded.

idstring uuid required

Universal Unique Identifier.

namestring nullable required

The name given to the short code.

numberstring required

The short code number.

capabilitiesShortCodeCapability[] required

The messaging capabilities of the short code.

number_type'shortcode' required

The type of number (always 'shortcode').

code_type'vanity' | 'random' required

Short code type.

country_codestring required

The ISO 3166-1 alpha-2 country code.

created_atstring required

The date and time when the short code was created.

updated_atstring required

The date and time when the short code was last updated.

next_billed_atstring nullable required

The date and time when the short code will next be billed.

lease_durationstring nullable required

The lease duration of the short code (e.g., '12 months').

message_handler'relay_context' | 'laml_webhooks' | 'laml_application' required

Message handler type for short codes.

message_request_urlstring nullable required

The URL to send message requests to when using laml_webhooks handler.

message_request_method'GET' | 'POST' required

HTTP method type.

message_fallback_urlstring nullable required

The fallback URL for message requests.

message_fallback_method'GET' | 'POST' required

HTTP method type.

message_laml_application_idstring uuid required

Universal Unique Identifier.

message_relay_contextstring nullable required

The Relay context to use when using relay_context handler.

Example response

{
  "name": "My Short Code",
  "number": "12345",
  "number_type": "shortcode",
  "country_code": "US",
  "created_at": "2023-01-15T10:30:00Z",
  "updated_at": "2023-01-15T10:30:00Z",
  "next_billed_at": "2024-01-15T10:30:00Z",
  "lease_duration": "12 months",
  "message_request_url": "https://example.com/message",
  "message_fallback_url": "https://example.com/fallback",
  "message_relay_context": "my-context"
}