{"openapi":"3.1.0","info":{"title":"Auctra Authority API","version":"1.1.0","description":"Evaluate autonomous actions against policy, delegated authority, declared intent, and root human intent."},"servers":[{"url":"https://console.auctra.tech"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Auctra API key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"code":{"type":"string"},"details":{},"upgrade_plan":{"type":"string"}}},"Agent":{"type":"object","required":["id","identity_id","name","model_provider","model_name","environment","authority_level","status","trust_rating","sponsor","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"identity_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"model_provider":{"enum":["openai","anthropic","gemini","local"]},"model_name":{"type":"string"},"environment":{"enum":["dev","staging","production"]},"authority_level":{"enum":["low","medium","high","critical"]},"status":{"enum":["active","suspended","restricted","compromised"]},"trust_rating":{"type":"integer"},"sponsor":{"type":"object","required":["id","full_name","email"],"properties":{"id":{"type":"string","format":"uuid"},"full_name":{"type":"string"},"email":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"}}},"CreateAgent":{"type":"object","required":["name","model_provider","model_name"],"properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"type":"string","maxLength":500},"model_provider":{"enum":["openai","anthropic","gemini","local"]},"model_name":{"type":"string"},"environment":{"enum":["dev","staging","production"],"default":"dev"},"authority_level":{"enum":["low","medium","high","critical"]},"sponsor_user_id":{"type":"string","format":"uuid"}}},"Delegation":{"type":"object","required":["id","agent","delegator","scope","limits","valid_from","valid_until","status","is_active","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"delegator":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"full_name":{"type":"string"},"email":{"type":"string"}}},"scope":{"type":"object","properties":{"action_types":{"type":"array","items":{"type":"string"}}}},"limits":{"type":"object","additionalProperties":true},"valid_from":{"type":"string","format":"date-time"},"valid_until":{"type":"string","format":"date-time"},"status":{"enum":["active","revoked","expired"]},"is_active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"CreateDelegation":{"type":"object","required":["agent_id","action_types","valid_until"],"properties":{"agent_id":{"type":"string","format":"uuid"},"action_types":{"type":"array","minItems":1,"items":{"type":"string"}},"max_amount":{"type":"number","exclusiveMinimum":0},"max_count":{"type":"integer","minimum":1},"environment":{"enum":["dev","staging","production"]},"currency":{"type":"string","minLength":3,"maxLength":3},"valid_until":{"type":"string","format":"date-time"},"delegator_user_id":{"type":"string","format":"uuid"},"max_actions_per_window":{"type":"object","properties":{"count":{"type":"integer","minimum":1},"window_seconds":{"type":"integer","minimum":1},"action_type":{"type":"string"}},"required":["count","window_seconds"]},"max_amount_per_window":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0},"window_seconds":{"type":"integer","minimum":1}},"required":["amount","window_seconds"]}}},"EvaluateAction":{"type":"object","required":["agent_id","action_type"],"properties":{"agent_id":{"type":"string","format":"uuid"},"action_type":{"type":"string","minLength":1},"payload":{"type":"object","additionalProperties":true,"default":{}},"claimed_intent_id":{"type":"string","format":"uuid"},"intent_anchor_token":{"type":"string","minLength":16},"parent_action_id":{"type":"string","format":"uuid"},"actor":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"enum":["human","agent","service","tool"]},"name":{"type":"string"}}},"action":{"type":"object","properties":{"target":{"type":"string"},"description":{"type":"string"},"risk_level":{"enum":["low","medium","high","critical"]},"metadata":{"type":"object","additionalProperties":true}}}}},"Decision":{"type":"object","required":["decision","reason","risk_score","action_request_id"],"properties":{"decision":{"enum":["allowed","blocked","require_approval"]},"reason":{"type":"string"},"risk_score":{"type":"integer","minimum":0,"maximum":100},"action_request_id":{"type":"string","format":"uuid"},"delegation_id":{"type":["string","null"],"format":"uuid"},"delegator":{"type":["string","null"]},"sponsor":{"type":"string"},"matched_policies":{"type":"array","items":{"type":"string","format":"uuid"}},"intelligence":{"type":"object","properties":{"authority_valid":{"type":"boolean"},"root_intent_valid":{"type":"boolean"},"intent_status":{"enum":["aligned","misaligned","invalid","missing"]},"trust_summary":{"type":"string"}}}}},"Intent":{"type":"object","required":["id","title","status","risk_level","max_risk_level","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"intent_type":{"type":["string","null"]},"status":{"enum":["active","expired","completed","revoked","suspended"]},"risk_level":{"enum":["low","medium","high","critical"]},"max_risk_level":{"enum":["low","medium","high","critical"]},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"linked_actions":{}}},"CreateIntent":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":"string","maxLength":2000},"intent_type":{"type":"string","maxLength":100},"risk_level":{"enum":["low","medium","high","critical"],"default":"medium"},"max_risk_level":{"enum":["low","medium","high","critical"],"default":"high"},"expires_at":{"type":"string","format":"date-time"}}},"UpdateIntentStatus":{"type":"object","properties":{"status":{"enum":["active","completed","revoked","suspended"]},"title":{"type":"string","minLength":3,"maxLength":200},"description":{"type":["string","null"],"maxLength":2000},"intent_type":{"type":["string","null"],"maxLength":100},"risk_level":{"enum":["low","medium","high","critical"]},"max_risk_level":{"enum":["low","medium","high","critical"]},"expires_at":{"type":["string","null"],"format":"date-time"}}},"UpdateAgentStatus":{"type":"object","required":["status"],"properties":{"status":{"enum":["active","suspended","restricted","compromised"]},"reason":{"type":"string","maxLength":500},"revoke_delegations":{"type":"boolean","default":false},"restore_delegations":{"type":"boolean","default":true},"delegations_restored":{"type":"integer"}}},"CreateAuthorityEdge":{"type":"object","required":["from_actor_id","from_actor_type","to_actor_id","to_actor_type","authority_scope"],"properties":{"from_actor_id":{"type":"string","format":"uuid"},"from_actor_type":{"enum":["human","agent","service","tool"]},"to_actor_id":{"type":"string","format":"uuid"},"to_actor_type":{"enum":["human","agent","service","tool"]},"authority_scope":{"type":"string","minLength":1,"maxLength":500},"conditions":{"type":"object","additionalProperties":true,"default":{}},"max_risk_level":{"enum":["low","medium","high","critical"]},"expires_at":{"type":"string","format":"date-time"}}},"AuthorityGraph":{"type":"object","required":["nodes","edges"],"properties":{"nodes":{"type":"array","items":{"type":"object","additionalProperties":true}},"edges":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"ActionEvaluation":{"type":"object","required":["id","action_request_id","decision","risk_score","authority_valid","intent_valid","root_intent_valid","reasons","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"action_request_id":{"type":"string","format":"uuid"},"intent_id":{"type":["string","null"],"format":"uuid"},"decision":{"enum":["allowed","requires_approval","blocked"]},"risk_score":{"type":"number","minimum":0,"maximum":100},"authority_valid":{"type":"boolean"},"intent_valid":{"type":"boolean"},"root_intent_valid":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"}}},"RootIntentChain":{"type":"object","required":["valid","chain"],"properties":{"valid":{"type":"boolean"},"root_human_id":{"type":["string","null"],"format":"uuid"},"root_intent_id":{"type":["string","null"],"format":"uuid"},"reason":{"type":["string","null"]},"chain":{"type":"array","items":{"type":"object","additionalProperties":true}}}},"ResolveActionRequest":{"type":"object","required":["approver_user_id"],"properties":{"approver_user_id":{"type":"string","format":"uuid"},"reason":{"type":"string","maxLength":500}}},"CreatePolicy":{"type":"object","required":["name","policy_type","decision"],"properties":{"name":{"type":"string","minLength":2,"maxLength":120},"description":{"type":"string","maxLength":500},"policy_type":{"enum":["spending","data_access","communication","approval"]},"status":{"enum":["active","draft"],"default":"draft"},"priority":{"type":"integer","minimum":0,"maximum":1000},"action_type":{"type":"string"},"amount_greater_than":{"type":"number","exclusiveMinimum":0},"resource_sensitivity":{"enum":["public","internal","confidential","pii"]},"external_recipient":{"type":"boolean"},"environment":{"enum":["dev","staging","production"]},"decision":{"enum":["block","require_approval"]},"approver_role":{"enum":["owner","admin","reviewer"]},"max_actions_per_window":{"type":"object","properties":{"count":{"type":"integer","minimum":1},"window_seconds":{"type":"integer","minimum":1},"action_type":{"type":"string"}},"required":["count","window_seconds"]},"max_amount_per_window":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0},"window_seconds":{"type":"integer","minimum":1}},"required":["amount","window_seconds"]}}}}},"paths":{"/v1/agents":{"get":{"summary":"List agents","responses":{"200":{"description":"Agent registry","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register an agent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgent"}}}},"responses":{"201":{"description":"Registered agent","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents/{agentId}":{"get":{"summary":"Get an agent","parameters":[{"in":"path","name":"agentId","required":true,"description":"Registered agent ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Registered agent","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"$ref":"#/components/schemas/Agent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change agent lifecycle status","parameters":[{"in":"path","name":"agentId","required":true,"description":"Registered agent ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAgentStatus"}}}},"responses":{"200":{"description":"Agent status changed","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string"}}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove an agent with no evaluated actions","parameters":[{"in":"path","name":"agentId","required":true,"description":"Registered agent ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Agent deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Agent not found"},"409":{"description":"Agent has evaluated actions and cannot be deleted"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/delegations":{"get":{"summary":"List authority grants","responses":{"200":{"description":"Delegations","content":{"application/json":{"schema":{"type":"object","properties":{"delegations":{"type":"array","items":{"$ref":"#/components/schemas/Delegation"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a scoped expiring grant","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDelegation"}}}},"responses":{"201":{"description":"Delegation created","content":{"application/json":{"schema":{"type":"object","properties":{"delegation":{"$ref":"#/components/schemas/Delegation"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/delegations/{delegationId}":{"get":{"summary":"Get a delegation","parameters":[{"in":"path","name":"delegationId","required":true,"description":"Delegation ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Delegation","content":{"application/json":{"schema":{"type":"object","properties":{"delegation":{"$ref":"#/components/schemas/Delegation"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Delegation not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/delegations/{delegationId}/revoke":{"post":{"summary":"Revoke a delegation","parameters":[{"in":"path","name":"delegationId","required":true,"description":"Delegation ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Delegation revoked"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Delegation not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/evaluate":{"post":{"summary":"Evaluate authority before an agent action","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateAction"}}}},"responses":{"200":{"description":"Deterministic authority decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests":{"get":{"summary":"List recent action requests","responses":{"200":{"description":"Action requests"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/{actionRequestId}/evaluation":{"get":{"summary":"Get the deterministic action evaluation record","parameters":[{"in":"path","name":"actionRequestId","required":true,"description":"Action request ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Action evaluation","content":{"application/json":{"schema":{"type":"object","properties":{"evaluation":{"$ref":"#/components/schemas/ActionEvaluation"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Evaluation not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/{actionRequestId}/root-intent":{"get":{"summary":"Get the root human intent trust trace","parameters":[{"in":"path","name":"actionRequestId","required":true,"description":"Action request ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Root human intent chain","content":{"application/json":{"schema":{"type":"object","properties":{"root_intent_chain":{"$ref":"#/components/schemas/RootIntentChain"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Action not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/{actionRequestId}/approve":{"post":{"summary":"Approve an action request","parameters":[{"in":"path","name":"actionRequestId","required":true,"description":"Action request ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveActionRequest"}}}},"responses":{"200":{"description":"Action approved"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/{actionRequestId}/reject":{"post":{"summary":"Reject an action request","parameters":[{"in":"path","name":"actionRequestId","required":true,"description":"Action request ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveActionRequest"}}}},"responses":{"200":{"description":"Action rejected"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-requests/{actionRequestId}/escalate":{"post":{"summary":"Escalate an action request","parameters":[{"in":"path","name":"actionRequestId","required":true,"description":"Action request ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveActionRequest"}}}},"responses":{"200":{"description":"Action escalated"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/policies":{"get":{"summary":"List organization policies","responses":{"200":{"description":"Policies"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an organization policy","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicy"}}}},"responses":{"201":{"description":"Policy created"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/policies/{policyId}/simulate":{"post":{"summary":"Dry-run a policy against recent action history","parameters":[{"in":"path","name":"policyId","required":true,"description":"Policy ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":10000},"since":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Simulation delta report"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/policies/{policyId}/publish":{"post":{"summary":"Publish a draft policy after simulation","parameters":[{"in":"path","name":"policyId","required":true,"description":"Policy ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Policy published"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/action-types":{"get":{"summary":"List built-in templates and custom action types","responses":{"200":{"description":"Custom action types"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Register a custom action type namespace","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomActionType"}}}},"responses":{"201":{"description":"Custom action type registered"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/intents":{"get":{"summary":"List human-approved intents","responses":{"200":{"description":"Intents","content":{"application/json":{"schema":{"type":"object","properties":{"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Declare a human-approved intent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntent"}}}},"responses":{"201":{"description":"Intent created"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/intents/{intentId}":{"get":{"summary":"Get intent detail and linked actions","parameters":[{"in":"path","name":"intentId","required":true,"description":"Intent ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Intent detail","content":{"application/json":{"schema":{"type":"object","properties":{"intent":{"$ref":"#/components/schemas/Intent"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Intent not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Update intent lifecycle status or metadata","parameters":[{"in":"path","name":"intentId","required":true,"description":"Intent ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntentStatus"}}}},"responses":{"200":{"description":"Intent status changed"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Intent not found"},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/authority/graph":{"get":{"summary":"Get the organization authority graph","responses":{"200":{"description":"Authority graph","content":{"application/json":{"schema":{"type":"object","properties":{"authority_graph":{"$ref":"#/components/schemas/AuthorityGraph"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/authority/edges":{"post":{"summary":"Create an explicit authority edge","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthorityEdge"}}}},"responses":{"201":{"description":"Authority edge created"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/actions/evaluate":{"post":{"summary":"Evaluate an action with the Core Intelligence Layer","parameters":[{"in":"header","name":"Idempotency-Key","schema":{"type":"string","minLength":8,"maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateAction"}}}},"responses":{"200":{"description":"Action decision and trust summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/audit-events":{"get":{"summary":"List append-only authority events","responses":{"200":{"description":"Audit events"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/api-keys":{"get":{"summary":"List API key metadata","responses":{"200":{"description":"API keys"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Credential lacks permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Authority service unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}