# Tag Manager Folders

> Manage dashboard-only folders inside a tag manager. Folders organize tags, triggers, and variables for the UI; they have no effect on how tags fire.

Source: https://docs.oursprivacy.com/docs/platform-api/tag-manager-folders

Folders are dashboard-only containers: they group tags, triggers, and variables in the UI and do not change how tags fire.

`POST /rest/v1/tag-manager-asset-folders` assigns a tag, trigger, or variable to a folder or moves it between folders. Send the asset type, asset id, and target `folderId`, or `folderId: null` to remove the asset from its current folder. Deleting a folder ungroups its assets; the assets themselves are not deleted.

## GET /rest/v1/tag-manager-folders

List folders inside a single tag manager. Folders are dashboard-only organizational containers — they do not affect tag evaluation. Requires the `tagManagerId` query parameter. Supports cursor pagination via `limit` and `cursor`; the limit clamp is 1000 so a single request can return the full set (the web-app workspace renders all folders in one shot). Requires API-key scope or current OAuth user permission: tagManagers:find

Request URL: `GET https://app.oursprivacy.com/rest/v1/tag-manager-folders`

Authentication: apiKey or oauth2.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer \| null | No | Maximum number of folders to return. Defaults to 25; values below 1 are clamped to 1 and values above 1000 are clamped to 1000. The web-app passes 1000 to render the full workspace in one request. |
| `cursor` | query | string | No | Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request. Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request. |
| `tagManagerId` | query | string | Yes | Parent tag manager whose folders should be returned. |

### Responses

- `200`: Folders scoped to a parent tag manager
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entities` | object[] | Yes |  |
| `entities[].id` | string | Yes |  |
| `entities[].tagManagerId` | string | Yes |  |
| `entities[].accountId` | string | Yes |  |
| `entities[].name` | string | Yes |  |
| `entities[].createdAt` | string \| null | No |  |
| `entities[].updatedAt` | string \| null | No |  |
| `pagination` | object | Yes |  |
| `pagination.nextCursor` | string \| null | No |  |
| `pagination.hasMore` | boolean | Yes |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).

## POST /rest/v1/tag-manager-folders

Create a folder inside a tag manager. `tagManagerId` is required in the body. Names are case-insensitively unique within the tag manager — collisions return 409 with the reason in the response `error` field. Requires API-key scope or current OAuth user permission: tagManagers:update

Request URL: `POST https://app.oursprivacy.com/rest/v1/tag-manager-folders`

Authentication: apiKey or oauth2.

### Request body (`application/json`, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `tagManagerId` | string | Yes | Parent tag manager that will own the new folder. |
| `name` | string | Yes | Folder name. Case-insensitively unique within the tag manager. |

### Responses

- `200`: Created folder
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `409`: Conflict — a folder with the same name (case-insensitive) already exists in this tag manager.
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  |
| `tagManagerId` | string | Yes |  |
| `accountId` | string | Yes |  |
| `name` | string | Yes |  |
| `createdAt` | string \| null | No |  |
| `updatedAt` | string \| null | No |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).

## GET /rest/v1/tag-manager-folders/{id}

Find a single tag manager folder by ID. Requires API-key scope or current OAuth user permission: tagManagers:find

Request URL: `GET https://app.oursprivacy.com/rest/v1/tag-manager-folders/{id}`

Authentication: apiKey or oauth2.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  |

### Responses

- `200`: Folder details
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  |
| `tagManagerId` | string | Yes |  |
| `accountId` | string | Yes |  |
| `name` | string | Yes |  |
| `createdAt` | string \| null | No |  |
| `updatedAt` | string \| null | No |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).

## PATCH /rest/v1/tag-manager-folders/{id}

Rename a folder. The new name must be case-insensitively unique within the tag manager; collisions return 409. Requires API-key scope or current OAuth user permission: tagManagers:update

Request URL: `PATCH https://app.oursprivacy.com/rest/v1/tag-manager-folders/{id}`

Authentication: apiKey or oauth2.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  |

### Request body (`application/json`, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | New folder name. Case-insensitively unique within the tag manager. |

### Responses

- `200`: Updated folder
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `409`: Conflict — a folder with the same name (case-insensitive) already exists in this tag manager.
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  |
| `tagManagerId` | string | Yes |  |
| `accountId` | string | Yes |  |
| `name` | string | Yes |  |
| `createdAt` | string \| null | No |  |
| `updatedAt` | string \| null | No |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).

## DELETE /rest/v1/tag-manager-folders/{id}

Delete a folder. Tags, triggers, and variables previously assigned to the folder are no longer grouped under it; the assets themselves are not deleted. Requires API-key scope or current OAuth user permission: tagManagers:update

Request URL: `DELETE https://app.oursprivacy.com/rest/v1/tag-manager-folders/{id}`

Authentication: apiKey or oauth2.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  |

### Responses

- `200`: Deleted successfully
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  |
| `deleted` | boolean | Yes |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).

## POST /rest/v1/tag-manager-asset-folders

Assign a tag, trigger, or variable to a folder within its tag manager, or send `folderId: null` to remove the asset from its current folder. The assignment is a full replace — calling it again with a different `folderId` silently moves the asset. Requires API-key scope or current OAuth user permission: tagManagers:update

Request URL: `POST https://app.oursprivacy.com/rest/v1/tag-manager-asset-folders`

Authentication: apiKey or oauth2.

### Request body (`application/json`, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `assetType` | string | Yes | Asset type to assign. Must be one of `tagManagerTag`, `tagManagerTrigger`, or `tagManagerVariable`. One of: `"tagManagerTag"`, `"tagManagerTrigger"`, `"tagManagerVariable"`. |
| `assetId` | string (uuid) | Yes | UUID of the tag, trigger, or variable to assign. |
| `folderId` | string \| null (uuid) | Yes | Folder UUID to assign to. Send `null` to remove the asset from its current folder. |

### Responses

- `200`: Updated folder assignment
- `400`: Bad Request
- `401`: Unauthorized — missing, invalid, or expired API key or OAuth access token
- `403`: Forbidden — credential does not have the required current Ours permission
- `404`: Not Found
- `500`: Internal Server Error

#### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes |  |
| `accountId` | string | Yes |  |
| `tagManagerId` | string | Yes |  |
| `assetType` | string | Yes | One of: `"tagManagerTag"`, `"tagManagerTrigger"`, `"tagManagerVariable"`. |
| `assetId` | string | Yes |  |
| `folderId` | string \| null | No |  |
| `createdAt` | string \| null | No |  |
| `updatedAt` | string \| null | No |  |

Full schema: [OpenAPI specification](https://docs.oursprivacy.com/openapi-platform.json).
