Raccha AI Auth API
Passwordless (magic-link) authentication and session bootstrap.
Passwordless (magic-link) authentication and session bootstrap.
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/raccha-ai:raccha-ai-auth-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: raccha.ai Auth API
description: 'HTTP API for raccha.ai: passwordless auth, a per-account key/value store, FIFO queues, scoped access keys, Telegram pairing, stateless utility tools, and account stats.
GENERATED — this file is produced by `cargo run --bin generate-openapi` (bundle-23) directly from the axum route/handler definitions in service/src/{auth,kv,queue,access,telegram,http_tools,stats}.rs via lib.rs''s build_app(). Do not hand-edit it; edit the routes/handlers and regenerate. See sdk/generate.sh, cli/''s generator, and this bundle''s report in .docs/backlog.yaml for the rest of the codegen pipeline this feeds.
### Authentication
Every route except `/auth/request-link` and `/auth/verify` requires a credential, supplied either as `Authorization: Bearer ` or an `owner_key` cookie (set by `/auth/verify`). A request with neither returns 401 `"missing credential"`. A request with a credential that is malformed, unknown, or revoked returns 401 `"invalid credential"` — deliberately indistinguishable, same as a KV slug that exists but belongs to a different account returning the same 404 as a slug that does not exist at all.'
contact:
url: https://raccha.ai/legal.html
version: '1.0'
servers:
- url: https://raccha.ai
description: Production
- url: /
description: Same origin as this docs page
tags:
- name: Auth
description: Passwordless (magic-link) authentication and session bootstrap.
paths:
/auth/request-link:
post:
tags:
- Auth
operationId: postAuthRequestlink
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RequestLinkBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/RequestLinkResp'
summary: Post auth requestlink
x-summary-source: derived
/auth/verify:
post:
tags:
- Auth
operationId: postAuthVerify
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyResp'
summary: Post auth verify
x-summary-source: derived
/auth/invite:
post:
tags:
- Auth
operationId: postAuthInvite
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InviteBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/InviteResp'
summary: Post auth invite
x-summary-source: derived
/auth/org:
post:
tags:
- Auth
operationId: postAuthOrg
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrgBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/AccountProfile'
summary: Post auth org
x-summary-source: derived
/auth/whoami:
get:
tags:
- Auth
operationId: getAuthWhoami
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/WhoamiResp'
summary: Get auth whoami
x-summary-source: derived
/auth/profiles:
get:
tags:
- Auth
operationId: getAuthProfiles
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ProfilesResp'
summary: Get auth profiles
x-summary-source: derived
/auth/logout:
get:
tags:
- Auth
operationId: getAuthLogout
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
summary: Get auth logout
x-summary-source: derived
/auth/device/code:
post:
tags:
- Auth
operationId: postAuthDeviceCode
parameters:
- in: query
name: client_id
schema:
default: null
type:
- string
- 'null'
style: form
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceCodeResp'
summary: Post auth device code
x-summary-source: derived
/auth/device/approve:
post:
tags:
- Auth
operationId: postAuthDeviceApprove
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceApproveBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema: {}
summary: Post auth device approve
x-summary-source: derived
/auth/device/token:
post:
tags:
- Auth
operationId: postAuthDeviceToken
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceTokenBody'
required: true
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceTokenResp'
summary: Post auth device token
x-summary-source: derived
/auth/device/pending:
get:
tags:
- Auth
operationId: getAuthDevicePending
parameters:
- in: query
name: user_code
required: true
schema:
type: string
style: form
responses:
default:
description: An error occurred. `error.code` and `error.message` identify the specific failure (e.g. "not found", "db", "role not found", "kv rate limited"); `error.details` is present only for a subset of validation failures. The HTTP status itself follows normal REST conventions (400 malformed/invalid input, 401 missing/invalid credential, 402 quota/plan limit, 404 not found, 409 conflict, 429 rate limited, 500 internal/db failure).
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorBody'
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PendingResp'
summary: Get auth device pending
x-summary-source: derived
components:
schemas:
CreateOrgBody:
type: object
required:
- name
properties:
name:
description: Human-readable name for the new org, e.g. "c-engineering". Creates a new org (account) under the same email as the caller, not a fresh signup. `name` is slugified into the namespace's slug (lowercase, dash-separated); if the resulting slug is already taken, a short random suffix is appended rather than the request failing, and the actual slug used is returned in the response. Subject to the same per-email account-creation quota signup enforces, evaluated against the caller's actual current subscription tier, not a fixed default. Once that quota is reached the request is rejected with 402 Payment Required until the caller upgrades.
type: string
InviteBody:
type: object
required:
- email
properties:
email:
type: string
WhoamiResp:
type: object
required:
- account_id
- role
properties:
account_id:
type: string
role:
type: string
DeviceTokenResp:
type: object
required:
- account_id
- credential
- credential_type
- label
- slug
properties:
account_id:
type: string
credential:
type: string
credential_type:
type: string
label:
type: string
slug:
type: string
DeviceCodeResp:
type: object
required:
- device_code
- expires_in
- interval
- user_code
- verification_uri
- verification_uri_complete
properties:
device_code:
type: string
expires_in:
type: integer
format: int64
interval:
type: integer
format: int64
user_code:
type: string
verification_uri:
type: string
verification_uri_complete:
type: string
RequestLinkBody:
type: object
required:
- email
properties:
email:
type: string
DeviceTokenBody:
type: object
required:
- device_code
properties:
device_code:
type: string
PendingResp:
type: object
required:
- expires_at
- status
- user_code
properties:
client_name:
description: 'bundle-32: set when the device that requested this code passed a client_id from a prior POST /register — lets device.html show "<client_name> wants access" instead of a bare code. None for requests that didn''t register a client (still fully supported).'
type:
- string
- 'null'
expires_at:
type: string
status:
type: string
user_code:
type: string
AccountProfile:
type: object
required:
- account_id
- effective_limits
- is_super_admin
- owner_key
- slug
properties:
account_id:
type: string
effective_limits:
type: object
additionalProperties: true
is_super_admin:
type: boolean
license_profile_id:
type:
- string
- 'null'
owner_key:
type: string
slug:
type: string
ErrorBody:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/ErrorDetail'
VerifyResp:
type: object
required:
- profiles
properties:
profiles:
type: array
items:
$ref: '#/components/schemas/AccountProfile'
ProfilesResp:
type: object
required:
- profiles
properties:
profiles:
type: array
items:
$ref: '#/components/schemas/AccountProfile'
DeviceApproveBody:
type: object
required:
- decision
- user_code
properties:
credential_type:
description: 'Required when decision == "approve": "owner_key" or "access_key".'
default: null
type:
- string
- 'null'
decision:
description: '"approve" or "deny".'
type: string
device_name:
description: Becomes the minted credential's `label` — identifies and lets the human revoke this device later via the existing revoke path.
default: ''
type: string
role_ids:
description: Required (non-empty) when credential_type == "access_key".
default: []
type: array
items:
type: string
user_code:
type: string
VerifyBody:
type: object
required:
- token
properties:
token:
type: string
ErrorDetail:
type: object
required:
- code
- message
properties:
code:
description: Stable, machine-readable error identifier -- currently the same lowercase phrase every handler already used for its plaintext body (e.g. "not found", "db", "role not found"), so existing callers that pattern-matched on the old plaintext keep working unchanged.
type: string
details: true
message:
description: Human-readable description of the failure. Identical to `code` today (the codebase never had a separate human-readable string) -- kept as its own field so a handler can later add a distinct message without a breaking envelope-shape change.
type: string
InviteResp:
type: object
required:
- ok
properties:
ok:
type: boolean
RequestLinkResp:
type: object
required:
- ok
- usage_agreement
properties:
ok:
type: boolean
usage_agreement:
type: string