---
title: "Email Setup Instructions"
method: POST
path: "/api/domains/{domain_id}/agent-desk/setup-instructions/email"
tags: ["agent_desk"]
---

# Email Setup Instructions

`POST /api/domains/{domain_id}/agent-desk/setup-instructions/email`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/api/domains/{domain_id}/agent-desk/setup-instructions/email`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Mail this desk's DNS records + snippet to one address.

ORDER MATTERS and follows the regeneration endpoint's precedent
(`regenerate_answer_page`): resolve everything that can 4xx BEFORE claiming the
day bucket, so a bad address or a desk with nothing to send never costs the
customer one of their five sends. The claim then happens immediately before the
send, and is refunded if the provider refuses.

## Path parameters

- `domain_id` string, required

## Headers

- `x-view-as` string, nullable

## Request body

- SetupInstructionsEmailIn: The ONLY thing a caller may supply is an address. No subject, no body, no attachment, no reply-to. The template is rendered from the desk's own records — see `backend/agent_desk/setup_instructions_email.py` for why that fixed shape IS the security model, and why adding a free-text field here re-opens the abuse surface this endpoint was designed to close.
  - `to_email` string, required
  - `snippet_format` 'visible' | 'llms-txt' | 'sitemap' | 'agents-md' | 'script' | 'meta'
  - `footer_wording` string, nullable

## Response `200`

Successful Response

- SetupInstructionsEmailOut
  - `sent` boolean, required
  - `to_email` string, required
  - `included_records` integer, required
  - `included_snippet` boolean, required
  - `sends_left_today` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
