Choose the correct identity
A human PAT starts withsk-actrl-pat-. It can call all public operations when RBAC permits them. A Service Account token starts with sk-actrl-sa- and can call only the operations listed in Feature availability.
Send account context
Operations that work inside one account acceptx-account-id. Some create requests also carry accountId in the body. The account ID selects context; it never grants membership or permission.
Read lists in bounded pages
List operations that exposelimit and offset start at offset 0. Keep pages small enough for your process to handle.
data result means no visible resources matched. It does not mean expanded the query to another scope.
Distinguish metadata from plaintext
Record endpoints return encrypted material and safe metadata. The API never returns decrypted secret fields. Use@airctrl/sdk, the CLI or MCP on a trusted machine when you need plaintext.
ciphertext and wrapper metadata. Do not treat either as plaintext.
Use idempotency keys for writes
Create one UUID for one intended write. Reuse that key only when retrying the same body.409 and idempotency_key_reused_with_different_params.
Update only with current state
Some update operations replace their complete editable input; others patch only supplied fields. Read the operation description before sending the request.Treat destructive operations as two steps
First read the resource and display its name and ID. Execute the destructive request only after a human confirms that target.Read the error envelope
error.code for the HTTP category and error.message for the specific reason. Store requestId with diagnostics, but never store bearer tokens or plaintext fields.
Retry only temporary failures
Retry429, 500 and 503 with exponential backoff, jitter and a maximum attempt count. Do not retry 400, 403 or 404 unchanged.
One-time values
Gateway token creation returns plaintext once. Provider credential creation accepts plaintext once. Send those values only between the trusted caller and the approved custody destination.Validate before automation
Before placing a request in a job:- Run it once with a test project and least-privilege identity.
- Confirm the success envelope and expected audit event.
- Exercise one validation failure and one permission failure.
- Confirm retry behavior with a fixed idempotency key.
- Remove test resources through the documented lifecycle operation.