Tags API

This guide will teach you how to use the Tags API, which you'll use to retrieve all the tags from your repository.


📦 Beta Access

The tags API is currently in the beta stage of its development cycle. If you can't access the endpoint, you can request access via the Prismic community forum.

What is it?

Prismic has a native document tagging system to help you organize your documents. The Tags API is a tool that allows you to hit an endpoint to retrieve all the tags of your repository.

Tags API endpoint

The tags API endpoint allows you to return all the repository's tags in an array. Here is an example URL of a tags API endpoint:

Copy
https://your-repo-name.cdn.prismic.io/api/tags

When you hit the /api/tags endpoint, you will get an array with all the existing tags of the repository. Any tags added to published documents and documents in releases will appear in the array. Here's a body response example:

Copy
["blue", "yellow", "red"]

Any tags added to drafts and documents in releases will also apear in the response.

If the repository is brand new and without any tags, we return a 404. Otherwise, it will be an empty array [].


Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.