Delete Workspace
Delete a workspace and optionally all its documents.
DELETE /v1/workspaces/:id
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Workspace ID |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
delete_documents | boolean | false | Also delete all documents |
Example Request
# Delete workspace only (fails if documents exist)
curl -X DELETE https://api.inherent.systems/v1/workspaces/ws_abc123 \
-H "Authorization: Bearer $INHERENT_API_KEY"
# Delete workspace and all documents
curl -X DELETE "https://api.inherent.systems/v1/workspaces/ws_abc123?delete_documents=true" \
-H "Authorization: Bearer $INHERENT_API_KEY"
Response
{
"id": "ws_abc123",
"deleted": true,
"documents_deleted": 156
}
Errors
| Code | Description |
|---|---|
404 | Workspace not found |
409 | Workspace has documents (use delete_documents=true) |