Create Short URL POST
Creates a short URL for a destination URL, for use inside SMS messages with click counting.
Authorization
API Key (Authentication) — send the header Authorization: Bearer <API_KEY> (API keys start with smsk_)
HTTP Request
http
POST https://public-api.smsup-plus.com/shorten/createContent Type
application/json
Parameter Description
| Property | Type | Required | Description |
|---|---|---|---|
url | string | Required | Destination URL. Must start with http:// or https:// |
messageId | string | Optional | Your own reference (e.g. a message ID) stored with the link; returned by Short URL Stats |
Response Description
| Property | Type | Description |
|---|---|---|
status | number | 200 on success |
data.shortCode | string | 8-character short code (a-z, A-Z, 0-9) |
data.shortUrl | string | Ready-to-use short link (short-link domain + shortCode) |
data.original | string | The destination URL you sent |
Request Example
bash
curl -X POST 'https://public-api.smsup-plus.com/shorten/create' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.example.com/promotion?utm_source=sms",
"messageId": "PROMO-2026-11"
}'js
const res = await fetch('https://public-api.smsup-plus.com/shorten/create', {
method: 'POST',
headers: { Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
url: 'https://www.example.com/promotion?utm_source=sms',
messageId: 'PROMO-2026-11',
}),
})
console.log(await res.json())Response Example
json
{
"status": 200,
"data": {
"shortCode": "aB3dE9xZ",
"shortUrl": "https://c0c.me/aB3dE9xZ",
"original": "https://www.example.com/promotion?utm_source=sms"
}
}Possible Errors
| HTTP | Response | Cause |
|---|---|---|
| 400 | {"status":400,"description":"invalid request body"} | Body is not JSON, or url is missing |
| 400 | {"status":400,"description":"URL must use http or https scheme"} | url does not start with http:// or https:// |
| 401 | {"error":"invalid api key"} | Invalid API key — see Errors |
| 500 | {"status":500,"description":"failed to create short URL"} | The link could not be created; retry |
TIP
Always use the shortUrl value exactly as returned (the domain above is only an example). When a recipient opens it they are redirected to the destination and the click is counted.
INFO
Every call creates a new link, even for a url you have shortened before.
