I have created an API key in my Sparkpost panel with all permissions enabled. I now try to send a test email with the body as specified in the Sparkpost API documentation (see below). When I make this API call, I get back a 404 with this body: {"errors": [ {"message": "Resource could not be found"} ] }
. I am now wondering what I am doing wrong. Which resource cannot be found? And how can I fix this?
Details of request
URL: https://api.eu.sparkpost.com/api/v1/transmissions/
HEADERS: Authorization: <MyAPIKey>
BODY:
{
"options": {
"open_tracking": true,
"click_tracking": true
},
"metadata": {
"user_type": "students",
"education_level": "college"
},
"substitution_data": {
"discount": "25"
},
"recipients": [
{
"address": {
"email": "[email protected]",
"name": "Wilma Flintstone"
},
"substitution_data": {
"customer_type": "Platinum"
}
}
],
"content": {
"from": {
"name": "Fred Flintstone",
"email": "[email protected]"
},
"subject": "Big Christmas savings!",
"reply_to": "Christmas Sales <[email protected]>",
"headers": {
"X-Customer-Campaign-ID": "christmas_campaign"
},
"html": "<p>Hi {{address.name}} nSave big this Christmas in your area {{place}}! nClick http://www.example.com and get a {{discount}}% discountn</p><p>Hurry, this offer is only to {{user_type}}n</p>"
}
}