adding contact via https://api.insight.ly/v2.1/contacts

I am trying to add contacts to my account via the api, I have read the documentation and tried adding a contact using postman, each time I get a 400 response that the data in the request is invalid. Here is my current request 

 

request url: https://api.insight.ly/v2.1/contacts

request type: POST 

request auth: basic 64 encoded 

request body: {
"FIRST_NAME": "Matty",
"LAST_NAME": "Bennett"
}

i have also tried this for the request body 

apiContact : {
"FIRST_NAME": "Matty",
"LAST_NAME": "Bennett"
}

 

nothing works.

0

Comments

1 comment
  • Hi Matthew,

    I think your problem might just be missing a few additional headers.  Could you double check and see if there are headers for Accept and Content-Type?

    If they aren't supplied, simply use "application/json", e.g:

    Authorization: "Basic <Encode64>"

    Accept: "application/json"

    Content-Type: "application/json"

     

    Also, as a side note, v2.1 of the API will likely be deprecated in the future, if you can, please use v2.2, it is faster and has more features.

    Hope that helps!

    -Sung

    0
    Comment actions Permalink

Please sign in to leave a comment.