Body Required
Responses
-
• 200 object
Success
-
• 400
Bad Request -- Your request is invalid.
-
• 401
Unauthorized -- Your API key is wrong.
-
• 403
Forbidden -- The object requested is hidden for administrators only.
-
• 404
Not Found -- The specified object could not be found.
-
• 429
Too Many Requests -- You're requesting too many objects! Slow down!
-
• 500
Internal Server Error -- We had a problem with our server. Try again later.
-
• 503
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
POST /contacts
curl \
-X POST https://api.usecollect.com/v1/contacts \
--user "username:password" \
-H "Content-Type: application/json" \
-d '{"email":"john@example.com","firstName":"John","lastName":"Doe","tags":["Speaker"],"customFields":[{"variable":"color","value":"Blue"},{"variable":"country","value":"US"}]}'
Request example
{
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe",
"tags": [
"Speaker"
],
"customFields": [
{
"variable": "color",
"value": "Blue"
},
{
"variable": "country",
"value": "US"
}
]
}
Response example (200)
{
"_id": "uBJadNFcjrC6emRom",
"email": "johndoe@example.com",
"firstName": "John",
"lastName": "Doe",
"nbRequest": 0,
"tag": [
"Speaker"
],
"custom": [
{
"_id": "yw6XDyeFvbqr86yA6",
"name": "Favorite color",
"variable": "color",
"value": "Blue"
},
{
"_id": "CqdFwGX3yitk9zf8z",
"name": "Country",
"variable": "country",
"value": "US"
}
],
"createdAt": "2023-02-22 13:40:26 UTC",
"requests": []
}