Skip to content
DaneshyarDocs
Sign in
  • Introduction
  • Quickstart
  • API keys
  • Authentication
  • Apps, workspaces, resources
  • Ingestion
  • Chat and sessions
  • Citations
  • Skills
  • Conventions
  • Workspaces
  • Resources
  • Chat
  • Skills
  • Errors
  • Customer support assistant
  • Internal knowledge base
  • Documentation chatbot
  • Embedded widgetOn the roadmap: Soon
  • TypeScript SDKOn the roadmap: Soon
  1. Docs
  2. API reference
  3. Workspaces

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/
FieldTypeDescription
pageinteger1-based page number. Defaults to 1.
page_sizeintegerResults per page. Defaults to 30, capped at 200.
cURL
JavaScript
Python
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/
FieldTypeDescription
title* (required)stringHuman-readable name for the workspace.
descriptionstringOptional longer description.
cURL
JavaScript
Python
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}/
FieldTypeDescription
iduuidUnique identifier, assigned by the server.
titlestringHuman-readable name for the workspace.
descriptionstringOptional longer description.
share_tokenstringToken behind the workspace's public share link.
created_atdatetimeISO 8601 timestamp of creation.
updated_atdatetimeISO 8601 timestamp of the last change.
cURL
JavaScript
Python
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
JavaScript
Python
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
JavaScript
Python
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" }
}
PreviousConventionsNextResources

On this page

  • List workspaces
  • Create a workspace
  • Retrieve a workspace
  • Update a workspace
  • Delete a workspace

Every example on this site runs against the live API. If one doesn't, tell us — that's a bug in the docs.

ServicesAboutTalk to us