# Lydie API

- Base URL: `https://api.lydie.co/v1`
- Authentication: `Authorization: Bearer <token>`. See https://developers.lydie.co/authentication.md.
- Requests and responses are JSON. GET and DELETE take their input as query parameters; other methods take a JSON body. Path parameters are part of the input.
- IDs of documents are ULIDs. Timestamps are ISO 8601 in UTC.
- Errors: `{ "error": { "code", "message", "hint"?, "details"? } }`. See https://developers.lydie.co/errors.md.
- Version: `2026-11-12` (`Lydie-Version` header).
- OpenAPI 3.1 document: https://developers.lydie.co/openapi.json

## Resources

- [Documents](https://developers.lydie.co/api/documents.md): Pages in a workspace: a tree of documents, each with a title, typed properties (frontmatter) and a Markdown body.
- [Databases](https://developers.lydie.co/api/databases.md): A database is a document whose children are its rows. Each row is a document; its values are the row's properties.
- [Attachments](https://developers.lydie.co/api/attachments.md): Files attached to a workspace or a document, stored by their SHA-256 hash. Upload the bytes first, then record the attachment.
- [Trash](https://developers.lydie.co/api/trash.md): Deleted documents and attachments stay in the trash until they are restored or purged.
- [History](https://developers.lydie.co/api/history.md): Sessions group the changes an agent made, so they can be reviewed and undone together.
- [Workspaces](https://developers.lydie.co/api/workspaces.md): A workspace holds documents, members and teamspaces. An API token belongs to exactly one.
- [Members](https://developers.lydie.co/api/members.md): People in a workspace and their roles: owner, admin, member or guest.
- [Teamspaces](https://developers.lydie.co/api/teamspaces.md): Groups of pages with their own members. Open teamspaces are visible to every member; closed and private ones are not.
- [Invitations](https://developers.lydie.co/api/invitations.md): Email invitations to join a workspace.
- [Sharing](https://developers.lydie.co/api/sharing.md): Who can see a page: grants to people, teamspaces or the whole workspace, restricted pages, and public links.
- [Notifications](https://developers.lydie.co/api/notifications.md): Your inbox: mentions, shares and accepted invitations.
- [Publishing](https://developers.lydie.co/api/publishing.md): Publish documents to GitHub, WordPress or a webhook. A connection holds the credentials; a publication says what goes where.
- [API tokens](https://developers.lydie.co/api/api-tokens.md): Personal API tokens. These endpoints need a signed-in session: a token cannot create or list tokens.
- [Connected apps](https://developers.lydie.co/api/connected-apps.md): Apps you allowed through OAuth, such as MCP clients. Signed-in session only.
