Need more detail? Connect your coding agent to the full docs.

Skip to Content
AMIRILDocs
/

Auth

The Auth routes of Amiril's HTTP API that an OAuth access token can call, with their parameters, request bodies and responses.

Who am I

GET
/api/auth/me

The signed-in user, their mapped role, and the workspace and environment this session serves. mode "open" means the deployment runs without auth. environmentReset appears once after the session was moved off an archived environment.

Any access token can call this, read-only or full.

Authorization

accessToken
headerAuthorizationBearer <JWT>

An OAuth access token from Amiril's authorization server, the kind an MCP client gets when it connects.

Response Body

Current principal

application/json
  1. response
mode*string
Value in"open""session"
user*|null
role*string
roles*array<string>
permissions*array<>
workspace*string
workspaceName?string
environment*string
environmentName*string
production*boolean
environmentReset?
Example Request
curl -X GET 'https://api.amiril.ai/api/auth/me'
Example Response200
{  "mode": "open",  "user": {    "id": "string",    "email": "string",    "firstName": "string",    "lastName": "string"  },  "role": "string",  "roles": [    "string"  ],  "permissions": [    "rules:write"  ],  "workspace": "string",  "workspaceName": "string",  "environment": "string",  "environmentName": "string",  "production": true,  "environmentReset": {    "from": "string"  }}