Unpublish
Take a published document offline. The document and its settings are preserved for republishing later.
Unpublishing removes the public page for the specified document. The document itself is not deleted, and all content and settings remain intact. You can republish the document at any time.
Note
After unpublishing, the previously published URL returns a 404 page. If you republish later with the same slug, the URL becomes active again.
DELETE
/v1/documents/:id/publishUnpublish a document, taking its public page offline.
Request
bash
curl -X DELETE https://api.unmarkdown.com/v1/documents/d290f1ee-6c54-4b01-90e6-d701748f0851/publish \
-H "Authorization: Bearer um_your_api_key"Response
json
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"is_published": false
}Error Response
json
{
"error": {
"code": "not_found",
"message": "Document not found",
"status": 404
}
}Status Codes
| Status | Description |
|---|---|
| 200 | Document unpublished successfully |
| 401 | Missing or invalid API key |
| 404 | Document not found |
| 429 | Rate limit or quota exceeded |
| 500 | Internal server error |