Skip to content

Create Tracking Link (Custom Short URL)

Use this endpoint to create a short tracking link that redirects to your specified upstream URL. You can later reference this link when sending messages.

POST https://api.cellcast.com/api/v2/tracking-link

bash
curl --location 'https://api.cellcast.com/api/v2/tracking-link' \
--header 'Authorization: {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "shortUrl": "cell",
    "upstreamUrl": "www.cellcast.com"
}'
  • Replace with your actual API key.
  • shortUrl: at least three alphanumeric characters. This will appear in your message as gosite.au/{shortUrl}.
  • upstreamUrl: the destination URL that users will be redirected to.

After creating a tracking link, retrieve its _id, shortUrl, and longUrl via the list endpoint. See Get Tracking Links.

Responses

200 Success

json
{
    "app_type": "web",
    "app_version": "1.0",
    "maintainence": 0,
    "new_version": 0,
    "force_update": 0,
    "invalid_token": 0,
    "refresh_token": "",
    "show_message": 0,
    "is_enc": false,
    "status": true,
    "message": "tracking link created successfully!",
    "message_type": "toast",
    "data": {
        "click": 0,
        "linkSequenceNumber": 0,
        "_id": "68ef6ac42000000000000000",
        "shortUrl": "cell",
        "upstreamUrl": "www.cellcast.com",
        "user": "66208cd39000000000000000",
        "expireAt": "2025-12-15T09:35:00.983Z",
        "createdAt": "2025-10-15T09:35:00.983Z",
        "updatedAt": "2025-10-15T09:35:00.983Z",
        "__v": 0
    },
    "error": {}
}

400 Bad Request

json
{
    "app_type": "web",
    "app_version": "1.0",
    "maintainence": 0,
    "new_version": 0,
    "force_update": 0,
    "invalid_token": 0,
    "refresh_token": "",
    "show_message": 0,
    "is_enc": false,
    "status": false,
    "message_type": "toast",
    "message": "shortUrl is already exist",
    "data": {},
    "error": null
}