---
title: "Create Shortened URLs"
method: POST
path: "/v1/short_urls"
tags: ["URL Shortener"]
---

# Create Shortened URLs

`POST /v1/short_urls`

## Request

- Base URL: `https://api.dexatel.com`
- URL: `https://api.dexatel.com/v1/short_urls`
- Auth: API key in header `X-Dexatel-Key`

## Request body

- ShortUrlsPostRequestDto
  - `data` object, required
    - `name` string, required: The Name of the shortened URL
    - `long_url` string, required: The original URL
    - `ttl` number: Lifetime of the shortened URL. The default value is 3 month

## Response `200`

OK

- ShortUrlsResponseWrapperDto
  - `data` object
    - `account_id` string, uuid: The unique identifier of the account
    - `name` string: The Name of the shortened URL
    - `short_url` string: The shortened version of the original URL generated by system
    - `long_url` string: The original URL
    - `created` string, date-time: Creation date of the shortened URL in UTC, formatted as yyyy-mm-dd hh:mm:ss
    - `expires` string, date-time: Expiration date of the shortened URL in UTC, formatted as yyyy-mm-dd hh:mm:ss

## Other responses

- `400`: **Bad Request:** Code Message Description 9601 'data.long\_url' is required 9602 'data.long\_url' is too long The Long URL must be at most 1024 characters 9603 'data.long\_url' is invalid 9604 'data.ttl' is invalid, please use a valid hour value in the range (1 - 8760) 9608 'data.name' is required 9609 'data.name' is too long Name must be at most 45 characters
- `409`: **Conflict:** Code Message 9610 'data.name' already exists

---

[API](https://skmtc.dev/dexatel/apis/miscellaneous.md) - [All operations](https://skmtc.dev/dexatel/apis/miscellaneous/llms.txt) - [OpenAPI document](https://skmtc.dev/dexatel/apis/miscellaneous/revisions/44500422bb80?raw)
