1

I am trying to use the /interaction/v1/events API.

I have made a request to #https:#//auth.exacttargetapis.com/v1/requestToken using my clientid and clientsecret and get back a accessToken

When I try to make a request to POST #https:#//www.exacttargetapis.com/interaction/v1/events I get back a 400 Bad Request response with message

{"message":"Runtime Error. Retry this action. Contact Global Support if the issue persists","errorcode":30000,"documentation":""}

This is the request that I am trying to send

POST https://www.exacttargetapis.com/interaction/v1/events
Content-Type: application/json
Authorization: Bearer insertAccessToken
Host: www.exacttargetapis.com
Content-Length: 181

{  
   "ContactKey":"ID601",
   "EventDefinitionKey":"Cub_Competition",
   "EstablishContactKey":false,
   "Data":{  
      "FirstName":"Andy Elks",
      "EmailAddress":"[email protected]",
      "Choice":"Mika"
   }
}

Why is this not working?, I have followed the documentation here https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/postEvent.htm

Thanks

1 Answer 1

0

You will get a 400 error if you include a Content-Length header.

Another issue could be that you don't have an Event with the Event Definition Key Cub_Competition. Can you confirm that this is the actual Event Definition Key? Is this the key you created when creating the API Event? Also, please confirm that the name/value pairs in your Data object match the fields in your Event Source DE.

2
  • Thanks Eliot, yeah it looks like the API Event key was just the external key for the Data Extension. We changed it to the API Event key and it all works!!. Commented Jul 11, 2017 at 6:54
  • Good to hear. Please could you accept my answer for the benefit of others. Commented Jul 11, 2017 at 6:55

You must log in to answer this question.

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