/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Update Email Preferences

Update Email Preferences

Turn product email categories and account reminders on or off, and give or withdraw marketing consent.

PUT/v1/me/email-preferencesTry it
Session token

Changes your marketing consent, your email categories, or both. Only what you send changes; categories you leave out keep their current value.

Note

Requires a session JWT — a dashboard session or an stx login token. API keys are rejected with 401. Any plan.

Request Body

Send categories, marketing, or both. Any other key is a 400 validation_error.

NameDescription
categories:objectbody
Any of product_tips, account_nudges, reports, news and account, each true (get it) or false (don't) — see Get Email Preferences for what each one is. account (account reminders) works whatever your marketing consent is.
marketing:booleanbody
true records an explicit opt-in (granted), false withdraws consent (denied), wherever you are.

Turning anything back on — marketing: true or any category true — also lifts an earlier unsubscribe from all. It doesn't lift a block caused by your address bouncing or a spam report.

Response — 200 OK

The updated preferences, in the same shape as Get Email Preferences:

Error Responses

400 Bad Request

validation_error — an empty body, an unknown key or category, or a value that isn't a boolean.

json
{
"error": {
"code": "validation_error",
"message": "Send categories, marketing, or both",
"details": {
"issues": [{ "path": [], "code": "custom", "message": "Send categories, marketing, or both" }],
"target": "json",
"traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10"
}
}
}

401 Unauthorized

unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.

404 Not Found

not_found — the account has been deleted.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X PUT https://api.syntext.dev/v1/me/email-preferences \
-H "Authorization: Bearer $SYNTEXT_JWT" \
-H "Content-Type: application/json" \
-d '{
"marketing": true,
"categories": { "news": false }
}'
Responseapplication/json
200OK
{
"data": {
"consent": { "state": "granted", "at": "2026-11-14T10:03:18.000Z" },
"categories": {
"product_tips": true,
"account_nudges": true,
"reports": true,
"news": false,
"account": true
}
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext