AI
Draft email text with the AI gateway.
Guides: AI.
| Method | Path | Operation | Scope |
|---|---|---|---|
POST | /v1/ai/draft | Draft email text with AI | write |
POST
Runs against the live API with the key you enter: this change really happens. Use a key limited to a test account.
Writes an email body from instructions, optionally answering a message or reworking a draft, in plain text or Markdown. Nothing is sent or saved: the text is for a person to edit. Needs the write scope; drafts are held to a per-minute limit (beyond it, rate_limited with Retry-After).
Required scope: write.
application/json- body
instructions*stringLength
1 <= length <= 2000context?format*AiDraftFormatValue in
"text""markdown"OK
application/json- response
text*stringExample Request
curl -X POST 'https://api.workwae.com/v1/ai/draft' \ -H 'Content-Type: application/json' \ -d '{ "instructions": "string", "format": "text"}'Example Response
{ "text": "string"}