Skip to content

Delete a document

DELETE /api/document/{documentId}

DELETE /api/document/{documentId}/{templateId}/{versionId}

Delete an existing Formbird document

Arguments
  • your apiKey, for example: bf5b0500-9332-11e6-9c03-853f647fe4a4
  • documentId
  • templateId - the template to use for the operation (used for systemHeader.createdWith)
  • versionId - the version of the document you currently have (used for systemHeader.previousVersionId)
Example Request 1
curl http://localhost:3000/api/document/dcfc63d0-9442-11e7-a6b2-d9cc8e84f3a6 \
 -X DELETE \
 -H "apiKey: bf5b0500-9332-11e6-9c03-853f647fe4a4"
Example Response
"dcfc63d0-9442-11e7-a6b2-d9cc8e84f3a6"

The response contains the documentId of the document deleted

Example Request 2
curl http://localhost:3000/api/document/dcfc63d0-9442-11e7-a6b2-d9cc8e84f3a6/547fe84c9c1d86680d9806bd/a01d4810-9444-11e7-a6b2-d9cc8e84f3a6 \
 -X DELETE \
 -H "apiKey: bf5b0500-9332-11e6-9c03-853f647fe4a4"
Example Response
"dcfc63d0-9442-11e7-a6b2-d9cc8e84f3a6"

The response contains the documentId of the document deleted