Prerequisites
- A MeshQu account with at least one tenant.
- An API key with the
decisions:evaluatescope. - Node.js 18+ (for the SDK path) or any HTTP client (for the raw API path).
Option A: Using the TypeScript SDK
1. Initialise the client
2. Evaluate a decision
The SDK returns the full evaluate envelope, so the verdict lives at
result.result.decision. When you call the REST API directly (Option B), the same envelope is the JSON body itself, so the verdict is at result.decision. Both are correct — the extra result. in the SDK path is just the response object wrapping the envelope.3. Act on the decision
Option B: Using the REST API directly
1. Evaluate (dry-run, not persisted)
2. Response
3. Record a decision (persisted for audit)
If you want the decision stored, use/v1/decisions/record with an idempotency key:
decision.id for the persisted decision and is_new: true on first submission (or is_new: false if the idempotency key was already used).
Next steps
- Authentication — understand API key scopes.
- API Reference — explore all endpoints.
- Integration Patterns — common architectures.