---
title: "Get short code"
method: GET
path: "/api/relay/rest/short_codes/{id}"
tags: ["Short Codes"]
---

# Get short code

`GET /api/relay/rest/short_codes/{id}`

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](/docs/platform/your-signalwire-api-space).

## Path parameters

- `id` string, uuid, required — Universal Unique Identifier.

## Response `200`

The request has succeeded.

- ShortCodeResponse — Response containing a single short code.
  - `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

- `401` — Access is unauthorized.
- `404` — The server cannot find the requested resource.
- `422` — The request failed validation. See errors for details.
- `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)
