Skip to main content
GET
/
api
/
documents
/
{id}
TypeScript SDK
import { Orchata } from '@orchata-ai/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>",
    "indexingType": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "metadata": "<unknown>"
  }
}

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