Skip to main content
Hello,

I am already able to receive access tokens via REST Auth endpoint via Postman. I utilized provided postman project on

https://github.com/salesforce-marketingcloud/postman

for that. Works fine just has not implemented email send. So in general marketing cloud should be correctly configured. Access rights are existend. Furthermore TriggerSends is created with external reference "AdventureWelcome" and Email + Data Extension exist.

Somehow I struggle to send out Email via REST API call following instructions

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/messageDefinitionSends.htm

Following my postman code. I replaced tokens and email with X, please ignore lenght.

POST /messaging/v1/messageDefinitionSends/AdventureWelcome/send/Overview HTTP/1.1

Host: mXXXXXXXXXXXXXXXXX.rest.marketingcloudapis.com

Authorization: Bearer XXXXXXXXXXXXXXXXXXX

Content-Type: application/json

cache-control: no-cache

Postman-Token: 795b816f-de04-4143-9dab-b418819481c2

{

    "From": {

        "Address": "XXXX@gmail.com",

        "Name": "XXXX@gmail.com"

    },

    "To": {

        "Address": "XXXX@gmail.com",

        "SubscriberKey": "XXXX@gmail.com",

        "ContactAttributes": {

            "SubscriberAttributes": {

                "FirstName": "West",

                "LastName": "Indianapolis",

                "OptInDate": "",

                "Interest": "IN"

            }

        }

   },

    "Options": {

        "RequestType": "ASYNC"

    }

Repsonse

{

    "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm",

    "errorcode": 404,

    "message": "Not Found"

}

But I cannot figure out 404 what is wrong with my request

Official salesfore error description:

Object Not Found

Your request cannot find any available data. Ensure you properly created your request.

404

30003

If token is not requested before following response would show. So it is not an authorization issue.

{

    "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm",

    "errorcode": 0,

    "message": "Not Authorized"

}

Data Extension created

Marketing Cloud API: Cannot Send Email via REST Post

Thx for reading so far.
1 answer
  1. Feb 25, 2019, 6:43 PM
    Same is happening with me 

    POST /messaging/v1/messageDefinitionSends/key:AccountCreatedTest/send HTTP/1.1

    Host: *******************.rest.marketingcloudapis.com

    Content-Type: application/json

    Authorization: Bearer ****************

    cache-control: no-cache

    Postman-Token: 6aa23ce5-1aed-462a-9eb5-967577867862

    {

        "From": {

            "Address": "noreply@dsalesforce.com"

        },

        "To": {

            "Address": "***************l.com",

            "SubscriberKey": "*************.com",

            "ContactAttributes": {

                "SubscriberAttributes": {

                    "AccountHomeLink": "https://www.test.com",

                    "EmailAddress": "*************",

                    "FirstName": "Ritika",

                    "LastName": "Singh"

                }

            }

        },

        "OPTIONS": {

            "RequestType": "ASYNC"

        }

    }
0/9000