When using the /createEmailMessage API endpoint, you might find that emails are only delivered to users who are already registered in your Pushwoosh database.
To send an email to any email address, including new ones, you need to enable the auto-registration feature within your API call. You can do this by adding the "use_auto_registration": true parameter to the notifications object in your request payload. This will automatically register the email address in your application before sending the message.
Here is an example of a request payload with this parameter included:
{
"request": {
"application": "YOUR_APPLICATION_CODE",
"auth": "YOUR_API_ACCESS_TOKEN",
"notifications": [
{
"send_date": "now",
"preset": "YOUR_EMAIL_PRESET_CODE",
"devices": ["new_user@example.com"],
"use_auto_registration": true
}
]
}
}
By including "use_auto_registration": true, the system will ensure the recipient's email is added to your user database, allowing for successful delivery.
Comments
0 comments
Please sign in to leave a comment.