Modify an element

PATCH /elements

This endpoint allows you to modify an element of a request.

application/json

Body object

One of:

Responses

  • 200 application/json

    OK

    One of:
  • 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.

PATCH /elements
curl \
 -X PATCH https://api.usecollect.com/v1/elements \
 --user "username:password" \
 -H "Content-Type: application/json" \
 -d '{"elementId":"eEDJFD5unNQTHoSBZ","status":"rejected","reason":"The document is not readable"}'
{
  "elementId": "eEDJFD5unNQTHoSBZ",
  "status": "rejected",
  "reason": "The document is not readable"
}
{
  "requestId": "2ewEw5L6amQiJ6J2A",
  "status": "approved",
  "visibility": false
}
{
  "requestId": "e6bggjBX7vdWKWYwq",
  "name": "NDA with ACME Corp"
}
{
  "requestId": "BKJ95xmpHSyo7KuRC",
  "type": "text",
  "order": 4,
  "text": "Hello everyone!"
}
{
  "requestId": "XigRzPs4N5vwX3Rks",
  "type": "page",
  "order": 3,
  "name": "More details"
}
Response examples (200)
{
  "id": "eEDJFD5unNQTHoSBZ",
  "itemId": "urRJfPK7CfyGBnHg8",
  "name": "ID",
  "order": 3,
  "visibility": true,
  "status": "rejected",
  "reason": "The document is not readable",
  "mandatory": true,
  "multipleupload": true,
  "uploads": [
    {
      "createdAt": "2022-02-21 11:27:32 UTC",
      "name": "Elon's ID.pdf",
      "url": "https://collectuseast.s3.amazonaws.com/elon_id.pdf?AWSAccessKeyId=AKIAJTQD6LRBSTO25FSQ&Expires=1561559790&Signature=bglKxNBqqcDKkAeuzmxoBS2IOQQ%3D",
      "size": 2414511,
      "scannedOn": "2022-02-21 11:27:52 UTC",
      "virusScanned": true
    }
  ],
  "type": "docs",
  "request": {
    "_id": "bbbBkrejSaJkHWwDE",
    "campaignId": "7gDq3XyLyixkhqoHa"
  }
}
{
  "id": "2ewEw5L6amQiJ6J2A",
  "itemId": "dy8SYGJauWwhDcGrp",
  "name": "Company info",
  "order": 0,
  "visibility": false,
  "status": "approved",
  "items": [
    {
      "name": "What size is your company",
      "type": "dropdown",
      "answer": "50-250 employees"
    },
    {
      "name": "Where is your company located?",
      "type": "multi",
      "answer": [
        "🇺🇸 USA",
        "🇪🇺 Europe"
      ]
    }
  ],
  "type": "form",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  }
}
{
  "id": "e6bggjBX7vdWKWYwq",
  "itemId": "urRJfPK7CfyGBnHg8",
  "name": "NDA with ACME Corp",
  "order": 2,
  "visibility": true,
  "status": "signed",
  "uploads": [
    {
      "id": "KErM5RgjHWjnBPLXz",
      "createdAt": "2023-04-18 10:19:31 UTC",
      "name": "New doc to sign.pdf",
      "url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171409_new_doc_to_sign.pdf",
      "size": 199498
    },
    {
      "id": "SjgRfMK9Bnj6JYvTy",
      "createdAt": "2023-04-18 10:19:33 UTC",
      "name": "Summary.pdf",
      "url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171675_summary.pdf",
      "size": 280284
    }
  ],
  "type": "sign",
  "request": {
    "_id": "bbbBkrejSaJkHWwDE",
    "campaignId": "7gDq3XyLyixkhqoHa"
  }
}
{
  "id": "BKJ95xmpHSyo7KuRC",
  "itemId": "7LBBC8LwnBnQoz8ae",
  "name": "Text block",
  "order": 4,
  "visibility": true,
  "type": "text",
  "text": "Hello everyone!",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  }
}
{
  "id": "XigRzPs4N5vwX3Rks",
  "itemId": "L3uAmzDRJjWTm2TMR",
  "name": "More details",
  "order": 3,
  "visibility": true,
  "type": "page",
  "request": {
    "_id": "GTonevwqoPPJ2PYEy",
    "campaignId": "3ya2sjN9GYwYAHeSi"
  }
}