Getting Status “404 Not Found” while triggering Send via Postman

I am trying to trigger a Trigger Send with a simple payload using Postman, however the TS is not being sent. Note: No response body is generated, the only thing that it shows is "404 Not Found"

POST: {{rest_url}}messaging/v1/messageDefinitionSends/key:TS_ExternalKey/send

{    
    "To": {        
        "Address": "EmailAddress",        
        "SubscriberKey": "SF_Contact_Key",        
        "ContactAttributes": 
        {            
            "SubscriberAttributes": 
            {                
                "ResetURL" : "https://www.google.com/"
            }        
        }    
    },    
        "Options": 
    {        
    "RequestType": "SYNC"    
    }
}

In the Email, I am using the following AMPScript:

set @resetURL = ResetURL
<a href="%%=redirectto(@resetURL)=%%">Link</a>

What could be the possible reason for this behavior?

Answers 3

  • Here are the reasons I can think of for your 404 response

    1. Incorrect External Key
    2. Incorrect route, is this a legacy triggered send or a new transactional messaging triggeredsend
    3. Auth token is in the context of a different BU (IE token is for EID. TS is in CHILD BU)
    4. You aren't making a POST but a PUT/PATCH
    5. Your TSE endpoint is incorrect for the BU that has the TS

  • If you’re using the new transacional API, then you shoudl be calling this route:

    POST 
    /messaging/v1/email/messages/{messageKey}
    

    Here’s an example request:

    Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
    POST /messaging/v1/email/messages/f4fe74b7-c3c0-4e5a-9f49-b63a641109a2
    Content-Type: application/json
    Authorization: Bearer YOUR_ACCESS_TOKEN
    
    {
      "definitionKey": "2FA_order_accounts",
      "recipient":
      {
       "contactKey": "recipient2",
        "to": "[email protected]",
        "attributes": {
          "UserAttribute_1": "value_1",
          "UserAttribute_n": "value_n"
        }
      }
    }
    

    Read more here: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/transactional-messaging-api.htm


  • This issue got resolved as soon as I added the line "account_id: MID" in the Auth Request. In my case the MID here belonged to a child Business Unit.

    Not sure why this was required as the Installed App created was only suppose to interact with this Child Business Unit.


Related Questions