[SalesForce] MessageDefinitionSends Rest API successful response but never sends email

I'm getting a successful response (202 code with empty response body), but my email neither sends nor looks to be queued.

POST to https://www.exacttargetapis.com/messaging/v1/messageDefinitionSends/key:expenseit_test_triggered_send/send?access_token=[token]

with headers:

  • Authorization: Bearer [token]
  • Content-Type: application/json

and payload:

{
    "From": {
        "Address": "sender@domain.com", 
        "Name": "Sender"
    }, 
    "To": {
        "Address": "recipient@domain.com", 
        "ContactAttributes": {
            "SubscriberAttributes": {
                "City": "Seatle", 
                "State": "WA"
            }
        }
    }
}

Am I mis-using the endpoint? Is there another endpoint that I should use to verify the status of this message?

Best Answer

SubscriberKey is a required property. If there is not a unique ID that is being used for subscribers, then just pass the same value you are passing for Address.

{
    "From": {
        "Address": "sender@domain.com", 
        "Name": "Sender"
    }, 
    "To": {
        "Address": "recipient@domain.com", 
        "SubscriberKey": "recipient@domain.com", 
        "ContactAttributes": {
            "SubscriberAttributes": {
                "City": "Seatle", 
                "State": "WA"
            }
        }
    }
}
Related Topic