Issue an agent licence
Creates an agent licence record binding an API key to a policy version, a scope and a validity window. Requires a verified human principal; an API key receives 403 HUMAN_PRINCIPAL_REQUIRED. 409 AGENT_LICENCE_POLICY_VERSION_NOT_IN_FORCE when the named version exists, matches policy_id and policy_version_number, and is not ratified and in force, or its policy is archived; a version id that does not exist or does not match still answers 500. 409 AGENT_LICENCE_FUTURE_START_WHILE_LIVE when valid_from is after now and the key holds a licence in force now (details.live_licence_id names it); the new licence would govern at once and leave the key unlicensed until it starts. Neither writes anything. 500 AGENT_LICENCE_READBACK_FAILED means the licence WAS committed and only the read of it afterwards came back empty or failed (details.committed is true); read it back rather than issuing again, since a second licence would govern in place of the first.
Authorizations
MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).
Tenant UUID for multi-tenant isolation. Required on all authenticated routes — validated before authentication (middleware/tenant.ts), so a missing or non-UUID header returns 400 (MISSING_TENANT_ID / INVALID_TENANT_ID) before the API key is checked.
Body
The API key this record refers to (meshqu.api_keys.id).
A policy version id belonging to policy_id in this tenant.
The version number of policy_version_id.
x >= 11 - 512decision_type values, matched byte-exactly and case-sensitively.
1 - 100 elements1 - 256Response
An agent licence record: a grant, or the revocation that supersedes one.
An agent licence record: a grant, or the revocation that supersedes one.
grant ^[0-9a-f]{64}$