curl --request PUT \
--url 'https://api.usedatabrain.com/api/v2/data-app/smtp-settings' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"host": "smtp.example.com",
"port": 587,
"username": "smtp-user",
"password": "your-password",
"fromAddress": "noreply@example.com",
"replyToAddress": "support@example.com",
"secure": false
}'
{
"data": {
"success": true
}
}
curl --request PUT \
--url 'https://api.usedatabrain.com/api/v2/data-app/smtp-settings' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"host": "smtp.example.com",
"port": 587,
"username": "smtp-user",
"password": "your-password",
"fromAddress": "noreply@example.com",
"replyToAddress": "support@example.com",
"secure": false
}'
{
"data": {
"success": true
}
}
Configure SMTP settings for your data app so scheduled reports can be sent by email.
curl --request PUT \
--url 'https://api.usedatabrain.com/api/v2/data-app/smtp-settings' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"host": "smtp.example.com",
"port": 587,
"username": "smtp-user",
"password": "your-password",
"fromAddress": "noreply@example.com",
"replyToAddress": "support@example.com",
"secure": false
}'
{
"data": {
"success": true
}
}
curl --request PUT \
--url 'https://api.usedatabrain.com/api/v2/data-app/smtp-settings' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"host": "smtp.example.com",
"port": 587,
"username": "smtp-user",
"password": "your-password",
"fromAddress": "noreply@example.com",
"replyToAddress": "support@example.com",
"secure": false
}'
{
"data": {
"success": true
}
}
PUT https://api.usedatabrain.com/api/v2/data-app/smtp-settings
Authorization header. See the data app creation guide and the API Token guide.
Authorization: Bearer dbn_live_abc123...
application/json.smtp.example.com).587 for STARTTLS, 465 for implicit SSL).noreply@example.com).true for port 465; use false for port 587 with STARTTLS.| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATA_APP_API_KEY | 400 | Missing or invalid data app API key |
INVALID_SERVICE_TOKEN | 400 | Invalid or expired token; cannot resolve company context |
INVALID_REQUEST_BODY | 400 | Invalid or missing body fields (e.g. invalid email, missing host) |
INTERNAL_SERVER_ERROR | 400 / 500 | SMTP connection test failed (400) or unexpected server error (500) |