API reference · v1
Exchange the authorisation code
A native client exchanges a single-use, five-minute code bound to its PKCE challenge, callback URI, owner and workspace. Store the credential securely and send it as Authorization: Bearer <token> on API requests.
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/auth/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'grant_type=authorization_code&code=%3Cauthorisation-code%3E&redirect_uri=http%3A%2F%2Fexample.com&code_verifier=%3CPKCE-verifier%3E'{ "access_token": "<store-in-keychain>", "token_type": "Bearer", "expires_in": 604800, "workspace_id": "befd47ea-81e8-4413-9684-54493256f63c"}Authorise an API session GET
Open this URL in the system browser. The owner signs in through GitHub and grants access to configure one workspace and read or request assessments. The client verifies the returned state. Only registered loopback callback shapes are accepted. Browser consent uses the existing session and CSRF protections.
Show the current API session GET
Returns session identity, workspace and expiry without querying GitHub. Repository operations verify live authority separately.