2

I've created a new send definition OK with a status 201 : where URL parameter "status" = "Active"... When I check the response I can see that it is set to "New".

When I try to post to "/messaging/v1/email/messages/{generateMessageId}" I get "TriggeredSend definition not sendable due to definition status"

My Definition:

 "definitionKey": "Test_001",
    "status": "Active",
    "name": "xxxx",
    "description": "Created via REST",
    "classification": "Default Transactional",
    "content": {
        "customerKey": "xxxx"
    },
    "subscriptions": {
        "list": "xxxx",
        "dataExtension": "xxxx",
        "autoAddSubscriber": true,
        "updateSubscriber": true
    },
    "options": {
        "trackLinks": true
    }

Send request:

  "definitionKey": "Test_001",
    "recipient": {
        "contactKey": "xxxx",
        "to": "xxxx",
    }

Example response:

statusCode: 201 {
    "requestId": "4933d8e0-9d88-4818-8cb2-4af94ab0ec36",
    "name": "Test 2",
    "definitionKey": "Test_002",
    "description": "Created via REST",
    "classification": "Default Transactional",
    "status": "New",
    "createdDate": "2019-05-14T09:55:00",
    "modifiedDate": "2019-05-14T09:55:00",
    "content": { "customerKey": "f0509ac4-9722-4614-8cea-f19f4bafe73d" },
    "subscriptions": { "dataExtension": "858FCE9F-0675-4B31-BB57-034575ED72A0", "list": "All Subscribers ext id", "autoAddSubscriber": true, "updateSubscriber": true },
    "options": { "trackLinks": true }
}
  • 1
    What is the request & route you are sending when you set the status. "New" status tells me its not in "running" or active status – EazyE May 14 at 14:44
  • POST to : xxxx.rest.marketingcloudapis.com/messaging/v1/email/definitions – jclobro May 14 at 14:46
  • and what is the JSON response of the call, I get a 201 created and I see status = Active – EazyE May 14 at 15:13
  • Ive added a response to the description (got 201 actually) but still status = "New"... Any chances for a code sample? @EazyE – jclobro May 14 at 16:08
  • 1
    The issue was a validation error in my email content (no subject) I was able to send the message OK - @EazyE : Could you post an answer so I can mark one green? – jclobro May 14 at 18:41
2

If the triggersenddefinition status is not being set to "Active" when specifying "Active" but being set to "New", ensure that there is not a validation issue with the email you are using in the content node. The easiest way to validate the email is to do a send preview within Content Builder, and reviewing any errors. Then do a patch call to set the status to "Active"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.