Zekra Admin API
The Admin API from Zekra, for admin.
The Admin API from Zekra, for admin.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/zekra-dev:zekra-dev-admin-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Zekra Admin API
version: 0.1.0
tags:
- name: Admin
paths:
/api/admin/stats:
get:
description: 'Keys: users, admins, verified, unverified, disabled, signups7d, active24h, twoFactor, plus pendingDeletion, active7d, brains, memories, brainTokens, brainTokensAdmin, personalAccessTokens, recalls24h, retains24h, and last-activity times as Unix seconds (lastSignInAt, lastMemoryEventAt, lastMemoryWriteAt; 0 = never).'
operationId: admin-stats
responses:
'200':
content:
application/json:
schema:
additionalProperties:
format: int64
type: integer
type: object
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: 'Zekra-wide overview as a flat {metric: number} object'
tags:
- Admin
/api/admin/users:
get:
operationId: admin-users
parameters:
- description: Matches email or name (case-insensitive).
explode: false
in: query
name: q
schema:
description: Matches email or name (case-insensitive).
maxLength: 254
type: string
- explode: false
in: query
name: page
schema:
default: 1
format: int64
minimum: 1
type: integer
- explode: false
in: query
name: per_page
schema:
default: 25
format: int64
maximum: 100
minimum: 1
type: integer
- description: 'Optional: admin | owner | member | none (no admin/owner).'
explode: false
in: query
name: role
schema:
description: 'Optional: admin | owner | member | none (no admin/owner).'
type: string
- description: Optional state filter.
explode: false
in: query
name: status
schema:
description: Optional state filter.
enum:
- active
- disabled
- unverified
- two_factor
- deleting
- ''
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ListOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: List users (search + paging), newest first
tags:
- Admin
/api/admin/users/{id}:
delete:
operationId: admin-user-delete
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
responses:
'204':
description: No Content
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Delete a user now (account, profile, linked accounts, tokens, 2FA)
tags:
- Admin
get:
operationId: admin-user
parameters:
- in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DetailOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: One user, with security details
tags:
- Admin
/api/admin/users/{id}/2fa-reset:
post:
operationId: admin-user-2fa-reset
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Turn off a user's two-factor sign-in
tags:
- Admin
/api/admin/users/{id}/disable:
post:
operationId: admin-user-disable
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Admin-user-disableRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Disable a user (and sign them out everywhere)
tags:
- Admin
/api/admin/users/{id}/enable:
post:
operationId: admin-user-enable
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Re-enable a disabled user
tags:
- Admin
/api/admin/users/{id}/resend-verification:
post:
operationId: admin-user-resend-verification
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
'502':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Bad Gateway
summary: Email the user a fresh verification code
tags:
- Admin
/api/admin/users/{id}/roles:
put:
description: Replaces the roles. Takes effect on the user's next request (roles are read from the users table, not the token).
operationId: admin-user-roles
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Admin-user-rolesRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UserOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'409':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Conflict
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Set a user's roles (admin | owner | member)
tags:
- Admin
/api/admin/users/{id}/sessions:
get:
operationId: admin-user-sessions
parameters:
- in: path
name: id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SessionsOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: A user's server-side sessions
tags:
- Admin
/api/admin/users/{id}/sessions/revoke:
post:
description: 'Without an id: every token issued until now is refused (works for stateless cookie sessions too) and server-side sessions are deleted.'
operationId: admin-user-sessions-revoke
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Admin-user-sessions-revokeRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Sign a user out (one session, or everywhere)
tags:
- Admin
/api/admin/users/{id}/verify:
post:
operationId: admin-user-verify
parameters:
- in: path
name: id
required: true
schema:
type: string
- in: header
name: Authorization
schema:
type: string
- in: header
name: X-CSRF-Token
schema:
type: string
- in: cookie
name: togo_csrf
schema:
type: string
- in: header
name: X-Forwarded-For
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusOutBody'
description: OK
'401':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unauthorized
'403':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Forbidden
'404':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Not Found
'422':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Unprocessable Entity
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorModel'
description: Internal Server Error
summary: Mark a user's email as verified
tags:
- Admin
components:
schemas:
RevokeOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/RevokeOutBody.json
format: uri
readOnly: true
type: string
revoked:
format: int64
type: integer
status:
type: string
required:
- status
- revoked
type: object
UserOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/UserOutBody.json
format: uri
readOnly: true
type: string
user:
$ref: '#/components/schemas/AdminUser'
required:
- user
type: object
ListOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/ListOutBody.json
format: uri
readOnly: true
type: string
page:
format: int64
type: integer
per_page:
format: int64
type: integer
total:
format: int64
type: integer
users:
items:
$ref: '#/components/schemas/AdminUser'
type:
- array
- 'null'
required:
- users
- total
- page
- per_page
type: object
DetailOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/DetailOutBody.json
format: uri
readOnly: true
type: string
details:
$ref: '#/components/schemas/AdminUserDetails'
user:
$ref: '#/components/schemas/AdminUser'
required:
- user
- details
type: object
Admin-user-sessions-revokeRequest:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/Admin-user-sessions-revokeRequest.json
format: uri
readOnly: true
type: string
id:
description: A session id from the sessions list; empty = all sessions
type: string
type: object
Admin-user-rolesRequest:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/Admin-user-rolesRequest.json
format: uri
readOnly: true
type: string
roles:
items:
type: string
maxItems: 8
type:
- array
- 'null'
required:
- roles
type: object
ErrorDetail:
additionalProperties: false
properties:
location:
description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
type: string
message:
description: Error message text
type: string
value:
description: The value at the given location
type: object
AdminUser:
additionalProperties: false
properties:
created_at:
type: string
disabled:
type: boolean
email:
type: string
email_verified:
type: boolean
id:
type: string
last_login_at:
type:
- string
- 'null'
name:
type: string
roles:
items:
type: string
type:
- array
- 'null'
two_factor:
type: boolean
required:
- id
- email
- name
- roles
- email_verified
- disabled
- two_factor
- created_at
- last_login_at
type: object
ErrorModel:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/ErrorModel.json
format: uri
readOnly: true
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
examples:
- Property foo is required but is missing.
type: string
errors:
description: Optional list of individual error details
items:
$ref: '#/components/schemas/ErrorDetail'
type:
- array
- 'null'
instance:
description: A URI reference that identifies the specific occurrence of the problem.
examples:
- https://example.com/error-log/abc123
format: uri
type: string
status:
description: HTTP status code
examples:
- 400
format: int64
type: integer
title:
description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
examples:
- Bad Request
type: string
type:
default: about:blank
description: A URI reference to human-readable documentation for the error.
examples:
- https://example.com/errors/example
format: uri
type: string
type: object
SessionInfo:
additionalProperties: false
properties:
expires_at:
type: string
id:
type: string
issued_at:
format: date-time
type: string
required:
- id
- issued_at
- expires_at
type: object
AdminUserDetails:
additionalProperties: false
properties:
avatar:
type: string
deletion:
description: none | scheduled | cancelled | purged
type: string
deletion_scheduled_for:
type: string
disabled_at:
type: string
disabled_reason:
type: string
has_password:
type: boolean
identities:
items:
$ref: '#/components/schemas/IdentityView'
type:
- array
- 'null'
login_count:
format: int64
type: integer
recovery_codes_left:
format: int64
type: integer
sessions_revoked_at:
type:
- string
- 'null'
timezone:
type: string
required:
- has_password
- login_count
- recovery_codes_left
- identities
- sessions_revoked_at
- deletion
- avatar
- timezone
type: object
IdentityView:
additionalProperties: false
properties:
can_unlink:
type: boolean
created_at:
type: string
email:
type: string
last_used_at:
type:
- string
- 'null'
provider:
type: string
required:
- provider
- email
- created_at
- last_used_at
- can_unlink
type: object
Admin-user-disableRequest:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/Admin-user-disableRequest.json
format: uri
readOnly: true
type: string
reason:
maxLength: 500
type: string
type: object
StatusOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/StatusOutBody.json
format: uri
readOnly: true
type: string
status:
type: string
required:
- status
type: object
SessionsOutBody:
additionalProperties: false
properties:
$schema:
description: A URL to the JSON Schema for this object.
examples:
- https://example.com/schemas/SessionsOutBody.json
format: uri
readOnly: true
type: string
driver:
description: 'SESSION_DRIVER: cookie (stateless) | database | file | redis'
type: string
listable:
description: true only for SESSION_DRIVER=database; stateless sessions cannot be listed
type: boolean
revoked_at:
description: Every session issued before this is refused
type:
- string
- 'null'
sessions:
items:
$ref: '#/components/schemas/SessionInfo'
type:
- array
- 'null'
required:
- driver
- listable
- sessions
- revoked_at
type: object