Modify a request
This endpoint retrieves all the details of a specific request including the answers of the forms and the documents that have been uploaded.
Body
-
requestId string
The ID of the request you want to modify.
-
status string
The new status of the request. Can be one of the predifined status
pending
,completed
,waiting
,canceled
,archived
or a custom status that you previously have created on your account. -
dueDate string
The new due date of the request. The due date should be encoded as a string using ISO 8601 format.
-
data object
An object with custom data that you want to use in your request.
-
assignedTo string
The ID of the team member you want to assign the request to. Use 'unset' if you want to unassign the request.
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 PATCH https://api.usecollect.com/v1/request \
--user "username:password" \
-H "Content-Type: application/json" \
-d '{"requestId":"bbbBkrejSaJkHWwDE","status":"pending"}'
{
"requestId": "bbbBkrejSaJkHWwDE",
"status": "pending"
}
{
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa",
"createdAt": "2023-02-21 10:31:52 UTC",
"status": "pending",
"dueDate": null,
"portalUrl": "https://app.usecollect.com/portal/LzP5r56tpqh3gteCf/bbbBkrejSaJkHWwDE",
"privacy": "private",
"contact": {
"_id": "ngxhLDiDGEBS2jjKh",
"email": "elon@example.com",
"firstName": "Elon",
"lastName": "Musk",
"company": "Tesla",
"tag": [],
"custom": [],
"createdAt": "2022-11-16 05:00:43 UTC",
"lastActivity": "2022-02-21 10:31:52 UTC"
},
"branding": {
"useBranding": true,
"brandingId": "bJoTr6kHikTRDsvSd"
}
},
"errors": []
}