---
title: "Edit email options"
method: PATCH
path: "/assets/{asset_id}/options"
tags: ["Email Options"]
---

# Edit email options

`PATCH /assets/{asset_id}/options`

## Request

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

Set one or more writable [email options](#tag/email_option) on an email.
Only the keys you send are changed; every other option is left untouched. Keys are matched case insensitively. If any key in the request is unknown or not writable, the whole request is rejected and nothing is saved.

## Path parameters

- `asset_id` string, required

## Request body

- EmailOptionsUpdate: One or more writable email option keys. Keys are matched case insensitively, and any key you omit is left untouched.
  - `custom_head_code` string: Markup added to the `<head>` of this email when it is rendered or downloaded.

## 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

- `400`: Bad Request
- `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`: A key in the request is unknown, is not writable by your company, or its value was rejected. Nothing is saved.
- `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)
