Skip to main content
This guide walks you through making your first policy evaluation call. You will need an API key and a tenant ID.

Prerequisites

  • A MeshQu account with at least one tenant.
  • An API key with the decisions:evaluate scope.
  • Node.js 18+ (for the SDK path) or any HTTP client (for the raw API path).

Option A: Using the TypeScript SDK

The MeshQu SDK is in early access and not yet publicly distributed. Contact contact@meshqu.com for access.

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:
The response includes 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