CustomDomain™ docs
API referenceApplications

Set how an application's end user notices are sent

Set how an application's end user notices are sent: CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.

PUT
/applications/{id}/email-sender

Replaces the setting. mode is default (the CustomDomain™ sender), smtp (the platform's own mail server, with the notice's From taken from from_address and from_name) or none (nothing is sent; use the connection.records_outdated webhook instead). With smtp, the host must be a public address, the port one of 25, 465, 587 or 2525, and TLS is always on: implicit on 465, starttls on the others. Plain text is not offered. The password is sealed at rest; leave smtp_password out to keep the stored one. A change of server, login or sender clears verified_at. A mail failure at send time falls back to the default sender for that message and is recorded in last_error. Requires app:write.

AuthorizationBearer <token>

Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/applications/string/email-sender" \  -H "Content-Type: application/json" \  -d '{    "mode": "default"  }'
{  "application_id": "string",  "mode": "default",  "smtp_host": "string",  "smtp_port": 0,  "smtp_username": "string",  "password_set": true,  "tls": "implicit",  "from_address": "string",  "from_name": "string",  "reply_to": "string",  "verified_at": "2019-08-24T14:15:22Z",  "last_error": "string",  "last_error_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}