DELETE

Remove a brand item

Removes a color, font or image from the editor's brand kit. A file templates still use needs force=true.

View as Markdown
DELETEhttps://api.muzekit.com/v1/brand/:id
curl -X DELETE https://api.muzekit.com/v1/brand/ast_dQC3Z8RgqAH \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

The id is an item's from Get the brand kit. A font or image that templates still use is refused with 409 asset_in_use, saying how many templates and naming the first few; add force=true to remove it anyway (those templates lose the file). An id that isn't in the brand kit answers 404 asset_not_found.

Examples

Remove a color

Colors have no file, so removing one never answers 409.

curl -X DELETE https://api.muzekit.com/v1/brand/ast_dQC3Z8RgqAH \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

Remove a logo that templates use

Try without force first. On 409 asset_in_use, the error carries templates (how many) and names; send force=true only once you accept that those templates lose the file.

# 1. Refused with 409 asset_in_use if templates use the file
curl -X DELETE https://api.muzekit.com/v1/brand/ast_dQC3Z8RgqAH \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

# 2. Remove it anyway
curl -X DELETE "https://api.muzekit.com/v1/brand/ast_dQC3Z8RgqAH?force=true" \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

Remove every weight of a font

Each weight is its own item. Find them by family in Get the brand kit and remove each one.

for ID in $(curl -s https://api.muzekit.com/v1/brand \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r '.fonts[] | select(.family == "Acme") | .id'); do
  curl -s -X DELETE "https://api.muzekit.com/v1/brand/$ID" \
    -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"
done

Response

JSON
{
  "object": "asset",
  "id": "ast_dQC3Z8RgqAH",
  "deleted": true
}