Anywhere
Docs Sync API

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
RequestDoes
GET /meThe signed-in account.
GET /projectsYour projects.
POST /projectsCreate a project with the standard pages.
GET /projects/:slugA project and its page list.
GET /projects/:slug/pages/*pathOne page with its content and version.
PUT /projects/:slug/pages/*pathWrite a page. Send baseVersion: 0 to create, the version you read to change.
POST /projects/:slug/pages/*path/appendAdd to the end of a page.
DELETE /projects/:slug/pages/*path?baseVersion=NDelete a page.
GET /projects/:slug/exportThe project as a zip.
DELETE /projects/:slug?confirm=:slugDelete 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.