Productsup
Platform API

Site tags

List, create, and delete site tags using the Platform API.

4 min read

Site tag endpoints let you manage and customize tags on your Productsup sites. Tags provide a flexible way to identify and reference sites using your own key-value pairs.

List

Use a GET request to list all tags for a site or retrieve a specific tag by its ID.

List all tags for a site

GET https://platform-api.productsup.io/platform/v2/sites/<siteId>/tags

Request
curl --location 'https://platform-api.productsup.io/platform/v2/sites/<SITE_ID>/tags' \
--header 'X-Auth-Token: TOKEN'
FieldTypeDescription
siteIdintegerSite to list tags for
Response
{
    "success": true,
    "Tags": [
        {
            "id": 1,
            "key": "region",
            "value": "emea",
            "readonly": 0
        }
    ]
}

Response fields

FieldTypeDescription
successbooleanIndicates request status
TagsarrayList of tag fields

Tag fields

FieldTypeDescription
idintegerTag identifier
keystringName of the tag
valuestringValue of the tag
readonlyinteger1 when end users cannot edit this tag in the platform UI, otherwise 0

Get a tag by its identifier

GET https://platform-api.productsup.io/platform/v2/sites/<siteId>/tags/<tagId>

Request
curl --location 'https://platform-api.productsup.io/platform/v2/sites/<SITE_ID>/tags/<TAG_ID>' \
--header 'X-Auth-Token: TOKEN'
FieldTypeDescription
siteIdintegerSite the tag belongs to
tagIdintegerTag to retrieve

Create

Use a POST request to create a new tag for a site.

POST https://platform-api.productsup.io/platform/v2/sites/<siteId>/tags

Request
curl --location 'https://platform-api.productsup.io/platform/v2/sites/<SITE_ID>/tags' \
--header 'X-Auth-Token: TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "site_id": "<SITE_ID>",
  "key": "<TAG_KEY>",
  "value": "<TAG_VALUE>",
  "readonly": 0
}'

Request body fields

FieldTypeDescription
site_idstringRequired. Site the tag belongs to.
keystringRequired. Name of the tag.
valuestringRequired. Value of the tag.
readonlyintegerSet to 1 to prevent end users from editing this tag in the platform UI. Defaults to 0.

See response fields and tag fields for the response structure.

Response status codes

CodeMessageDetails
201Tag created
400Bad RequestThe request body is missing a required field or is malformed
401UnauthorizedInvalid authentication token
404The requested resource could not be foundThe site does not exist

A tag's key must be unique per site. Creating a tag with a key that already exists for that site returns an error.

Delete

Use a DELETE request to remove a tag from a site.

DELETE https://platform-api.productsup.io/platform/v2/sites/<siteId>/tags/<tagId>

Request
curl --location --request DELETE 'https://platform-api.productsup.io/platform/v2/sites/<SITE_ID>/tags/<TAG_ID>' \
--header 'X-Auth-Token: TOKEN'
FieldTypeDescription
siteIdintegerSite the tag belongs to
tagIdintegerTag to delete

Response status codes

CodeMessageDetails
204Tag deleted; no response body
401UnauthorizedInvalid authentication token
404The requested resource could not be foundThe site or tag does not exist

On this page

Still stuck?

Reach out to our support team and we’ll help you get unstuck.

Contact support