Getting query parameters
By default, there are five prefilled parameters you will find under your workspace's template: Source, Medium, Campaign, Term and Content.
Parameters in a workspace can be fetched via:
GET
HTTP request to/templates/{TEMPLATE_ID}/params
and example of request is
$ curl 'https://templating.rebrandly.com/v1/url/querystring/templates/{TEMPLATE_ID}/params' \
-H 'apikey: YOUR_API_KEY' \
-H 'workspace: YOUR_WORKSPACE_ID' \
A 200
response for this request is
[
{
"id": "89e24bad4a37468d...",
"format": "string",
"options": [],
"label": "Source",
"placeholder": "e.g: Twitter, Facebook",
"key": "utm_source",
"extra": {
"metadata": {
"family": "utm"
}
}
},
{
"id": "cfea6d087da9481c...",
"format": "string",
"options": [],
"label": "Campaign",
"placeholder": "e.g: ACME-campaign",
"key": "utm_campaign",
"extra": {
"metadata": {
"family": "utm"
}
}
},
{
"id": "53026cacee0d4d12...",
"format": "string",
"options": [],
"label": "Content",
"placeholder": "e.g: text AD name",
"key": "utm_content",
"extra": {
"metadata": {
"family": "utm"
}
}
},
{
"id": "71f84c6c54094383...",
"format": "string",
"options": [],
"label": "Medium",
"placeholder": "e.g: cpc, banner, email",
"key": "utm_medium",
"extra": {
"metadata": {
"family": "utm"
}
}
},
{
"id": "9c58196ce4204eec...",
"format": "string",
"options": [],
"label": "Term",
"placeholder": "e.g: paid keywords",
"key": "utm_term",
"extra": {
"metadata": {
"family": "utm"
}
}
}
]
Updated 6 months ago