EndstateClient takes a secret key (end_sk_...) and reaches every operation
in the spec. It runs on your server only.
Resources
Every operation is grouped by resource. Each method has its own reference page with the endpoint it calls, the credential it needs, and its retry class.Waiting for work to finish
Issuance and provisioning are asynchronous. Rather than writing your own poll loop, use thewaitUntil helpers - they share one polling primitive with
exponential backoff, and they throw EndstateTerminalStateError when
something settles in a failed state instead of polling until your budget runs
out.
{ timeoutMs, intervalMs, maxIntervalMs, signal, onPoll }.
Pagination
A list call is both awaitable and iterable. Await it for one page exactly as the API returns it; iterate it for items across every page, followingnext_cursor for you.
next_cursor back
unchanged and never parse one.
Issuing a session for a browser
A secret key may verify a tap on your server and hand the resulting session token to a page. Unlike a publishable key, it may also setttl.
endstate.session(token). See
Tap sessions.
Environments
baseUrl is explicit and defaults to production. The SDK does not infer an
environment from your credential’s prefix.
Anything a method does not cover
Every operation in the spec is reachable by id, typed to the credential you constructed the client with, so a new endpoint is usable before a convenience method exists for it.OPERATIONS exports the full
table if you need to inspect it at runtime.
