Pepipost API does basic validations with respect to your account credentials and account configurations before an email is accepted over API request. If you are getting an error while injecting emails over API, then there can be one of the below primary reasons for this issue,
1. You are using an incorrect API key within API credentials.
- Please verify your API key by logging in to your Pepipost account and then going to Settings -> Integrations - > API. Once done, click on "Show" button to verify the same. Verify the API key shown within the panel with the API key configured within your application and If it is found to be incorrect then please correct the same within your application and then test the email injection.
2. You might be using an incorrect JSON format.
- There is a possibility of some problems within the API request format. In order to check the same, please print the API request JSON within your application and have it validated using 3rd party JSON validator tool like https://jsonlint.com/.
Alternatively, you can also visit Pepipost documentation page (available at https://developers.pepipost.com/email-api/email-api/sendemail) and compare the existing API request format with the default format available on the same documentation page.
3. Incorrect sender domain used
- There is a possibility that you might be using a sender domain for sending emails using your application which is not configured on Pepipost in an active state. Please note that, You can use only sender domains which are configured on Pepipost against your Pepipost account and which are in active mode.