---
title: "Draft a candidate email with AI"
method: POST
path: "/candidates/email/draft"
tags: ["candidate"]
---

# Draft a candidate email with AI

`POST /candidates/email/draft`

## Request

- Base URL: `https://localhost:4410/api/v1`
- URL: `https://localhost:4410/api/v1/candidates/email/draft`
- Auth: HTTP bearer

Rewrites an email template from a one-line instruction on the workspace's own language model key. The model gets the template and the instruction only, never a candidate's name, résumé, answers or notes: the five variables stay as placeholders and fill in for each person when it goes. A draft with other placeholders, without the booking link its template asks for, or, for a rejection, with a reason is asked again once, then refused. Nothing is sent: a person edits and sends it.

## Request body

- object
  - `template` 'received' | 'next_step' | 'rejection_applied' | 'rejection_interview', nullable
  - `subject` string, required
  - `body` string, required
  - `instruction` string, required

## Response `200`

The result.

- object
  - `subject` string, required
  - `body` string, required
  - `model` string, required

## Other responses

- `default`: An RFC 9457 problem.

---

[API](https://skmtc.dev/binderwork/apis/binderwork-api.md) · [All operations](https://skmtc.dev/binderwork/apis/binderwork-api/llms.txt) · [OpenAPI document](https://skmtc.dev/binderwork/apis/binderwork-api/revisions/f8fab0ebee53?raw)
