---
description: Set up authentication for Resource Tagging and make your first API calls.
title: Get started
image: https://developers.cloudflare.com/og-docs.png
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/resource-tagging/llms.txt  
> Use this file to discover all available pages before exploring further.

# Get started

Last updated Aug 24, 2026|Copy as Markdown|[View as Markdown](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/resource-tagging/get-started/index.md)|[Agent setup](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/agent-setup/)

This guide walks you through verifying that tagging works on your account and making your first API calls.

## Prerequisites

* At least one user with the Super Administrator, Workers Admin, or Tag Admin role. These roles can create, update, and delete tags.
* The API is the preferred interface for managing tags. You can also use the dashboard under **Manage Account** \> **Resource Tagging**, but you should be comfortable making authenticated HTTP requests for automation workflows.
* An API token with the required permissions. [Account Owned Tokens](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/fundamentals/api/get-started/account-owned-tokens/) are recommended for automation.

## 1\. Verify tagging is enabled

Test the API to confirm tagging is active on your account:

```bash
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/keys" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json"
```

### Interpreting the response

| Response                                             | Meaning                                                            | Action                                                                                                                                                                                                                                                |
| ---------------------------------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **200 OK** with {"success": true, "result": \[...\]} | Tagging is enabled. An empty array is normal if no tags exist yet. | Proceed to the next step.                                                                                                                                                                                                                             |
| **403** mentioning "permission" or "role"            | The caller lacks required permissions.                             | Verify the caller has a Super Admin, Workers Admin, or Tag Admin role, or that the token has #com.cloudflare.api.account.tag.list scope.                                                                                                              |
| **403** mentioning "feature" or "gate"               | Tagging is not enabled for this account.                           | Contact [Cloudflare support](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/support/contacting-cloudflare-support/) for assistance.                                                                         |
| **401 Unauthorized**                                 | Authentication failed.                                             | Verify the token is valid, not expired, and formatted correctly in the Authorization: Bearer header.                                                                                                                                                  |
| Any other response                                   | Unexpected error.                                                  | Capture the full response body and contact [Cloudflare support](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/support/contacting-cloudflare-support/) with the Account ID, request details, and timestamp. |

## 2\. Create your first tags

Set tags on a resource using `PUT`:

```bash
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "resource_type": "worker",
    "resource_id": "'"$RESOURCE_ID"'",
    "tags": {
      "environment": "production",
      "team": "platform"
    }
  }'
```

Then retrieve the tags:

```bash
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags?resource_type=worker&resource_id=$RESOURCE_ID" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json"
```

## 3\. List tagged resources

Query all tagged resources in the account, optionally filtering by tag:

```bash
# All tagged resources
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources" \
  -H "Authorization: Bearer $API_TOKEN"

# Filter: only resources with environment=production
curl -X GET "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/tags/resources?tag=environment=production" \
  -H "Authorization: Bearer $API_TOKEN"
```

## Next steps

* Learn the full [tag filtering syntax](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/resource-tagging/how-to/filter-resources/) for complex queries.
* Understand the [GET, merge, PUT workflow](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/resource-tagging/how-to/manage-tags/#add-a-single-tag) for modifying individual tags.
* Review [supported resource types](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/resource-tagging/reference/resource-types/) and their required fields.
* Review [API limits and validation rules](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/resource-tagging/reference/limits/).

Was this helpful?

YesNo

## On this page

[![](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://docs-durable-objects-instance-replaced-errors.previews.developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/resource-tagging/get-started/#page","headline":"Get started · Cloudflare Resource Tagging docs","description":"Set up authentication for Resource Tagging and make your first API calls.","url":"https://developers.cloudflare.com/resource-tagging/get-started/","inLanguage":"en","image":"https://developers.cloudflare.com/og-docs.png","dateModified":"2026-08-24","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
