Short Codes

List short codes

Lists the messaging Short Codes connected to your SignalWire project. These leased codes can send and receive high-volume messages through their configured handlers. Standard long-code phone numbers are available through List phone numbers. Results are sorted by creation date, most recent first.

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

Query parameters

filter_namestring

Filter by name. Returns all short codes containing this value as a substring.

filter_numberstring

Filter by number. Returns all short codes containing this value as a substring.

page_numberinteger

The page number to retrieve.

page_sizeinteger

The number of results per page.

page_tokenstring

Token for cursor-based pagination.

Response

The request has succeeded.

Example response

{
  "data": [
    {
      "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"
    }
  ]
}

Changes

No changes found, but 3 of the 137 revisions have a changelog that could not be searched — this endpoint may have changed in one of them.