Responses
-
Success
-
Bad Request -- Your request is invalid.
-
Unauthorized -- Your API key is wrong.
-
Forbidden -- The object requested is hidden for administrators only.
-
Not Found -- The specified object could not be found.
-
Too Many Requests -- You're requesting too many objects! Slow down!
-
Internal Server Error -- We had a problem with our server. Try again later.
-
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
POST
/contacts
curl \
--request POST 'https://api.usecollect.com/v1/contacts' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"tags":["Developer"],"email":"dinesh.chugtai@example.com","lastName":"Chugtai","firstName":"Dinesh","customFields":[{"value":"Blue","variable":"color"},{"value":"US","variable":"country"}]}'
Request example
{
"tags": [
"Developer"
],
"email": "dinesh.chugtai@example.com",
"lastName": "Chugtai",
"firstName": "Dinesh",
"customFields": [
{
"value": "Blue",
"variable": "color"
},
{
"value": "US",
"variable": "country"
}
]
}
Response examples (200)
{
"_id": "uBJadNFcjrC6emRom",
"tag": [
"Developer"
],
"email": "dinesh.chugtai@example.com",
"custom": [
{
"_id": "yw6XDyeFvbqr86yA6",
"name": "Favorite color",
"value": "Blue",
"variable": "color"
},
{
"_id": "CqdFwGX3yitk9zf8z",
"name": "Country",
"value": "US",
"variable": "country"
}
],
"lastName": "Chugtai",
"requests": [],
"createdAt": "2024-12-22T13:40:26Z",
"firstName": "Dinesh",
"nbRequest": 0
}