---
title: "Clear an email option"
method: DELETE
path: "/assets/{asset_id}/options/{option_key}"
tags: ["Email Options"]
---

# Clear an email option

`DELETE /assets/{asset_id}/options/{option_key}`

## Request

- Base URL: `https://enterprise.knak.io/api/published/v1`
- URL: `https://enterprise.knak.io/api/published/v1/assets/{asset_id}/options/{option_key}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/knak/apis/knak-enterprise-api/docs/assets/:asset_id/options/:option_key/delete.ts> (a function with typed inputs; its response is checked against the schema)

Clear a single writable [email option](#tag/email_option) on an email.
Clearing an option that is already empty succeeds. Other options are left untouched.

## Path parameters

- `asset_id` string, required
- `option_key` string, required

## Response `200`

OK

- EmailOptions
  - `data` object: The email options available to your company, keyed by option key. An available option that has never been set is returned with a `null` value.
    - `custom_head_code` string, nullable: Markup added to the `<head>` of this email when it is rendered or downloaded. Requires the Custom Email Head Code company preference.

## Other responses

- `401`: Unauthenticated
- `403`: The caller cannot edit the settings of this email.
- `404`: The email does not exist, belongs to another company, or the asset is not an email.
- `422`: The key is unknown or is not writable by your company. Nothing is cleared.
- `default`: Unexpected server error

---

[API](https://skmtc.dev/knak/apis/knak-enterprise-api.md) - [All operations](https://skmtc.dev/knak/apis/knak-enterprise-api/llms.txt) - [OpenAPI document](https://skmtc.dev/knak/apis/knak-enterprise-api/revisions/31d2c94edfcc?raw)
