Skip to main content
POST/emails/send-custom-domain/

Send email messages with custom domain

This endpoint allows you to send email messages using your custom domain settings. You need a custom domain settings ID (which you can get from Email settings) and optionally a custom sender ID (from Sender settings).

HTML is allowed within email message content. For example, you can set the content as:

Hi <b>user</b>, enjoy our product!

The email message will be displayed as:

Hi user, enjoy our product!

AttributeTypeRequiredDescription
api_email_settings/campaignintegernoThe unique identifier of your custom domain settings or campaign automatically generated by User.com.
authorinteger / stringyesThe unique identifier of an email author (string) or author ID (integer).
contentstringyesThe content of your email message (HTML allowed).
custom_senderintegernoThe unique identifier of your custom sender (optional).
receiversstringyesA comma-separated list of user IDs.
subjectstringyesThe subject line for your email message.
templateintegernoThe unique identifier of the email template.

If you want to use an existing email campaign, pass your email campaign ID as the value in the request body. Note that your email campaign must be active.

The author parameter determines who appears as the sender of this email - it can be the owner or any agent of the app.

Request​

curl -X POST -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2" -H "Content-Type: application/json" -d '{
"api_email_settings": 123,
"custom_sender": 456,
"subject": "Welcome to Our Platform",
"content": "Hello! Welcome to our platform. \<a href='\''https://example.com/dashboard'\''>Access your dashboard\</a>",
"receivers": "1001,1002,1003",
"template": 789,
"author": "support@yourcompany.com"
}' "https://<your_app_subdomain>.user.com/api/public/emails/send-custom-domain/"

Response​

{
"campaign": 880
}

This response indicates that the email has been sent successfully. The returned value is the email campaign ID that was created for this send operation.