Skip to main content

Use your own email provider

You can integrate popular SaaS email providers using the Phosphor API, enabling you to specify both the from and reply-to fields in the format <email_address> or name <email_address>.

Create a configuration

Create a new configuration by issuing a POST request to the email-integrations endpoint.

caution

Only one email provider configuration is allowed per organization.

If you previously set up a custom email provider, before creating a new integration, you must delete the old one.

POST https://admin-api.phosphor.xyz/v1/email-integrations

The payload has the following format:

{
"provider": "MAILGUN" | "AMAZON_SES" | "CUSTOM_SMTP",
"config": {}
}

The information needed in the config object differs by the email provider.

{
"config": {
"email_from": "Your Org <hello@your-org.com>",
"email_reply_to": "help@your-org.com",
"domain": "your-org.com",
"api_key": "api-key",
"region": "US" | "EU",
},
"provider": "MAILGUN",
}

Edit a configuration

Edit an existing configuration by issuing a PATCH request to the email-integrations endpoint.

PATCH https://admin-api.phosphor.xyz/v1/email-integrations/{integration_id}

You can pass any parameters that were originally specified in your integration config, such as:

{
"email_from": "New Org <hello@new-org.com>"
}

Delete a configuration

Delete an existing configuration by issuing a DELETE request to the email-integrations endpoint.

DELETE https://admin-api.phosphor.xyz/v1/email-integrations/{integration_id}