Skip to content

Create an email sending channel

Requires EDITOR. Secret config fields (apiKey / accessKeySecret / webhookSecret) are encrypted at rest when EMAIL_CONFIG_ENC_KEY is set and never returned. A random webhookId is minted for every provider.

projectId
required
string

Tenant project id (row-level isolation on every query).

Media typeapplication/json
object
name
required
string
>= 1 characters <= 120 characters
kind
required
string
Allowed values: log resend sendgrid mailgun aliyun cf_email
status
string
default: active
Allowed values: active paused disabled
fromAddress
required
string format: email
replyToAddress
string | null format: email
config

Provider-specific credential map, validated per kind; secret fields encrypted at rest.

object
key
additional properties
string
rateLimitPerSecond
integer
default: 10 >= 1 <= 100
dailyLimit
integer | null
>= 1
transactionalReservePercent
integer
default: 20 <= 100
marketingDailyLimit
integer | null
>= 1

Created provider.

Media typeapplication/json
object
provider

Email sending channel. configJson is never serialized; configConfigured signals whether secrets are stored.

object
id
string
projectId
string
name
string
kind
string
Allowed values: log resend sendgrid mailgun aliyun cf_email
status
string
Allowed values: active paused disabled
fromAddress
string format: email
replyToAddress
string | null format: email
webhookId
string
rateLimitPerSecond
integer
dailyLimit
integer | null
transactionalReservePercent
integer
marketingDailyLimit
integer | null
sentToday
integer
configConfigured
boolean
lastHealthAt
string | null format: date-time
lastHealthStatus
string | null
createdAt
string format: date-time
updatedAt
string format: date-time

Request body failed Zod validation.

Media typeapplication/json

Validation error envelope with per-field issues.

object
error
string
issues
Array<object>
object
path
string
message
string
Examplegenerated
json
{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
]
}

Not authenticated (no valid session/principal).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Authenticated but lacks the required project role.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}