Create Pat
PATs
Create an Organization API Key
POST
Create Pat
Requires an active organization — without one, the org lookup this performs fails and the request returns
404 rather than proceeding. The secret is generated here, hashed with Argon2id, and stored in the pats table (org-scoped by row-level security). Creates the paired Logto personal access token first, then the local pats row; if the local insert fails, the Logto token is deleted to avoid leaving an orphaned credential.
Auth
No scope is checked — any authenticated caller may mint a key for itself — but an active organization is required, since the key is created under the token’s organization.Response
200 OK — same shape as one element of the List Organization API Keys response, except:
Errors
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json