Hatchmate Core API

Permission grants.


List grants (E18)

GET
https://api.hatchmate.nz
/v1/grants
Bearer (JWT)

Live grants of the acting customer, optionally filtered by team_id. A team_id from another customer is 404, not an empty page (API-66).

List grants (E18) › query Parameters

cursor
​string

Opaque base64url keyset cursor over (created_at, id) descending. A cursor that does not decode is 422 (API-39, API-40).

limit
​integer · min: 1 · max: 200

Page size. A value above the maximum is 422, never a silent clamp (API-38).

Default: 50
team_id
​string · uuid

Filter to grants held by one team of the acting customer.

List grants (E18) › Responses

A page of live grants.

​Grant[] · required
next_cursor
​string | null · required

Create a grant (E19)

POST
https://api.hatchmate.nz
/v1/grants
Bearer (JWT)

Subject to the no-escalation rule: 403 escalation-rejected when the actor does not already hold the permission being granted (PR-16, API-64, API-65).

Create a grant (E19) › Headers

Idempotency-Key
​string · uuid

Client-generated UUIDv4. Optional in M0 (API-44). A repeat with the same key and body returns the stored response; a repeat with a different body is 409 idempotency-conflict (API-42).

Create a grant (E19) › Request Body

permission
​string · minLength: 1 · maxLength: 512 · required

Six colon-separated positions (PG-).

team_id
​string · uuid · required

Create a grant (E19) › Responses

The grant was created.

created_at
​string · date-time · required
created_by_user_id
​string · uuid · required
id
​string · uuid · required
permission
​string · minLength: 1 · maxLength: 512 · required
registered_sets_version
​integer | null · required

The noun-registry version captured at creation (TM-47).

team_id
​string · uuid · required

Revoke a grant (E20)

DELETE
https://api.hatchmate.nz
/v1/grants/{grant_id}
Bearer (JWT)

Soft-deletes and bumps the epoch before returning. Grants are never updated in place (TM-34, API-67).

Revoke a grant (E20) › path Parameters

grant_id
​string · uuid · required

Revoke a grant (E20) › Headers

Idempotency-Key
​string · uuid

Client-generated UUIDv4. Optional in M0 (API-44). A repeat with the same key and body returns the stored response; a repeat with a different body is 409 idempotency-conflict (API-42).

Revoke a grant (E20) › Responses

The grant was revoked. No body.

No data returned