Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

invalid syntax or bad data

ExclusiveMotorWorks
Rookie
0 Votes

I keep on getting this error even if I follow your documentation and support information (from here) on how to create a contact.

Can you help to resolve this issue?

 

{
  "email_address": {
         "address": "jamesdean@yahoo.com"
   },
   "first_name" : "James",
  "create_source": "Contact"
}

 

response:

[ { "error_key": "accountsvc.api.invalid_data", "error_message": "invalid syntax or bad data" }

 

response code: 400

 

 

Please this is urgent. Kindly advice what was wrong with the json data.

 

Guides followed: 

https://community.constantcontact.com/t5/Developer-Support-ask-questions/API-v3-Creating-contact-inv...

https://v3.developer.constantcontact.com/api_guide/contacts_create.html?_ga=2.139674427.926330700.16...

 

 

Thank you

 

1 REPLY 1
Courtney_E
Moderator
0 Votes

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

It looks like we've already followed up with you directly via email, but If you still need assistance with this, please let us know!

 

Here is the information provided for visibility on the forum:

When testing the body provided using our V3 API tester we were able to add the contact without issue. The only spot that might contain a potential malformed error would be the extra space between "first_name" and the colon (:) so it may have been more of a validation error rather than formatting.


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up