Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.0.3",
"info": {
"title": "Cyphrex API",
"version": "1.0.0",
"description": "Public integration surface: POST /v1/check and the MCP agent routes (API key), and verification routes (no auth). Dashboard JWT routes are not in this document. Official SDK package name is cyphrex on npm and PyPI. There is no public SDK repository."
},
"servers": [
{
"url": "https://cyphrexapi-production.up.railway.app",
"description": "Production API"
},
{
"url": "https://cyphrex.io/api",
"description": "Site proxy (paths still begin with /v1)"
}
],
"tags": [
{
"name": "check",
"description": "Runtime enforcement"
},
{
"name": "mcp",
"description": "API key routes used by the Cyphrex MCP server."
},
{
"name": "verify",
"description": "Public verification. No authentication."
}
],
"security": [],
"paths": {
"/v1/check": {
"post": {
"tags": [
"check"
],
"operationId": "checkAction",
"summary": "Check whether an agent action is allowed",
"description": "Call before executing the action. Required body fields are agentId and nested action.type. A top-level actionType is rejected. Send x-cyphrex-key (primary) or Authorization: Bearer <api_key>. Official SDKs send both. This is not a dashboard session JWT.",
"security": [
{
"ApiKeyHeader": []
},
{
"ApiKeyBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "Agent UUID",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
},
"action": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Action type, e.g. http_call, llm_response, data_access, tool_use",
"minLength": 1
},
"url": {
"type": "string"
},
"payload": {},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"dataScope": {
"type": "string"
},
"estimatedCost": {
"type": "number"
},
"tool_name": {
"type": "string"
},
"toolName": {
"type": "string"
}
},
"additionalProperties": true,
"description": "Nested action. Do not send a top-level actionType field.",
"required": [
"type"
]
}
},
"additionalProperties": false,
"required": [
"agentId",
"action"
]
}
}
}
},
"responses": {
"200": {
"description": "Policy decision. An in-policy success is exactly {\"allowed\":true}. A policy deny is still HTTP 200 with allowed false, reason, and severity. An expired free trial is HTTP 200 with allowed true, enforcement \"off\", and reason \"trial_expired\": the action is recorded and nothing is blocked. Past the 100,000 recorded-action cap the event is still stored. A trial account is shown a count frozen at that cap until the account is paid.",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean",
"enum": [
true
]
}
},
"additionalProperties": false,
"required": [
"allowed"
]
},
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean",
"enum": [
false
]
},
"reason": {
"type": "string"
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
}
},
"additionalProperties": true,
"required": [
"allowed",
"reason",
"severity"
]
},
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
},
"message": {
"type": "string"
},
"upgrade_url": {
"type": "string"
},
"rule": {
"type": "string"
},
"category": {
"type": "string"
},
"pii_kind": {
"type": "string"
},
"matched_topic": {
"type": "string"
},
"length": {
"type": "number"
}
},
"additionalProperties": false
}
]
},
"examples": {
"allowed": {
"value": {
"allowed": true
}
},
"trialExpired": {
"value": {
"allowed": true,
"enforcement": "off",
"reason": "trial_expired",
"code": "trial_expired"
}
},
"denied": {
"value": {
"allowed": false,
"reason": "URL not in allowed list",
"severity": "P2"
}
}
}
}
}
},
"400": {
"description": "Missing agentId or action.type, or agentId is not a UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"401": {
"description": "Invalid or missing API key",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"402": {
"description": "While the free trial is active, the enforced-action cap is 25,000. The 100,000 recorded-action cap does not stop storage and is not a 402. After the trial expires, checks stay HTTP 200 and events are still stored. The count shown to a trial account freezes at 100,000 recorded actions until the account is paid.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
},
"message": {
"type": "string"
},
"upgrade_url": {
"type": "string"
},
"rule": {
"type": "string"
},
"category": {
"type": "string"
},
"pii_kind": {
"type": "string"
},
"matched_topic": {
"type": "string"
},
"length": {
"type": "number"
}
},
"additionalProperties": false
}
}
}
},
"403": {
"description": "Agent frozen",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
},
"message": {
"type": "string"
},
"upgrade_url": {
"type": "string"
},
"rule": {
"type": "string"
},
"category": {
"type": "string"
},
"pii_kind": {
"type": "string"
},
"matched_topic": {
"type": "string"
},
"length": {
"type": "number"
}
},
"additionalProperties": false
}
}
}
},
"404": {
"description": "Agent not found or inactive",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"429": {
"description": "Request rate limit. Paid usage is not blocked for volume.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
},
"message": {
"type": "string"
},
"upgrade_url": {
"type": "string"
},
"rule": {
"type": "string"
},
"category": {
"type": "string"
},
"pii_kind": {
"type": "string"
},
"matched_topic": {
"type": "string"
},
"length": {
"type": "number"
}
},
"additionalProperties": false
}
}
}
},
"503": {
"description": "Auth lookup, event write, or deadline failure (fail-closed)",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
},
"message": {
"type": "string"
},
"upgrade_url": {
"type": "string"
},
"rule": {
"type": "string"
},
"category": {
"type": "string"
},
"pii_kind": {
"type": "string"
},
"matched_topic": {
"type": "string"
},
"length": {
"type": "number"
}
},
"additionalProperties": false
}
}
}
}
}
}
},
"/v1/mcp/agents": {
"post": {
"tags": [
"mcp"
],
"operationId": "registerMcpAgent",
"summary": "Register an agent",
"description": "API key auth, same as POST /v1/check: x-cyphrex-key or Authorization: Bearer. Creates an active agent and an empty behavior profile. description is stored as purpose. Returns 402 when the account is already at its active-agent limit.",
"security": [
{
"ApiKeyHeader": []
},
{
"ApiKeyBearer": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Agent name",
"minLength": 1
},
"type": {
"type": "string",
"description": "Stored as agents.type"
},
"description": {
"type": "string",
"description": "Stored as agents.purpose"
}
},
"additionalProperties": true,
"required": [
"name"
]
}
}
}
},
"responses": {
"201": {
"description": "Created agent row",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"agent": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"account_id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"nullable": true
},
"purpose": {
"type": "string",
"nullable": true
},
"version": {
"type": "string"
},
"status": {
"type": "string"
},
"created_at": {
"type": "string",
"nullable": true
},
"updated_at": {
"type": "string",
"nullable": true
},
"trust_score": {
"type": "number"
},
"trust_tier": {
"type": "number"
},
"trust_score_updated_at": {
"type": "string",
"nullable": true
},
"store_payloads": {
"type": "boolean"
},
"enforcement_mode": {
"type": "string"
},
"anchor_lease_until": {
"type": "string",
"nullable": true
},
"last_anchored_at": {
"type": "string",
"nullable": true
},
"last_anchor_id": {
"type": "string",
"nullable": true
}
},
"additionalProperties": true,
"required": [
"id",
"account_id",
"name"
]
}
},
"additionalProperties": false,
"required": [
"agent"
]
}
}
}
},
"400": {
"description": "name is required",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"401": {
"description": "Invalid or missing API key",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"402": {
"description": "Active agent count is at the plan limit. error is the paid-plan message and code is paid_plan_required.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error",
"code"
]
}
}
}
},
"500": {
"description": "Could not count agents, insert the agent, or create the behavior profile",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error"
]
}
}
}
},
"503": {
"description": "API key lookup failed",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"error",
"code"
]
}
}
}
}
}
}
},
"/v1/mcp/agents/{id}/check": {
"post": {
"tags": [
"mcp"
],
"operationId": "checkMcpAgentAction",
"summary": "Check whether an agent action is allowed",
"description": "Same policy handler as POST /v1/check. The agent id is the path parameter, not a body field. A string action is normalized to type tool_use with that string as payload before the check. An object action must include type. Send x-cyphrex-key or Authorization: Bearer. This is not a dashboard session JWT.",
"security": [
{
"ApiKeyHeader": []
},
{
"ApiKeyBearer": []
}
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "Agent UUID",
"schema": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"action": {
"anyOf": [
{
"type": "string",
"description": "Shorthand. Becomes type tool_use with this string as payload.",
"minLength": 1
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Action type, e.g. http_call, llm_response, data_access, tool_use",
"minLength": 1
},
"url": {
"type": "string"
},
"payload": {},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"dataScope": {
"type": "string"
},
"estimatedCost": {
"type": "number"
},
"tool_name": {
"type": "string"
},
"toolName": {
"type": "string"
}
},
"additionalProperties": true,
"description": "Nested action. Do not send a top-level actionType field.",
"required": [
"type"
]
}
]
}
},
"additionalProperties": true,
"required": [
"action"
]
}
}
}
},
"responses": {
"200": {
"description": "Policy decision. An in-policy success is exactly {\"allowed\":true}. A policy deny is still HTTP 200 with allowed false, reason, and severity. An expired free trial is HTTP 200 with allowed true, enforcement \"off\", and reason \"trial_expired\": the action is recorded and nothing is blocked. Past the 100,000 recorded-action cap the event is still stored. A trial account is shown a count frozen at that cap until the account is paid.",
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean",
"enum": [
true
]
}
},
"additionalProperties": false,
"required": [
"allowed"
]
},
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean",
"enum": [
false
]
},
"reason": {
"type": "string"
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
}
},
"additionalProperties": true,
"required": [
"allowed",
"reason",
"severity"
]
},
{
"type": "object",
"properties": {
"allowed": {
"type": "boolean"
},
"reason": {
"type": "string",
"nullable": true
},
"severity": {
"type": "string"
},
"violation_type": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"code": {
"type": "string"
},
"enforcement": {
"type": "string",
"enum": [
"off"
]
},
"recorded": {
"type": "boolean"
# --- truncated at 32 KB (73 KB total) ---
# Full source: https://artifacts.apis.io/cyphrex-io/openapi/_original/cyphrex-io-api-openapi.json