chore: improved docs for document/by-id endpoint, added a couple of warnings based on mintlify questions (#550)

Co-authored-by: Naman Bansal <namanbansal@Namans-Macbook-Air.local>
This commit is contained in:
Naman 2025-11-11 10:58:57 +05:30 • committed by GitHub
parent ea9bf13d31
commit e704c23b94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 0 deletions

View file

@ -154,6 +154,8 @@ curl -X GET "https://api.supermemory.ai/v3/documents/doc_abc123" \
}
```
For more comprehensive information on the get documents by ID endpoint, refer to the [API reference.](/api-reference/manage-documents/get-document)
## Status Values
| Status | Description | Typical Duration |

View file

@ -285,6 +285,48 @@ Companies like Composio [Rube.app](https://rube.app) use memories search for let
The `/v4/search` endpoint searches through and returns memories.
## Direct Document Retrieval
If you don't need semantic search and just want to retrieve a specific document you've uploaded by its ID, use the GET document endpoint:
`GET /v3/documents/{id}`
This is useful when:
- You know the exact document ID
- You want to retrieve the full document content and metadata
- You need to check processing status or document details
<CodeGroup>
```typescript TypeScript
// Get a specific document by ID
const document = await client.memories.get("doc_abc123");
console.log(document.content); // Full document content
console.log(document.status); // Processing status
console.log(document.metadata); // Document metadata
console.log(document.summary); // AI-generated summary
```
```python Python
# Get a specific document by ID
document = client.memories.get("doc_abc123")
print(document.content) # Full document content
print(document.status) # Processing status
```
```bash cURL
curl -X GET "https://api.supermemory.ai/v3/documents/{YOUR-DOCUMENT-ID}" \
-H "Authorization: Bearer $SUPERMEMORY_API_KEY"
```
</CodeGroup>
<Note>
This endpoint returns the complete document with all fields including content, metadata, containerTags, summary, and processing status. For more details, see the [API reference](/api-reference/manage-documents/get-document).
</Note>
## Search Flow Architecture
### Document Search (`/v3/search`) Flow

View file

@ -151,6 +151,12 @@ curl -X POST "https://api.supermemory.ai/v3/documents" \
The `customId` enables idempotency across all endpoints. The `memoryId` doesn't support idempotency, only the `customId` does.
</Note>
<Warning>
The `customId` can have a maximum length of 100 characters.
</Warning>
## Single Delete
Delete individual memories by their ID. This is a permanent hard delete with no recovery mechanism.