API Reference
Document
Endpoints for knowledge base documents and uploaded source files.
Related In Learn
Knowledge Base
Add documents, websites, and other content to give your AI agents context and expertise.
Document endpoints manage knowledge base documents and uploaded source files.
Endpoints
POST /studio/document/create
Create a text or website document. You can also attach it to a Pickaxe and store title, description, and documentType metadata.
- Full URL:
https://api.pickaxe.co/v1/studio/document/create
Request Fields
name(string, required): The name of the document to be created.website(string, optional): A website URL to process as a document.rawContent(string, optional): Raw content of the document to be created.pickaxeId(string, optional): Optional Pickaxe ID. If provided, the new document is attached to that Pickaxe.title(string, optional): Optional human-friendly title stored on the document.description(string, optional): Optional description stored on the document.documentType(string, optional): Optional custom document type stored on the document.
Examples
curl -X POST https://api.pickaxe.co/v1/studio/document/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "My Document",
"rawContent": "This is the raw content of the document.",
"pickaxeId": "EXAMPLEPICKAXEID",
"title": "Internal Notes",
"description": "Notes for the team",
"documentType": "notes"
}'POST /studio/document/upload
Upload a file directly as multipart/form-data, process it into a Studio document, optionally attach it to a Pickaxe, and store metadata.
- Full URL:
https://api.pickaxe.co/v1/studio/document/upload
Request Fields
file(file, required): The actual file to upload as multipart/form-data.pickaxeId(string, optional): Optional Pickaxe ID. If provided, the uploaded document is attached to that Pickaxe.title(string, optional): Optional human-friendly title stored on the document.description(string, optional): Optional description stored on the document.documentType(string, optional): Optional custom document type stored on the document.waitMediaResults(boolean, optional): For audio/video uploads, wait for transcription before returning. Set false to return immediately and let processing continue in the background. Defaults totrue.
Examples
curl -X POST https://api.pickaxe.co/v1/studio/document/upload \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-F "file=@/absolute/path/to/my-doc.pdf" \
-F "pickaxeId=EXAMPLEPICKAXEID" \
-F "title=My PDF" \
-F "description=Reference manual" \
-F "documentType=pdf"POST /studio/document/connect
Connect a document to a Pickaxe or User.
- Full URL:
https://api.pickaxe.co/v1/studio/document/connect
Request Fields
documentId(string, required): The ID of the document to connect.pickaxeId(string, optional): The ID of the Pickaxe to connect the document to.user(string, optional): The email of the user to connect the document for.
Examples
curl -X POST https://api.pickaxe.co/v1/studio/document/connect \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"documentId": "1A2B3C4D5E",
"pickaxeId": "1J23123L1D2"
}'POST /studio/document/disconnect
Detach a document from a Pickaxe or User.
- Full URL:
https://api.pickaxe.co/v1/studio/document/disconnect
Request Fields
documentId(string, required): The ID of the document to disconnect.pickaxeId(string, optional): The ID of the Pickaxe to disconnect the document from.user(string, optional): The email of the user to disconnect the document for.
Examples
curl -X POST https://api.pickaxe.co/v1/studio/document/disconnect \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"documentId": "1A2B3C4D5E",
"pickaxeId": "1J23123L1D2"
}'GET /studio/document/list
List all documents with optional pagination.
- Full URL:
https://api.pickaxe.co/v1/studio/document/list
Request Fields
skip(number, optional): The number of documents to skip for pagination. Defaults to0.take(number, optional): The number of documents to take for pagination. Defaults to10.
Examples
curl -X GET https://api.pickaxe.co/v1/studio/document/list?skip=0&take=10 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"GET /studio/document/<document_id>
Retrieve a specific document by its ID.
- Full URL:
https://api.pickaxe.co/v1/studio/document/<document_id>
Request Fields
documentId(string, required): The ID of the document to retrieve.
Examples
curl -X GET https://api.pickaxe.co/v1/studio/document/1A2B3C4D5E \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"PATCH /studio/document/<document_id>
Update document metadata such as title, description, or custom documentType.
- Full URL:
https://api.pickaxe.co/v1/studio/document/<document_id>
Request Fields
documentId(string, required): The ID of the document to update.title(string, optional): Updated title for the document.description(string, optional): Updated description for the document.documentType(string, optional): Updated custom documentType for the document.
Examples
curl -X PATCH https://api.pickaxe.co/v1/studio/document/1A2B3C4D5E \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"title": "Updated Manual",
"description": "Latest version of the onboarding manual",
"documentType": "manual"
}'DELETE /studio/document/<document_id>
Delete a specific document by its ID.
- Full URL:
https://api.pickaxe.co/v1/studio/document/<document_id>
Request Fields
documentId(string, required): The ID of the document to delete.
Examples
curl -X DELETE https://api.pickaxe.co/v1/studio/document/1A2B3C4D5E \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"