Overview
API endpoint for retrieving a specific document or list of documents from a persona. This endpoint allows you to access any document by name or pulling a series of documents using the query parameters for response size.
Authorization
Must be set to application/json
Query Parameters
Your desired number of documents to be returned.
Body
The hyphenated text below the AI’s name when clicked into a Persona.
"DomainName": "product-demo-jebzrhw"
Document name to retrieve a specific document. Leave blank if you want to retrieve mulitple documents."Text": "Python Reflection"
Example Request
Array of conversation messages, including both user messages and AI responses
{
"Text": "Python Reflection",
"DomainName": "product-demo-jebzrhw"
}
Example Response
[
{
"id": "66c6706fe6fffd040957a7a3",
"title": "Python Reflection",
"text": "**Title: Reflecting on Python: My Journey Through a Language Revolution** When I first encountered Python, it was like meeting an old friend who instantly felt familiar and welcoming. I remember divin",
"type": "Document",
"timestamp": "2025-03-17T17:24:44.874+00:00"
}
]
Example cURL
curl --location 'https://api.personal.ai/v1/document?size=5' \
--header 'x-api-key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
"Text": "Python Reflection",
"DomainName": "product-demo-jebzrhw"
}''
Error Codes
| Code | Description |
|---|
| 403 | Forbidden - Check that API key is invalid |