Skip to Content
API & CLI Access

API & CLI Access

Use tokens to automate WatchAPI from CI or your local machine.

API Tokens

  • Create tokens in Profile → API Tokens.
  • Tokens start with wai_ and can be revoked at any time.
  • Keep tokens secret; rotate if you suspect exposure.

CLI

Install the CLI globally:

npm install -g @watchapi/cli

Authenticate by exporting your token:

export WATCHAPI_TOKEN=wai_your_token_here

Common Commands

  • Sync tRPC routes:

    watchapi sync --domain https://api.example.com --prefix api/trpc
  • Sync OpenAPI definitions:

    watchapi sync --domain https://api.example.com --openapi /openapi.json
  • List endpoints:

    watchapi endpoints ls

CLI help is also available via watchapi --help.

Rate Limits

  • API calls include lightweight rate limiting tied to your plan.
  • If you hit limits, wait briefly or upgrade your plan to raise the ceiling.
Last updated on