Modify a contact
POST
/contacts/{contactId}
This endpoint modify an existing contact. It returns the contact object.
Path parameters
-
contactId string Required
Specify the ID of the contact to modify.
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/{contactId}
curl \
-X POST https://api.usecollect.com/v1/contacts/{contactId} \
--user "username:password" \
-H "Content-Type: application/json" \
-d '{"firstName":"John","lastName":"Doe","customFields":[{"variable":"color","value":"Blue"},{"variable":"country","value":"US"}]}'
Request example
{
"firstName": "John",
"lastName": "Doe",
"customFields": [
{
"variable": "color",
"value": "Blue"
},
{
"variable": "country",
"value": "US"
}
]
}
Response example (200)
{
"_id": "uBJadNFcjrC6emRom",
"email": "johndoe@example.com",
"firstName": "John",
"lastName": "Doe",
"tag": [
"Speaker"
],
"custom": [
{
"_id": "yw6XDyeFvbqr86yA6",
"name": "Favorite color",
"variable": "color",
"value": "Blue"
},
{
"_id": "CqdFwGX3yitk9zf8z",
"name": "Country",
"variable": "country",
"value": "US"
}
],
"createdAt": "2022-02-22 13:40:26 UTC",
"lastActivity": "2022-06-19 17:14:52 UTC",
"requests": [
{
"_id": "NxAHPWu9hRzcyD24m",
"campaignId": "mYCsdgB4DQoENBaX6",
"createdAt": "2022-02-22 13:40:26 UTC",
"status": "completed",
"privacy": "team",
"branding": {
"useBranding": false
}
},
{
"_id": "jP6sXJ72R8xjxceaP",
"campaignId": "mYCsdgB4DQoENBaX6",
"createdAt": "2022-04-19 13:58:07 UTC",
"status": "completed",
"privacy": "team",
"branding": {
"useBranding": false
},
"note": {
"date": "2022-05-04 14:25:17 UTC",
"note": "Asked him to send back another document"
}
},
{
"_id": "FmZNnerEFRF3dLYPK",
"campaignId": "mYCsdgB4DQoENBaX6",
"createdAt": "2022-06-18 16:19:46 UTC",
"status": "pending",
"privacy": "team",
"branding": {
"useBranding": true,
"brandingId": "jSEj7vHk3wLG3gRF7"
}
}
]
}