Workspaces
Create, read, update and delete the collections that hold your documents.
A workspace holds documents that are answered together. It is the unit of separation in this API: retrieval never crosses from one workspace into another.
List workspaces
Returns every workspace under the app your key belongs to, newest first.
GET
/workspaces/| Field | Type | Description |
|---|---|---|
page | integer | 1-based page number. Defaults to 1. |
page_size | integer | Results per page. Defaults to 30, capped at 200. |
curl "https://api.daneshyar.info/api/v1/workspaces/?page_size=50" \
-H "X-API-Key: dk_live_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"Response
{
"status": "ok",
"data": {
"count": 2,
"next": null,
"previous": null,
"results": [
{
"id": "8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f",
"title": "Cardiology intake",
"description": "Patient handbooks and discharge protocols",
"share_token": "s7Kd0pLm2Qx",
"created_at": "2026-08-05T09:14:22.118Z",
"updated_at": "2026-08-05T09:14:22.118Z"
}
]
}
}Create a workspace
Creates a workspace. Only title is required; description is free text you can use however you like.
POST
/workspaces/| Field | Type | Description |
|---|---|---|
title (required) | string | Human-readable name for the workspace. |
description | string | Optional longer description. |
curl -X POST "https://api.daneshyar.info/api/v1/workspaces/" \
-H "X-API-Key: dk_live_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL" \
-H "Content-Type: application/json" \
-d '{
"title": "Cardiology intake",
"description": "Patient handbooks and discharge protocols"
}'Response
{
"status": "ok",
"data": {
"id": "8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f",
"title": "Cardiology intake",
"description": "Patient handbooks and discharge protocols",
"share_token": "s7Kd0pLm2Qx",
"created_at": "2026-08-05T09:14:22.118Z",
"updated_at": "2026-08-05T09:14:22.118Z"
}
}Retrieve a workspace
Returns one workspace. A workspace belonging to a different app is a 404, not a 403 — the API doesn't confirm that ids outside your app exist.
GET
/workspaces/{workspace_id}/| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier, assigned by the server. |
title | string | Human-readable name for the workspace. |
description | string | Optional longer description. |
share_token | string | Token behind the workspace's public share link. |
created_at | datetime | ISO 8601 timestamp of creation. |
updated_at | datetime | ISO 8601 timestamp of the last change. |
curl "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/" \
-H "X-API-Key: dk_live_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"Update a workspace
Updates a workspace. The body is partial: send only the fields you're changing.
PUT
/workspaces/{workspace_id}/curl -X PUT "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/" \
-H "X-API-Key: dk_live_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL" \
-H "Content-Type: application/json" \
-d '{ "title": "Cardiology intake (2026)" }'Delete a workspace
Deletes the workspace, its resources and its chat history. This is not reversible and there is no soft-delete or trash.
Deleting a workspace destroys every document in it and every conversation about it. Nothing in this API can undo that.
DELETE
/workspaces/{workspace_id}/curl -X DELETE "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/" \
-H "X-API-Key: dk_live_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"Response
{
"status": "ok",
"data": { "message": "Workspace deleted" }
}