Skip to main content

Client

Install the SDK and create a client. The client is the entry point for every SDK call.

Authentication

Provide exactly one of apiKey, token, or getToken. Passing zero or more than one throws at construction.
Read and reviewer methods (list, get, acknowledge, decide, cancel) work with an ain_live_ API key or a workspace user token/getToken. Keys are issued with all escalation scopes (escalations:write, :read, :acknowledge, :decide, :cancel) by default; pass a narrower scopes array to POST /api-keys to restrict one. A call missing the scope returns 403.

Options

Resources

  • Escalations — create, read, and decide on escalations.
  • Webhooks — verify signed resume callbacks.
  • Errors — handle API, network, and signature failures.