Notebooks API
Endpoints for managing notebooks programmatically.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /notebooks | List all notebooks |
| GET | /notebooks/:id | Get a single notebook |
| POST | /notebooks | Create a new notebook |
| PATCH | /notebooks/:id | Update a notebook |
| DELETE | /notebooks/:id | Delete a notebook |
List Notebooks
GET /notebooksReturns a paginated list of all notebooks for the authenticated user.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
limit | integer | No | Items per page (default: 20, max: 100) |
Response
{
"data": [
{
"id": "nb_123",
"name": "My Research",
"description": "Research project notes",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z",
"sourceCount": 5
}
],
"meta": {
"total": 1,
"page": 1,
"perPage": 20
}
}Example
curl -X GET "https://api.onsomble.ai/api/notebooks?limit=10" \
-H "Authorization: Bearer YOUR_TOKEN"Get Notebook
GET /notebooks/:idReturns details for a specific notebook.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The notebook ID |
Response
{
"data": {
"id": "nb_123",
"name": "My Research",
"description": "Research project notes",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z",
"sourceCount": 5,
"conversationCount": 3
}
}Create Notebook
POST /notebooksCreates a new notebook.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Notebook name |
description | string | No | Optional description |
{
"name": "My Notebook",
"description": "Optional description"
}Response
Returns the created notebook with status 201 Created.
{
"data": {
"id": "nb_456",
"name": "My Notebook",
"description": "Optional description",
"createdAt": "2024-01-21T09:00:00Z"
}
}Update Notebook
PATCH /notebooks/:idUpdates an existing notebook. Only provided fields are updated.
Request Body
| Field | Type | Description |
|---|---|---|
name | string | New notebook name |
description | string | New description |
Delete Notebook
DELETE /notebooks/:idDeletes a notebook and all its contents.
Warning
Deleting a notebook also deletes all associated sources and conversations. This action cannot be undone.
Response
Returns 204 No Content on success.
Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body |
| 404 | NOT_FOUND | Notebook not found |
| 403 | FORBIDDEN | No access to this notebook |
Learn More
Last updated on