🌐 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| domain | string | Your custom domain for the dynamic link. Must be configured in your ChottuLink dashboard. | yourapp.chottu.link |
| destination_url | string | The final URL where users will be redirected. This can be your website or app store link. | https://yourapp.com/content |
| link_name | string | A descriptive name for your dynamic link. Used for identification in the dashboard. | Summer Sale |
Link Behaviors
| Parameter | Type | Description | Values |
|---|---|---|---|
| ios_behavior | integer | Controls how the link behaves on iOS devices | 1: Open in Browser2: Open in App |
| android_behavior | integer | Controls how the link behaves on Android devices | 1: Open in Browser2: Open in App |
Optional Parameters
Domain Configuration
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| selected_path | string | No | The 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
| Parameter | Type | Description | Example |
|---|---|---|---|
| utm_source | string | Identifies the source of your traffic | email |
| utm_medium | string | Identifies the medium of your traffic | newsletter |
| utm_campaign | string | Identifies the campaign name | summer2025 |
| utm_term | string | Identifies paid keywords | best summer sale |
| utm_content | string | Used to differentiate similar content | banner_email |
Social Sharing Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| social_title | string | Title that appears when the link is shared on social media | Summer Sale |
| social_description | string | Description that appears when the link is shared on social media | Check out our amazing deals! |
| social_image_url | string | Image URL that appears when the link is shared on social media | https://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
| Field | Type | Description | Example |
|---|---|---|---|
| status | string | Response status indicating success | "success" |
| message | string | Human-readable success message | "Link created successfully" |
| short_url | string | The 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.