Responses
-
200 application/json
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 \
-X POST https://api.usecollect.com/v1/contacts \
-H "Content-Type: application/json" \
-d '{"tags":["Speaker"],"email":"john@example.com","lastName":"Doe","firstName":"John","customFields":[{"value":"Blue","variable":"color"},{"value":"US","variable":"country"}]}'
Request example
{
"tags": [
"Speaker"
],
"email": "john@example.com",
"lastName": "Doe",
"firstName": "John",
"customFields": [
{
"value": "Blue",
"variable": "color"
},
{
"value": "US",
"variable": "country"
}
]
}
Response examples (200)
{
"_id": "uBJadNFcjrC6emRom",
"tag": [
"Speaker"
],
"email": "johndoe@example.com",
"custom": [
{
"_id": "yw6XDyeFvbqr86yA6",
"name": "Favorite color",
"value": "Blue",
"variable": "color"
},
{
"_id": "CqdFwGX3yitk9zf8z",
"name": "Country",
"value": "US",
"variable": "country"
}
],
"lastName": "Doe",
"requests": [],
"createdAt": "2023-02-22T13:40:26Z",
"firstName": "John",
"nbRequest": 0
}