> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Get all tags

GET https://preview.contentful.com/spaces/{space_id}/environments/{environment_id}/tags

Returns all the tags that exist in a given environment.

Reference: https://contentful.com/developers/docs/references/content-preview-api/tags/get-all-tags

## Request

### Path parameters

- `space_id` (string, required) — ID of the space in form of a string
- `environment_id` (string, required) — ID of the environment in form of a string

## Response

### 200

OK - Request successful

- `map from string to any`

## Examples

**Response**

```json
{
  "items": [
    {
      "name": "NY Campaign",
      "sys": {
        "createdAt": "2025-05-28T15:19:30.000Z",
        "environment": {
          "sys": {
            "id": "staging",
            "linkType": "Environment",
            "type": "Link"
          }
        },
        "id": "nyCampaign",
        "revision": 1,
        "space": {
          "sys": {
            "id": "yadj1kx9rmg0",
            "linkType": "Space",
            "type": "Link"
          }
        },
        "type": "Tag",
        "updatedAt": "2025-05-28T15:19:30.000Z",
        "version": 1,
        "visibility": "public"
      }
    }
  ],
  "limit": 100,
  "skip": 0,
  "sys": {
    "type": "Array"
  },
  "total": 1
}
```

**SDK Code**

```android Android
SDK currently doesn't implement this endpoint.
```

```java Java
SDK currently doesn't implement this endpoint.
```

```kotlin Kotlin
SDK currently doesn't implement this endpoint.
```

```swift Swift
SDK currently doesn't implement this endpoint.
```

```javascript JavaScript
import { createClient } from 'contentful-management'

const client = createClient({
  space: '<space_id>',
  accessToken: '<content_preview_api_key>',
  host: 'preview.contentful.com'
})

client.getTags()
  .then((response) => console.log(response.items))
  .catch(console.error)
```

```php PHP
SDK currently doesn't implement this endpoint.
```

```ruby Ruby
SDK currently doesn't implement this endpoint.
```

```python Python
SDK currently doesn't implement this endpoint.
```

```.net .NET
SDK currently doesn't implement this endpoint.
```