Update the organization's email settings
PUT
/api/organizations/settings/email
const url = 'https://example.com/api/organizations/settings/email';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"sendgrid","apiKey":"SG.secure_api_key_token","fromEmail":"[email protected]","fromName":"Dream Center Connect System"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/organizations/settings/email \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "sendgrid", "apiKey": "SG.secure_api_key_token", "fromEmail": "[email protected]", "fromName": "Dream Center Connect System" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
provider
required
Transactional email provider service type (smtp, sendgrid, postmark, ses).
string
Example
sendgridapiKey
required
Provider API authentication token.
string
Example
SG.secure_api_key_tokenfromEmail
required
fromName
Default sender display name for outbound emails.
string
Example
Dream Center Connect SystemResponses
Section titled “Responses”Email settings updated successfully
Invalid input
Unauthorized
Forbidden