1

Follow up to this question

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",
      "attributes": {
          "CompanyID": "company_id",
          "EmailAddress": "email"
      }
  }
}

This request ends up in a 202 Status, but, after doing multiple GET for the same resource, and checking the queue associated with the definition, it seems that the email is stuck in EmailQueued status.

=> Could it be a misconfiguration issue from the MC interface ? (I doubt it because the transactional API and the UI don't seem to be correlated)

Or is my payload incomplete, despite the 202 status ?

Thanks

  • 1
    Are records being created in the Data Extension? If so, can you try to preview the email against one of the records to see, whether it renders correctly? If any AmpScript errors are in the email, it might end up in EmailQueued status – Lukas Lunow Jul 1 at 10:20
  • In the data extension data_ext linked to the send definition, there is 1 record (the subscriber to which I want to send the email) In the MC interface, the preview and sending work well. The template I'm using does not contain any AMPScript In the "attributes" field of the payload, do I need to specify all of the values contained in the Data Extension Row ? – Ismaïl Mourtada Jul 1 at 12:17
  • The data extension fields need to correspond 1:1 to your payload (i.e. DE field names = fields in API call). This can also be a source of the issue – Lukas Lunow Jul 1 at 12:22
  • Just to check for the more basic issue: Did you start the Triggered Send, by marking it and clicking Start/Restart button in the Triggered Send overview? – Lukas Lunow Jul 1 at 12:39
  • My triggered send was created with the REST API, and I cannot view it in the interface. Yet, when I go a GET /email/definitions/{my_definition}, the status is Active. I guess it's the equivalent of having it started in the interface – Ismaïl Mourtada Jul 1 at 12:43
0

I managed to fix this by removing the DataExtension attribute from the Triggered Send Definition. In fact, I don't need this attribute, because all that matters is the Subscriber Key. If I have some Subscriber Attributes to specify, I can still copy the data from my Data Extension Row, without forcibly specifying which Data Extension it belongs to

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.