---
title: "Detach policy from target"
url: https://hexelstudio.com/docs/api/ciam-iam/policies/detach-policy-from-target
---

# Detach policy from target

**DELETE** `/policies/{policy_id}/attachments/{attachment_id}`

Remove a policy attachment

## Path parameters

- `policy_id: string`

  Policy ID

- `attachment_id: string`

  Attachment ID

## Headers

- `Authorization: string`

  `Bearer <token>`.

## Returns

`204` No Content

## Errors

- `500` Internal Server Error

## Example

```bash
curl --request DELETE \
  --url 'https://api.hexelstudio.com/v1/policies/{policy_id}/attachments/{attachment_id}' \
  --header "Authorization: Bearer $ACCESS_TOKEN"
```

### Response (500)

```json
{
  "key": "string"
}
```
