1

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": "[email protected]",
        "Name": "No reply"
    },
    "To": {
        "Address": "[email protected]",
        "SubscriberKey": "[email protected]"


},
    "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

3
  • 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. Mar 27, 2019 at 12:49
  • Hi @Gortonington....Thanks for your reply....It says its a valid JSON.
    – Naveen VM
    Mar 27, 2019 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'. Mar 27, 2019 at 20:31

2 Answers 2

2

You have it in an array.

Try without []

{
    "From": {
        "Address": "[email protected]",
        "Name": "No reply"
    },
    "To": {
        "Address": "[email protected]",
        "SubscriberKey": "[email protected]"
    },
    "Options": {
        "RequestType": "SYNC"
    }
  }
1
  • Thanks @Mike Its working now. That Array is a problem.
    – Naveen VM
    Mar 28, 2019 at 10:02
1

Try like this

{
"From": {
    "Address": "[email protected]",
    "Name": "No reply"
},
"To": {
    "Address": "[email protected]",
    "SubscriberKey": "[email protected]",
    "ContactAttributes": {
        "SubscriberAttributes": {
            "Name": "test"
        }
    }
} 
}

You must log in to answer this question.

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