0

I have created a Triggered send definition under trigger sends linked with static email and also linked a data extension based on triggered send template.

    [
            {
    "From": {
        "Address": "no-reply@exacttarget.com",
        "Name": "No reply"
    },
    "To": {
        "Address": "exacttarget@gmail.com",
        "SubscriberKey": "exacttarget@gmail.com"


},
    "Options": {
        "RequestType": "SYNC"
    }
  }            ] 

Am hitting the below end point for triggered send: https://host.rest.marketingcloudapis.com/messaging/v1/messageDefinitionSends/key:externalkey/send

Am getting an error like

{
"message": "Problem initating message send during deserialization of JSON payload.",
"errorcode": 10004,
"documentation": ""
}

Please help

  • 10004 means that there is the following error: Invalid Message Format - Serialization error, please ensure the body has balanced braces and brackets. (ref: developer.salesforce.com/docs/…) This means that likely your JSON is malformed. I would put it through a linter (jsonlint.com) to find the error. – Gortonington Mar 27 '19 at 12:49
  • Hi @Gortonington....Thanks for your reply....It says its a valid JSON. – razor Mar 27 '19 at 13:51
  • Yeah, it shouldn't be in an array, and I would also check on if your email requires any personalization as if so, you will need to include that information in the 'ContactAttributes' section under 'To'. – Gortonington Mar 27 '19 at 20:31
1

You have it in an array.

Try without []

{
    "From": {
        "Address": "no-reply@exacttarget.com",
        "Name": "No reply"
    },
    "To": {
        "Address": "exacttarget@gmail.com",
        "SubscriberKey": "exacttarget@gmail.com"
    },
    "Options": {
        "RequestType": "SYNC"
    }
  }
  • Thanks @Mike Its working now. That Array is a problem. – razor Mar 28 '19 at 10:02
1

Try like this

{
"From": {
    "Address": "no-reply@exacttarget.com",
    "Name": "No reply"
},
"To": {
    "Address": "exacttarget@gmail.com",
    "SubscriberKey": "exacttarget@gmail.com",
    "ContactAttributes": {
        "SubscriberAttributes": {
            "Name": "test"
        }
    }
} 
}

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.