Skip to Content
API ReferenceNotebooks

Notebooks API

Endpoints for managing notebooks programmatically.

Endpoints Overview

MethodEndpointDescription
GET/notebooksList all notebooks
GET/notebooks/:idGet a single notebook
POST/notebooksCreate a new notebook
PATCH/notebooks/:idUpdate a notebook
DELETE/notebooks/:idDelete a notebook

List Notebooks

GET /notebooks

Returns a paginated list of all notebooks for the authenticated user.

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoItems 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/:id

Returns details for a specific notebook.

Path Parameters

ParameterTypeDescription
idstringThe 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 /notebooks

Creates a new notebook.

Request Body

FieldTypeRequiredDescription
namestringYesNotebook name
descriptionstringNoOptional 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/:id

Updates an existing notebook. Only provided fields are updated.

Request Body

FieldTypeDescription
namestringNew notebook name
descriptionstringNew description

Delete Notebook

DELETE /notebooks/:id

Deletes 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

StatusCodeDescription
400VALIDATION_ERRORInvalid request body
404NOT_FOUNDNotebook not found
403FORBIDDENNo access to this notebook

Learn More

Last updated on