Sync API
The HTTP API behind the anywr command, for your own scripts and tools.
The same projects are available over a small JSON API at https://app.anywr.ai/api/v1. It is what the anywr command uses. Authenticate with a personal access token:
curl -H "Authorization: Bearer anywr_…" https://app.anywr.ai/api/v1/projects| Request | Does |
|---|---|
GET /me | The signed-in account. |
GET /projects | Your projects. |
POST /projects | Create a project with the standard pages. |
GET /projects/:slug | A project and its page list. |
GET /projects/:slug/pages/*path | One page with its content and version. |
PUT /projects/:slug/pages/*path | Write a page. Send baseVersion: 0 to create, the version you read to change. |
POST /projects/:slug/pages/*path/append | Add to the end of a page. |
DELETE /projects/:slug/pages/*path?baseVersion=N | Delete a page. |
GET /projects/:slug/export | The project as a zip. |
DELETE /projects/:slug?confirm=:slug | Delete a project. |
A write based on an old version is refused with 409 version_conflict and the current page, so you can merge and retry. The full contract, including every error code, is docs/api.md in the repository.