UTM Templates
Save and reuse UTM parameter presets when creating short links
UTM templates let you store frequently used campaign tracking parameter sets — source, medium, campaign, term, and content — so you do not have to retype them each time you create a short link. Templates are per-account and available across the dashboard, mobile app, and MCP integration. Each account can store up to 20 templates.
Templates are stored in your user profile and returned as part of GET /api/user/profile. Separate create and delete endpoints manage individual templates.
Base URL
https://awsys.co
Authentication
All UTM template endpoints require a valid API key passed as a Bearer token. See the Authentication page for details.
Authorization: Bearer YOUR_API_KEY
List UTM Templates
GET /api/user/profile
UTM templates are embedded in the user profile response. Fetch the profile to get the full list.
Relevant fields in the profile response
{
"utmTemplates": [
{
"id": "uuid-abc123",
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest",
"term": "",
"content": ""
}
]
}
curl example
curl https://awsys.co/api/user/profile \
-H "Authorization: Bearer YOUR_API_KEY"
Create a UTM Template
POST /api/user/utm-templates
Request body
{
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest",
"term": "",
"content": ""
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for this template (max 40 characters) |
source | string | No | UTM source parameter (e.g. newsletter, google) |
medium | string | No | UTM medium parameter (e.g. email, cpc) |
campaign | string | No | UTM campaign parameter (e.g. spring-sale) |
term | string | No | UTM term parameter — paid search keywords |
content | string | No | UTM content parameter — ad variant identifier |
Response — 201 Created
{
"success": true,
"template": {
"id": "uuid-abc123",
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest",
"term": "",
"content": ""
}
}
curl example
curl -X POST https://awsys.co/api/user/utm-templates \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Email Newsletter",
"source": "newsletter",
"medium": "email",
"campaign": "weekly-digest"
}'
Delete a UTM Template
DELETE /api/user/utm-templates/:id
Path parameters
| Parameter | Description |
|---|---|
id | The UUID of the template to delete (from the id field in list response) |
Response — 200 OK
{ "success": true }
curl example
curl -X DELETE https://awsys.co/api/user/utm-templates/uuid-abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
Error Codes
| Code | HTTP | Description |
|---|---|---|
MISSING_NAME | 400 | The name field is required and cannot be empty. |
TEMPLATE_LIMIT | 400 | You have reached the 20-template maximum. Delete an existing template first. |
NOT_FOUND | 404 | No template with that ID exists in your account. |