0

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":"subscriber@email.com",
      "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

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.

  • 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!!. – Luke Willington Jul 11 '17 at 6:54
  • Good to hear. Please could you accept my answer for the benefit of others. – Eliot Harper Jul 11 '17 at 6:55

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.