Skip to main content
GET
/
documents
/
{id}
TypeScript SDK
import { Orchata } from '@orchata/sdk';

const client = new Orchata({ apiKey: 'oai_your_api_key' });

const { document } = await client.documents.get('doc_123', 'space_123');
{
  "document": {
    "id": "<string>",
    "orgId": "<string>",
    "spaceId": "<string>",
    "filename": "<string>",
    "mimeType": "<string>",
    "fileSize": "<string>",
    "storageUrl": "<string>",
    "status": "<string>",
    "errorMessage": "<string>",
    "embeddingModel": "<string>",
    "metadata": "<string>",
    "createdAt": "2023-12-25",
    "updatedAt": "2023-12-25"
  }
}

Authorizations

Oai-Api-Key
string
header
required

Path Parameters

id
string
required
Example:

"document_123"

Query Parameters

spaceId
string
required

The ID of the space containing the documents

Example:

"space_123"

Response

Successfully retrieved document

document
object
required