Skip to content

Identity API

Use these endpoints to check a token before doing anything else.

Returns the token’s user, its organization with the user’s role, and the token’s name and abilities.

Terminal window
curl https://falak.example.com/api/v1/me \
-H "Authorization: Bearer $FALAK_TOKEN" -H "Accept: application/json"
200 OK
{"data": {
"user": {"id": "01k…", "name": "Ada", "email": "ada@example.com"},
"organization": {"id": "01k…", "name": "Acme", "slug": "acme", "role": "owner"},
"token": {"name": "cli", "abilities": ["*"]}
}}
Field Meaning
organization.role owner, admin, developer or viewer
token.abilities Permission names, or ["*"]

A token request returns the token’s organization only; a browser session returns every membership.

200 OK
{"data": [{"id": "01k…", "name": "Acme", "slug": "acme", "role": "owner", "current": true}]}