AirctrlClient. Method names are the stable developer bindings verified against the public API.
For a runnable TypeScript example of every method, continue to SDK examples.
Identity availability
A human PAT may call every method on this page when RBAC permits it. A Service Account may call only:listRecords()andlistProjectRecords().getSecret(),readRecord()andgetAll().listProviders().getGateway(),listGatewayTokens(),listGatewayLogs(),getGatewayLogDetail()andlistGatewayKeyAccess().
Context and projects
Record reading and creation
Record lifecycle and sharing
Record history and audit
Providers and gateways
Gateway tokens
Gateway observability
listGatewayLogs and listUsageLogs return pagination.next_cursor. Continue by passing it as cursor with the same scope and filters. Cursor and legacy offset are mutually exclusive.
Service Account metadata
These metadata methods require a human PAT. The table above is the supported developer binding layer. The package separately exports advanced first-party primitives used by the Web app and CLI for Service Account credential lifecycle and identity rotation. Their presence does not create equivalent lifecycle commands or tools in the public CLI or MCP server; consult the installed TypeScript declarations before deliberately integrating those lower-level exports.
Groups and access material
These methods require a human PAT. Team+ enables collaboration; RBAC and PAT scope still apply. Revocation does not need a vault unlock. See effective access and pending material.
Membership, deletion and project-grant results include
changed, wrappersDeleted, projectWrappersDeleted and per-resource changes. These are server snapshots, not proof of completed client encryption. Inspect material_pending, rekey_queued and remaining sources. Reconciliation returns attemptedProjectIds; missing holder material can remain pending. Optional projectIds restrict projects, not pending direct group-record repairs in the account. Reconciliation does not grant permissions.
Exact method signatures
Optional values end with?. Input types are exported by @airctrl/sdk, so your editor can show every
field and accepted value.
For readRecord, scope accepts record sections only: fields, meta, owner, access, or full. fields decrypts and returns the complete field map; it does not select individual field names. Omit environment for General, or pass development, staging, or production to select that value. A missing value never falls back to another scope; the PAT or Service Account token must permit the selection.
Context and projects
Groups
GroupInput has required name: string and optional description: string. Keep the passphrase local; vaultPassword is the existing SDK parameter name.
Records
Providers and gateways
Service Account metadata
Input and result rules
- IDs are UUID strings. Keep account, project, record, gateway, token and credential IDs separate.
- Methods with
accountIdselect the active account. The value never grants access. - List methods return arrays or paginated objects. Empty access returns an empty result, not broader data.
getProject()andgetServiceAccount()can returnnullwhen the resource is unavailable.- Write methods that create a resource return its new identifier or resource metadata.
- Methods that return no resource resolve successfully without a value.
- Record plaintext is accepted or returned only by client-side crypto methods. Raw HTTP methods work with encrypted material.
- Provider secrets and newly created gateway tokens are one-time values. Do not log their result.
End-to-end examples
Create a project, then create an encrypted record inside it:Failure behavior
Every API failure throwsAirctrlError. Inspect its fields instead of parsing prose.
400, 403, or 404 unchanged. Retry temporary 429, 500, or 503 failures with
bounded exponential backoff. Reuse the same idempotency key only for the same intended write.
OAuth partner backend
OAuth partner methods run only in a confidential backend. Keep the client secret and every returned token in a secret manager; never send them to browser storage or logs. UsecreatePkce() for each authorization transaction. It returns a fresh 43-character verifier and
its SHA-256 base64url challenge; persist the verifier only in the short-lived server transaction.
Every OAuth App remains owned and managed by the organization that registered it.
A private App can be installed only there. A public App presents an organization selector containing
only active organizations where the approving user holds oauth-installations:connect; each resulting
installation and token remains bound to the selected customer organization. Active subscription,
trial, and payment-retry (past_due) states qualify.
The SDK flow and its protection, logs, and spend methods are otherwise identical for private and public
Apps; the installation binding enforces the organization boundary.
Use Discover the authorization server
to select Production or QA and read the current authorization, token, and revocation endpoints. Local
development values are in Environments. implements
OAuth 2.0 authorization, not OpenID Connect login: it intentionally does not issue ID Tokens or expose
a UserInfo endpoint.
protectionId. Store that ID next to the partner’s stable
external key ID. Lifecycle calls never accept the parent OAuth connection ID.
idempotency_operation_superseded. Omit otel.headers in updateProtection() to preserve current
headers; send null or {} to clear them.
Disconnecting revokes OAuth/runtime access and disables the internal Service Account. It never deletes
the project, credentials, gateways, settings, logs or audit history.
OAuthPartnerClient failures throw AirctrlOAuthError, not AirctrlError. Inspect status, error,
and optional description; do not parse the message string.
SDK helper:
createPkce()SDK types: OAuthScope, OAuthTokenSet, OAuthGatewaySettings, OAuthProtection,
OAuthGatewayPreflight, OAuthProvider, OAuthProviderModel, OAuthProviderModelCapability,
OAuthProviderModelPricing, OAuthProviderModelsDiscovery, OAuthProtectionProvisionInput,
OAuthProtectionUpdateInput, OAuthProtectionLog, OAuthProtectionLogs, and
OAuthProtectionSpendSDK method: authorizationUrl()SDK method: exchangeCode()SDK method: refresh()SDK method: revoke()SDK method: listProvisioningProviders()SDK method: discoverProvisioningProviderModels()SDK method: preflightProtection()SDK method: provisionProtection()SDK method: listProtections()SDK method: getProtection()SDK method: updateProtection()SDK method: listProtectionLogs()SDK method: getProtectionSpend()SDK method: revokeProtection()SDK method: rotateProtectionProviderKey()SDK method: rotateProtectionRuntimeToken()SDK method: reactivateProtection()