---
title: "List short codes"
method: GET
path: "/api/relay/rest/short_codes"
tags: ["Short Codes"]
---

# List short codes

`GET /api/relay/rest/short_codes`

Returns a list of your short codes. The short codes are returned sorted
by creation date, with the most recent appearing 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](/docs/platform/your-signalwire-api-space).

## Query parameters

- `filter_name` string
- `filter_number` string
- `page_number` integer
- `page_size` integer
- `page_token` string

## Response `200`

The request has succeeded.

- ShortCodeListResponse — Response containing a list of short codes.
  - `links` PaginationLinks, required — Pagination links for list responses.
    - `self` string, required — Link to the current page.
    - `first` string, required — Link to the first page.
    - `next` string — Link to the next page. Only present when there are more results.
    - `prev` string — Link to the previous page. Only present when not on the first page.
  - `data` ShortCode[], required — List of short codes.
    - `id` string, uuid, required — Universal Unique Identifier.
    - `name` string, nullable, required — The name given to the short code.
    - `number` string, required — The short code number.
    - `capabilities` ShortCodeCapability[], 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_code` string, required — The ISO 3166-1 alpha-2 country code.
    - `created_at` string, required — The date and time when the short code was created.
    - `updated_at` string, required — The date and time when the short code was last updated.
    - `next_billed_at` string, nullable, required — The date and time when the short code will next be billed.
    - `lease_duration` string, 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_url` string, 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_url` string, nullable, required — The fallback URL for message requests.
    - `message_fallback_method` 'GET' | 'POST', required — HTTP method type.
    - `message_laml_application_id` string, uuid, required — Universal Unique Identifier.
    - `message_relay_context` string, nullable, required — The Relay context to use when using relay_context handler.

## Other responses

- `400` — The request is invalid.
- `401` — Access is unauthorized.
- `500` — An internal server error occurred.

---

[API](https://skmtc.net/signalwire/apis/signalwire-rest-api.md) · [All operations](https://skmtc.net/signalwire/apis/signalwire-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/signalwire/signalwire-rest-api/versions/05c5164b85c7/schema)
