Create Contact Gets HTTP 200 But no Body returned or record created
B
Barchard Les
Using sandbox against POST https://sandbox.api.portal.io/public/people
--data-urlencode 'ContactType=Customer' \
--data-urlencode 'ContactCategory=Residential' \
--data-urlencode 'FirstName=Test' \
--data-urlencode 'LastName=Contact' \
--data-urlencode 'CompanyName=Test Company' \
--data-urlencode 'ContactEmail=test@example.com' \
--data-urlencode 'ContactPhone=123-555-1234'
I receive HTTP 200
Body of response is empty
Using both the Application UI and
GET /public/people?SearchText=test@example.com&PageSize=10&PageNumber=
I can't find the person. From GET call above I receive
{
"people": [],
"peopleCount": 0
}
Any suggestions on what I might be doing wrong?
Kirk Chisholm
Hi Barchard. Not sure if you got this figtured out yet, I see it's been a couple months.
Your request is almost certainly being rejected at the validation layer before the contact is created. There are two things to check:
- Missing PartyType field
The PartyType field is required on every POST /public/people request but isn't included in your call. Without it, the API cannot create the contact. Add one of the following to your request body:
text
--data-urlencode 'PartyType=Individual'
or
text
--data-urlencode 'PartyType=Company'
- ContactEmail needs URL-encoding
Your ContactEmail value contains a literal @ character. Per the docs, special characters in form values must be URL-encoded before sending — @ should be encoded as %40. When using --data-urlencode, curl handles encoding automatically if you pass the value in key=value format, so double-check that the @ isn't being dropped or misinterpreted.
Corrected request:
bash
curl -i -X POST \
'https://sandbox.api.portal.io/public/people' \
-H 'Accept: application/json' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'X-MSS-API-APPID: YOUR_APP_ID' \
-H 'X-MSS-API-USERKEY: YOUR_USER_KEY' \
-H 'X-MSS-CUSTOM-DATE: Mon, 06 Apr 2026 00:22:19 GMT' \
-H 'X-MSS-SIGNATURE: BASE64_SIGNATURE' \
--data-urlencode 'PartyType=Individual' \
--data-urlencode 'ContactType=Customer' \
--data-urlencode 'ContactCategory=Residential' \
--data-urlencode 'FirstName=Test' \
--data-urlencode 'LastName=Contact' \
--data-urlencode 'CompanyName=Test Company' \
--data-urlencode 'ContactEmail=test@example.com' \
--data-urlencode 'ContactPhone=123-555-1234'
A successful 200 response will return the full contact record including the assigned id. Once you see that id in the response, your GET /public/people?SearchText=... lookup should work as expected.
Let us know if you're still not seeing the contact after making those changes!