Creating a new tag

🚧

Check for compatibility first

Double check whether your API key or OAuth token is enabled to use the Tags feature.
For every account, you can check for features and limits with a preliminary API call.

Tags can be created via a POST method to http://api.rebrandly.com/v1/tags, which accepts a JSON object describing the Tag .

Tag Parameters

The table below shows the parameters you should specify when creating a Tag:

Link propertyTypeConstraintsDescription
namestringrequired
UTF8
Min 2 chars
Unique name of the tag
colorstringoptional
Valid hex
Hexadecimal representation of a color assigned to the tag
Creating a new Tag
$ curl http://api.rebrandly.com/tags \
-X POST \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN_HERE' \
-H 'Content-Type: application/json' -d '
{
  "name": "personal",
  "color": "ddeeff"
}'

HTTP/1.1 200 OK
JSON Response (just created Tag)
{
  "id": "3aehje9d536s46d59ba5bcf49b582ear",
  "name": "personal",
  "color": "#ddeeff"
}