Skip to main content
If you are organizing essential services or emergency response to COVID-19, activate your free account

Can't create a new contact; getting validation error

I'm trying to create a contact record but am getting a validation error:
HTTP POST (301.95ms) https://ertw.nationbuilder.com:443/api/v1/people/12456/contactsRequest body   {"contact":{"sender_id":3,"status":"answered","method":"door_knock","type_id":2,"note":null}} Response status   Net::HTTPBadRequest (400)Response body   {"code":"validation_failed","message":"Validation Failed.","validation_errors":["recipient_id can't be blank"]}
recipient_id is listed as an optional attribute in the docs and it seems redundant since I'm passing the recipient in the url, but I'll play along:
HTTP POST (747.43ms) https://ertw.nationbuilder.com:443/api/v1/people/12456/contactsRequest body   {"contact":{"sender_id":3,"recipient_id":12456,"status":"answered","method":"door_knock","type_id":2,"note":null}} Response status   Net::HTTPBadRequest (400)Response body   {"code":"validation_failed","message":"Validation Failed.","validation_errors":["recipient_id can't be blank"]}
I'm using code that used to work (and didn't need recipient ID). I've also tried this in the API explorer and get the same results.
Any advice?
Thanks,
Sean
Share this post

Showing 1 reaction

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.