Creating a query parameter
You can create your custom Query Paramters which you'll be able to use to compose any Branded Link's destination URL in the workspace.
Parameters in a workspace can be created via:
POSTHTTP request to/templates/{TEMPLATE_ID}/params
Query parameter properties
The table below shows the property that can be passed in the request body.
Property | Type | Constraints | Description |
|---|---|---|---|
key | String |
| This is the key of the querystring pair key=value. |
label | String |
| A human-friendly label for the query string parameter. |
format | String |
| Specify the type of query parameter. Type |
options | Array of Objects |
| A list of values from which a user can choose a value for the parameter. It's useful to help teammates to compose a query string or to spped up the process in the UTM-builder on Rebrandly Dashboard. |
placeholder | String |
| The placeholder to show in the parameter input in UTM-builder on Rebrandly Dashboard |
default | String |
| Can store a default value for the query parameter |
An example of request is
$ curl 'https://templating.rebrandly.com/v1/url/querystring/templates/{TEMPLATE_ID}/params' \
-X POST \
-H 'apikey: YOUR_API_KEY' \
-H 'workspace: YOUR_WORKSPACE_ID' \
-H 'Content-Type: application/json' \
-d \
'{
"format": "string",
"key": "mycustomparam",
"label": "My Custom Param",
"placeholder": "Insert a value for this custom param"
}'A 200 response for this request is
{
"id": "feede945fdf147cb...",
"format": "string",
"options": [],
"label": "My Custom Param",
"placeholder": "Insert a value for this custom param"",
"key": "mycustomparam"
}Updated 2 days ago
