Skip to main content

createEmailConfig

Requires at least one of the permissions settings:email:update or settings:tenant:update.

Creates the organization's email configuration: provider, SMTP settings, sender name and address, and which reports and alerts to send. An organization has one, so creating a second is refused. Passwords and keys are stored encrypted. Requires permission to update email settings.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CreateEmailConfig($input: CreateEmailConfigInput!) {
createEmailConfig(input: $input) {
id
fromName
createdAt
createdBy
dailyReportTime
defaultRecipients
}
}

Variables:

{
"input": {
"fromEmail": "string",
"fromName": "string",
"isEnabled": true,
"provider": "AWS_SES",
"sendAlerts": true,
"sendNotifications": true,
"sendReports": true
}
}

Response:

{
"data": {
"createEmailConfig": {
"id": "string",
"fromName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"createdBy": "string",
"dailyReportTime": "string",
"defaultRecipients": [
"string"
]
}
}
}
createEmailConfig(
input: CreateEmailConfigInput!
): EmailConfig!

Arguments​

createEmailConfig.input ● CreateEmailConfigInput! non-null input​

The provider, SMTP or API credentials, sender details and reporting options.

Type​

EmailConfig object​

The organization's email settings. Secrets are never returned.