Skip to content
DaneshyarDocs
Sign in
  • Introduction
  • Quickstart
  • What is Daneshyar?
  • The Apps page
  • Inside an app
  • Workspace: files and chat
  • Sharing and members
  • Notes and dictation
  • Language practice
  • Appointment booking
  • Automations
  • The file reader
  • Your profile
  • Wallet
  • Customer chats
  • 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
  • Academy tutor
  • Embedded widget
  • Widget configuration
  • Framework guides
  • Security
  • Troubleshooting
  • FAQ
  1. Docs
  2. API reference
  3. Resources

Resources

Upload documents into a workspace and track their ingestion.

A resource is one uploaded document. Uploading it starts an asynchronous ingestion pipeline; it can only be answered from once that pipeline reaches ready.

List resources

Lists the workspace's resources, newest first. Check status before assuming a resource is answerable.

GET/workspaces/{workspace_id}/resources/
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/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/resources/" \
  -H "X-API-Key: sk_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"

Upload a resource

Uploads a file and queues it for ingestion. The request is multipart, and the response returns immediately with status queued — ingestion has not run yet.

POST/workspaces/{workspace_id}/resources/
FieldTypeDescription
file* (required)fileThe document to ingest. PDF, DOCX, TXT, JPG/PNG, MP3/WAV or MP4/MOV, up to 500 MB (TXT up to 10 MB, DOCX up to 20 MB). The content must match the extension, or the upload is refused with 400. Old .doc files are not accepted.
titlestringDisplay name. Defaults to the uploaded file's own name when omitted.

Accepted files:

TypeExtensionsNotes
pdfPDFDocuments. Text is extracted page by page.
imageJPG · JPEG · PNGImages. Described by the model; they produce no readable segments.
voiceMP3 · WAVAudio. Transcribed, with timestamps kept on each passage.
videoMP4 · MOVVideo. The audio track is transcribed the same way.
cURL
JavaScript
Python
curl -X POST "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/resources/" \
  -H "X-API-Key: sk_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL" \
  -F "file=@discharge-protocol-2026.pdf" \
  -F "title=Discharge protocol 2026"
Response
{
  "status": "ok",
  "data": {
    "id": "3c9a1b77-0d24-4e8b-b0f1-7a5e9c2d4b81",
    "title": "Discharge protocol 2026.pdf",
    "type": "pdf",
    "file_url": "https://api.daneshyar.info/media/resources/discharge-protocol-2026.pdf",
    "extension": "pdf",
    "size": 482913,
    "status": "queued",
    "summary": "",
    "key_notes": [],
    "error_message": "",
    "workspace_id": "8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f",
    "created_at": "2026-08-05T09:20:41.702Z",
    "updated_at": "2026-08-05T09:20:41.702Z"
  }
}
The type is derived from the extension, so you never send it. An unsupported extension, a file over the size limit (500 MB; .txt and .csv 10 MB, .docx and .xlsx 20 MB), or a file whose content does not match its extension is rejected with a 400 before anything is queued.

Retrieve a resource

Returns one resource, including its current status. This is the endpoint you poll while waiting for ingestion.

GET/workspaces/{workspace_id}/resources/{resource_id}/
FieldTypeDescription
iduuidUnique identifier, assigned by the server.
titlestringDisplay name. Defaults to the uploaded file's own name when omitted.
typepdf | image | voice | video | textDetected from the file extension — you don't set it.
file_urlstringDirect URL to the stored original.
extensionstringLowercased file extension, without the dot.
sizeintegerFile size in bytes.
statusqueued | vectorizing | ready | limited | failedWhere the file is in the ingestion pipeline. Only a ready resource can be answered from.
summarystringModel-written summary of the document. Empty until ingestion finishes.
key_notesobject[]Extracted notes, each an object with a note and (except for images) its source metadata.
error_messagestringWhy ingestion failed. Empty unless status is failed.
workspace_iduuidThe workspace this resource belongs to.
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/resources/3c9a1b77-0d24-4e8b-b0f1-7a5e9c2d4b81/" \
  -H "X-API-Key: sk_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"
Response
{
  "status": "ok",
  "data": {
    "id": "3c9a1b77-0d24-4e8b-b0f1-7a5e9c2d4b81",
    "title": "Discharge protocol 2026.pdf",
    "type": "pdf",
    "file_url": "https://api.daneshyar.info/media/resources/discharge-protocol-2026.pdf",
    "extension": "pdf",
    "size": 482913,
    "status": "ready",
    "summary": "A twelve-page protocol covering post-operative discharge criteria...",
    "key_notes": [
      {
        "note": "Patients on anticoagulants require a 48-hour observation window.",
        "metadata": { "source_type": "pdf", "page": 4, "line": 112 }
      }
    ],
    "error_message": "",
    "workspace_id": "8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f",
    "created_at": "2026-08-05T09:20:41.702Z",
    "updated_at": "2026-08-05T09:23:07.884Z"
  }
}

Retry a resource

Puts a stopped resource back through ingestion. It is accepted only from limited (the AI provider rate-limited us mid-run) or failed — any other status is a 400. There is no automatic retry behind it, so for a limited resource this call is the only way it ever finishes. Limited to 30 calls an hour per account (429, code rate_limited).

Ingestion resumes rather than restarts: if the extracted text was already stored, extraction and summarizing are skipped and only the indexing runs again. The response is the resource back at status queued, so poll it exactly as you would after an upload.

POST/workspaces/{workspace_id}/resources/{resource_id}/retry/
cURL
JavaScript
Python
curl -X POST "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/resources/3c9a1b77-0d24-4e8b-b0f1-7a5e9c2d4b81/retry/" \
  -H "X-API-Key: sk_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"

Delete a resource

Deletes the resource and its indexed passages. Answers already given keep their citations, but the resource stops being retrievable.

DELETE/workspaces/{workspace_id}/resources/{resource_id}/
cURL
JavaScript
Python
curl -X DELETE "https://api.daneshyar.info/api/v1/workspaces/8f14e45f-ceea-467a-9f4c-1a2b3c4d5e6f/resources/3c9a1b77-0d24-4e8b-b0f1-7a5e9c2d4b81/" \
  -H "X-API-Key: sk_9f3aC2xQ7mB1vT8sE4nK6pR0jY5wZ2hL"
Response
{
  "status": "ok",
  "data": { "message": "Resource deleted" }
}
PreviousWorkspacesNextChat

On this page

  • List resources
  • Upload a resource
  • Retrieve a resource
  • Retry a resource
  • Delete a resource

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