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": ""
}
FieldTypeRequiredDescription
namestringYesDisplay name for this template (max 40 characters)
sourcestringNoUTM source parameter (e.g. newsletter, google)
mediumstringNoUTM medium parameter (e.g. email, cpc)
campaignstringNoUTM campaign parameter (e.g. spring-sale)
termstringNoUTM term parameter — paid search keywords
contentstringNoUTM 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

ParameterDescription
idThe 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

CodeHTTPDescription
MISSING_NAME400The name field is required and cannot be empty.
TEMPLATE_LIMIT400You have reached the 20-template maximum. Delete an existing template first.
NOT_FOUND404No template with that ID exists in your account.