---
title: "Create a short url"
method: POST
path: "/2/url-shortener"
tags: ["Short url"]
---

# Create a short url

`POST /2/url-shortener`

This endpoint allows you to create a short url.

## Request body

- 0af64ecbShortUrl
  - `url` string, required
  - `expiration_date` integer

## Response `200`

Default Response

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 0af64ecbShortUrlReturn
    - `code` string, required
    - `url` string, required
    - `created_at` integer, required
    - `expiration_date` integer, required

## Other responses

- `422` — Unprocessable Entity

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
