---
title: "Delete workspace policy layer"
url: https://hexelstudio.com/docs/api/titan/management/delete-workspace-policy-layer
---

# Delete workspace policy layer

**DELETE** `/titan/management/policy-layers/workspaces/{workspace_id}`

## Path parameters

- `workspace_id: string`

  A workspace id of the organization.

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

## Returns

`200` Organization-scoped result. (`PolicyLayersView`)

- `deployments: optional array of object`

  - `applied: boolean`

  - `deployment_id: string`

  - `enforcement_deployment_id: string`

  - `error_code: optional string`

- `organization: object`

  - `policy_source_id: string`

  - `source: any`

  - `source_digest: string`

  - `source_revision: integer`

  - `updated_at: string`

  - `updated_by: string`

- `organization_id: string`

- `workspaces: map[object]`

## Errors

- `400` Invalid request or path; POLICY_LAYER_INVALID when the layer source does not compile, does not name the caller's organization and enforcement_deployment_id "*", has a rule other than deny or require_approval or a rule with limits, obligations or connection constraints, or cannot be composed with a deployment's policy; POLICY_TERM_UNSUPPORTED when a rule has a mode (a watch-only rule) and watch-only rules is off, except for the layer in force submitted again.
- `401` Missing or invalid authenticated context.
- `403` Organization mismatch, or the IAM action is denied: titan:policy:read to read, titan:policy:publish to change.
- `404` Unknown or foreign organization resource, or plan not yet prepared.
- `405` HTTP method is not supported on this route.
- `409` source_revision is not greater than the stored layer's (POLICY_REVISION_STALE); POLICY_LAYER_WORKSPACE_LIMIT_REACHED when the organization already has layers for 1,000 workspaces.
- `502` A deployment's Configuration Authority refused or answered unexpectedly (closed code) when a PUT read its entry; nothing was stored.
- `503` Local storage or a deployment's Configuration Authority unavailable. A PUT waits for every provisioned deployment management can address: when one's entry cannot be read, nothing is stored; retry. A DELETE never waits for the deployments; a deployment management cannot address under its configuration is listed (PROVISIONING_NOT_CONFIGURED) and flagged (policy_layers_refused), not waited for.

## Example

```bash
curl --request DELETE \
  --url 'https://api.hexelstudio.com/v1/titan/management/policy-layers/workspaces/{workspace_id}' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (200)

```json
{
  "deployments": [
    {
      "applied": true,
      "deployment_id": "string",
      "enforcement_deployment_id": "string",
      "error_code": "string"
    }
  ],
  "organization": {
    "policy_source_id": "string",
    "source": "string",
    "source_digest": "string",
    "source_revision": 0,
    "updated_at": "2026-01-01T00:00:00Z",
    "updated_by": "string"
  },
  "organization_id": "string",
  "workspaces": {
    "key": {
      "policy_source_id": "string",
      "source": "string",
      "source_digest": "string",
      "source_revision": 0,
      "updated_at": "2026-01-01T00:00:00Z",
      "updated_by": "string"
    }
  }
}
```

### Response (400)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (401)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (405)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (409)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (502)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (503)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```
