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, records no decision)

2. Response

result.dry_run is always true here, and appears on no recorded receipt. The result is deliberately unsigned — a preview the platform has not recorded and does not attest to. integrity_hash is reproducible, so you can recompute it, but on this endpoint nothing signs it.

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