DELETE /v1/document/:id
Delete a document.
⚠️
Only document creators can delete documents, not editors.
Example
Minimal Example:
fetch("https://api.impb.in/v1/document/MO0lJElX", {
method: "DELETE",
headers: {
Authorization: "imperial_123456789",
"Content-Type": "application/json",
},
})
.then((res) => res.json())
.then(console.log)
.catch((err) => console.error(err));
Options:
fetch("https://api.impb.in/v1/document/MO0lJElX", {
method: "DELETE",
headers: {
Authorization: "imperial_123456789",
"Content-Type": "application/json",
},
})
.then((res) => res.json())
.then(console.log)
.catch((err) => console.error(err));
Responses
200 OK
{
"success": true
}
401 Unauthorized
{
"success": false,
"error": {
"message": "Unauthorized"
}
}
403 Forbidden
{
"success": false,
"error": {
"message": "You do not own this document"
}
}
404 Not Found
{
"success": false,
"error": {
"message": "Document not found"
}
}
5xx Internal Server Error
{
"success": false,
"error": {
"message": "Internal server error"
}
}