# Create tracked vanity short link
URL: /docs/api-reference/short-links-analytics/createShortLink

## POST `/api/v1/public/shortlinks`

**Summary:** Create tracked vanity short link
**Operation ID:** `createShortLink`

Generates a compressed vanity URL with optional custom slug and expiration. Automatically enables dynamic click-through rate (CTR) tracking.

**Authentication:** `X-Api-Key: sk_live_...` or `Authorization: Bearer sk_live_...`

### Request Body (`application/json`)

```json
{
  "type": "object",
  "required": [
    "originalUrl"
  ],
  "properties": {
    "originalUrl": {
      "type": "string",
      "format": "uri",
      "example": "https://example.com/promo/summer-sale?utm_source=sms"
    },
    "customCode": {
      "type": "string",
      "example": "summer26"
    },
    "title": {
      "type": "string",
      "example": "Summer 2026 Promo"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
```

### Responses

- **`201`**: Short link created

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "success"
    },
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "shortUrl": {
          "type": "string",
          "example": "https://smspro.link/s/summer26"
        },
        "shortCode": {
          "type": "string",
          "example": "summer26"
        },
        "originalUrl": {
          "type": "string"
        },
        "active": {
          "boolean": true,
          "example": true
        }
      }
    }
  }
}
```
- **`401`**: Authentication failed or API key missing