SoraiDocs
GuidesAPI reference

Command reference

Every sorai command, with its flags and the key permissions it needs.

Every command below takes --profile <name> to pick a saved login. Output is JSON on stdout.

General

  • sorai login: Sign in with a secret key (ssk_...) from the API keys page of your Sorai console.
  • sorai logout: Forget the saved key on this machine.
  • sorai auth status: Show the signed-in key: its name, prefix, scopes and stores, the default store, and whether it came from the saved login or SORAI_API_KEY.
  • sorai whoami: Show the key's name, scopes and stores, and the API it acts on.
  • sorai guide: Print a Markdown guide to every command and flag, for AI agents.
  • sorai version: Print the version of sorai.

stores

  • sorai stores list: List the stores this key's organization runs, with each store's id, slug, name, currency and status.
  • sorai stores get: Get one store's settings: theme, notifications, enabled payment methods and tracking pixels.

products

prices

media

courses

bundles

orders

  • sorai orders list: List a store's orders, newest first, with the total for paging.
  • sorai orders get: Get one order, with the buyer, attribution and payment detail.

checkout

pages

  • sorai pages list: List a store's pages with their slug, kind and publish state.
  • sorai pages get: Get one page: its slug, kind, SEO metadata and header and footer setting.
  • sorai pages update: Change a page's slug, kind, SEO metadata or header and footer setting.
  • sorai pages create: Create a page as an unpublished draft with no content yet.

analytics

  • sorai analytics overview: Revenue by currency, orders, visitors, and the view, checkout and purchase funnel for a date range.

On this page