Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Get an automation notification email preference

GET
/api/v3/automations/email-preferences
curl --request GET \
--url 'https://api.tryletterhead.com/api/v3/automations/email-preferences?channelId=1&eventSlug=automation_deactivated' \
--header 'Authorization: Bearer <token>'

Automations are one of several events Letterhead can email a teammate about — this and the matching PUT endpoint read and set the signed-in user’s email notification preference for one event at a time. eventSlug accepts the two automation events (automation_deactivated, automation_template_reactivated) as well as Letterhead’s other notification events (imports/exports finishing, an email being sent, a review being requested, an AI text generation failing, new comments, a duplicate email being detected, an RSS feed failure, a system or webhook failure, a goal being reached, an Analyze agent finishing, a scheduled newsletter that couldn’t be sent, and a sending domain’s warm-up being held or paused). The accepted values are listed on the eventSlug parameter.

This reads the current user’s own preference, so it authenticates as a signed-in user rather than a company API key and is not available to external integrations.

channelId
required
integer

The internal numeric id of the channel the notification is scoped to.

eventSlug
required
string
Allowed values: automation_deactivated automation_template_reactivated import_success_failure export_success_failure email_sent review_requested ai_text_failed new_comments duplicate_email_detected rss_feed_failure system_failure webhook_failure goal_reached analyze_agent_finished newsletter_not_sent sending_domain_warmup standing_task_finished

The notification event, e.g. automation_deactivated or automation_template_reactivated.

200 OK

Media type application/json
object
items
object
eventSlug
string
enabled

Whether the user receives this notification by email. If the user has never chosen, this reports the event’s default (on for automation_deactivated) rather than reading a row that doesn’t exist yet.

boolean
message
string
total
integer
Example
{
"items": {
"eventSlug": "automation_deactivated",
"enabled": true
},
"message": "Preferences fetched successfully.",
"total": 1
}

Still can’t find what you need? Contact support.