Add an element
This endpoint allows you to add an element to an existing request. You can currently add docs, text and pages. form will come later.
Body object
Responses
-
200 application/json
-
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 /elements
curl \
-X POST https://api.usecollect.com/v1/elements \
-H "Content-Type: application/json" \
-d '{"name":"ID","type":"docs","order":3,"requestId":"bbbBkrejSaJkHWwDE"}'
Request examples
Document
{
"name": "ID",
"type": "docs",
"order": 3,
"requestId": "bbbBkrejSaJkHWwDE"
}
{
"text": "Hello World!",
"type": "text",
"order": 4,
"requestId": "GTonevwqoPPJ2PYEy"
}
{
"name": "More details",
"type": "page",
"order": 2,
"requestId": "GTonevwqoPPJ2PYEy"
}
Response examples (200)
Document
{
"id": "eEDJFD5unNQTHoSBZ",
"name": "ID",
"type": "docs",
"order": 3,
"itemId": "urRJfPK7CfyGBnHg8",
"status": "open",
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa"
},
"uploads": [],
"mandatory": true,
"visibility": true,
"multipleupload": true
}
{
"id": "BKJ95xmpHSyo7KuRC",
"name": "Text block",
"text": "Hello World!",
"type": "text",
"order": 4,
"itemId": "7LBBC8LwnBnQoz8ae",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
},
"visibility": true
}
{
"id": "XigRzPs4N5vwX3Rks",
"name": "More details",
"type": "page",
"order": 2,
"itemId": "L3uAmzDRJjWTm2TMR",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
},
"visibility": true
}