---
title: "Detach keyword from assets"
method: PUT
path: "/keywords/detach/{keywordId}"
tags: ["Keywords", "Assets"]
---

# Detach keyword from assets

`PUT /keywords/detach/{keywordId}`

## Request

- Base URL: `https://api.pics.io`
- URL: `https://api.pics.io/keywords/detach/{keywordId}`
- Auth: HTTP bearer

For authenticated requests, detaches the selected keyword and any of its descendants present on the selected assets. The response lists every keyword that was detached.

## Request body

- object
  - `assetIds` string[]

## Response `200`

Ok

- object
  - `success` boolean
  - `hasNotPermittedAssets` boolean
  - `detachedKeywordIds` string[]: Every keyword actually detached, including descendants of the requested keyword.
  - `detachments` object[]: Keywords removed from each asset. An asset is omitted when it did not have the requested keyword.
    - `assetId` string
    - `keywordIds` string[]

---

[API](https://skmtc.dev/pics/apis/pics-io-rest-api.md) - [All operations](https://skmtc.dev/pics/apis/pics-io-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pics/apis/pics-io-rest-api/revisions/ea41cba5ac37?raw)
