Add a contributor
This endpoint allows you to add new contacts or existing contacts as contributors of a request.
Body
-
requestId string
The ID of the request you want to add the contributor to.
- contacts array[string] | array[object]
One of: An array of the contributors you want to add to the request. You can add up to 10 contributors per API cal. Each contributors can be a string representing the ID of an existing contact or a contact object in JSON format. (click here for more details)
Responses
-
• 200 object
List of requests of a campaigns.
-
• 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.
curl \
-X POST https://api.usecollect.com/v1/contributors \
--user "username:password" \
-H "Content-Type: application/json" \
-d '{"requestId":"xvr69EYLKXvTkfYuk","contact":{"email":"elon@example.com","firstName":"Elon","lastName":"Musk","company":"Tesla","data":{"brand":"Tesla","model":"Roadster"}}}'
{
"requestId": "xvr69EYLKXvTkfYuk",
"contact": {
"email": "elon@example.com",
"firstName": "Elon",
"lastName": "Musk",
"company": "Tesla",
"data": {
"brand": "Tesla",
"model": "Roadster"
}
}
}
{
"requestId": "xvr69EYLKXvTkfYuk",
"contact": "WmTjsFknzHdmfs3Ra"
}
{
"request": {
"_id": "nw42MmBsJoccgutST",
"campaignId": "xvr69EYLKXvTkfYuk",
"createdAt": "2022-07-04 07:20:06 UTC",
"portalUrl": "https://app.usecollect.com/portal/uGFRDeEL3Ct2uYo2c/nw42MmBsJoccgutST",
"status": "pending",
"dueDate": "2022-07-11 21:59:00 UTC",
"privacy": "private",
"contact": {
"_id": "xtPWKQqcAk8MJfoz5",
"email": "maincontact@example.com",
"firstName": "John",
"lastName": "Doe",
"nbRequest": 5,
"createdAt": "2022-07-03 13:51:27 UTC",
"lastActivity": "2022-07-04 07:20:06 UTC"
},
"contributors": [
{
"_id": "WmTjsFknzHdmfs3Ra",
"email": "johndoe@example.com",
"firstName": "Elon",
"lastName": "Musk",
"createdAt": "2022-07-03 13:51:27 UTC"
}
],
"branding": {
"useBranding": false
}
},
"errors": []
}