7

I've created a Send Definition, with the key definition_key, linked to the Data Extension data_ext. In this Data Extension, I've got one record, with the subscriber key subscriber_key and the email email.

Now, I'm trying to send an email, using the rest API.

I hit the following endpoint POST https://MY_SUBDOMAIN.rest.marketingcloudapis.com/messaging/v1/email/messages/f4fe74b7-c3c0-4e5a-9f49-b63a641109a2

with the following payload

{
 "definitionKey": "definition_key",
 "recipient":
 {
   "contactKey": "subscriber_key",
   "to": "email"
 }
}

I'm getting a 400 error, with the following payload:

{
  "message": "MCMS_UTM_Runtime_InvalidOperation: TriggeredSend definition   not 
              enabled for this route, definitionKey=definition_key",
  "errorcode": 30001,
  "documentation": ""
}

The definition and subscriber keys are of course not the real ones.

=> What does this error mean exactly ? Is there really an issue with my request, or do I have to configure something else in SFMC UI ?

Thanks

2 Answers 2

11

You cannot create a triggered send definition with the UI if you are using the Transactional Messaging API. You need to create your definition via the REST API in order for this to work.

1
  • It's same situation for SMS transactional message. Jan 10, 2020 at 0:23
5

Adding here as I spent a few hours trying to figure this same issue out last night. As this answer states, you do need to set up the send definition using REST API. You cannot use the UI to set up the send definition for transaction API driven emails. It's called out here: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/transactional-messaging-api.htm

I realized my confusion (perhaps yours too) is that there is a lot of documentation out there for 'triggered sends' that show people setting up send definitions in the UI and then executing sends via API. This is different from the Transactional Message API (which doesn't allow for any UI creation or editing of the send definition). This is a huge miss if you ask me as in a business setting, there is a need for business people to change content as needed and this is not possible without a UI option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .