Skip to main content

🌐 Generate Dynamic Links via REST API

Use ChottuLink's REST API to programmatically create dynamic links from your backend or server-side scripts. This is ideal for scenarios where links need to be generated outside the app, such as in marketing campaigns, transactional messages, or automated workflows. Simply make a POST request with the required parameters, and receive a fully-qualified short or long link in response.

Endpoint

POST https://api2.chottulink.com/chotuCore/pa/v1/create-link

Authentication

Include your API key in the request header:

API-KEY: c_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API Key Replacement Required

Replace c_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx with your actual REST API integration key from the ChottuLink Dashboard.

Request Parameters

Parameter Guidelines:
  • All required parameters must be included in the request
  • Optional parameters can be omitted
  • UTM parameters are recommended for better analytics tracking
  • Social sharing parameters enhance the link's appearance when shared

Required Parameters

Domain Configuration
ParameterTypeDescriptionExample
domainstringYour custom domain for the dynamic link. Must be configured in your ChottuLink dashboard.yourapp.chottu.link
destination_urlstringThe final URL where users will be redirected. This can be your website or app store link.https://yourapp.com/content
link_namestringA descriptive name for your dynamic link. Used for identification in the dashboard.Summer Sale
Link Behaviors
ParameterTypeDescriptionValues
ios_behaviorintegerControls how the link behaves on iOS devices1: Open in Browser
2: Open in App
android_behaviorintegerControls how the link behaves on Android devices1: Open in Browser
2: Open in App

Optional Parameters

Domain Configuration
ParameterTypeRequiredDescriptionExample
selected_pathstringNoThe custom path component for your dynamic link. This will be appended to your domain to create the final short URL. If omitted, the system automatically generates a 6-character alphabetic path (e.g., AbCxYz).promo-summer
UTM Parameters
ParameterTypeDescriptionExample
utm_sourcestringIdentifies the source of your trafficemail
utm_mediumstringIdentifies the medium of your trafficnewsletter
utm_campaignstringIdentifies the campaign namesummer2025
utm_termstringIdentifies paid keywordsbest summer sale
utm_contentstringUsed to differentiate similar contentbanner_email
Social Sharing Parameters
ParameterTypeDescriptionExample
social_titlestringTitle that appears when the link is shared on social mediaSummer Sale
social_descriptionstringDescription that appears when the link is shared on social mediaCheck out our amazing deals!
social_image_urlstringImage URL that appears when the link is shared on social mediahttps://yourapp.com/images/sale.jpg

Example Request

curl --location 'https://api2.chottulink.com/chotuCore/pa/v1/create-link' \
--header 'API-KEY: c_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"domain": "yourapp.chottu.link",
"selected_path": "promo-summer",
"destination_url": "https://yourapp.com/content",
"link_name": "Summer Sale",
"ios_behavior": 2,
"android_behavior": 2,
"utm_source": "email",
"utm_medium": "newsletter",
"utm_campaign": "summer2025",
"utm_term": "best summer sale",
"utm_content": "banner_email",
"social_title": "Summer Sale",
"social_description": "Check out our amazing deals!",
"social_image_url": "https://yourapp.com/images/sale.jpg"
}'

Response

Success Response

Status Code: 201 Created

{
"status": "success",
"message": "Link created successfully",
"short_url": "https://yourapp.chottu.link/promo-summer"
}

Response Fields

Success Response Fields
FieldTypeDescriptionExample
statusstringResponse status indicating success"success"
messagestringHuman-readable success message"Link created successfully"
short_urlstringThe generated short URL for the dynamic link"https://yourapp.chottu.link/promo-summer"

Error Responses

Unauthorized Access

Status Code: 401 Unauthorized

{
"code": 130,
"errorMessage": "Authorization Failed!",
"error": {
"errorMessage": "Invalid API-KEY",
"fieldName": "UNAUTHORIZED_ACCESS"
}
}
Best Practices:
  • Use descriptive link names for better management
  • Include relevant UTM parameters for tracking
  • Test the generated links in both development and production environments
  • Keep social sharing parameters up to date

Rate Limits

The API is subject to rate limiting. Please contact support for specific rate limit information.