openapi: 3.2.0 info: title: AAAA Nexus Delegation API version: 0.5.1 description: Formally verified AI safety APIs for autonomous agents. Supports REST, MCP, A2A (Google protocol), and x402 micropayment protocol. contact: email: atomadic69@gmail.com url: https://github.com/atomadictech/aaaa-nexus servers: - url: https://atomadic.tech description: Production security: [] tags: - name: Delegation description: UCAN delegation chain validation, revocation, and depth queries paths: /v1/delegation/validate: post: operationId: validateDelegation summary: Validate UCAN delegation chain description: Validate a UCAN delegation chain for correctness and authorization. tags: - Delegation security: - ApiKeyAuth: [] - X402PaymentProof: [] requestBody: required: true content: application/json: schema: type: object required: - token properties: token: type: string description: UCAN token to validate responses: '200': description: Delegation validation result content: application/json: schema: type: object properties: valid: type: boolean chain_depth: type: integer issuer: type: string audience: type: string capabilities: type: array items: type: string '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/delegation/chain: get: operationId: getDelegationChain summary: Get delegation chain description: Get the full delegation chain for an agent. tags: - Delegation parameters: - name: agent_id in: query required: true schema: type: string description: Agent identifier security: - ApiKeyAuth: [] - X402PaymentProof: [] responses: '200': description: Delegation chain content: application/json: schema: type: object properties: agent_id: type: string chain: type: array items: type: object depth: type: integer '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/delegation/revoke: post: operationId: revokeDelegation summary: Revoke delegation description: Revoke a delegation, invalidating the entire sub-chain. tags: - Delegation security: - ApiKeyAuth: [] - X402PaymentProof: [] requestBody: required: true content: application/json: schema: type: object required: - token properties: token: type: string responses: '200': description: Delegation revoked content: application/json: schema: type: object properties: revoked: type: boolean revoked_at: type: string format: date-time '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/delegation/list: get: operationId: listDelegations summary: List delegations description: List all delegations for an agent. tags: - Delegation parameters: - name: agent_id in: query required: true schema: type: string description: Agent identifier security: - ApiKeyAuth: [] - X402PaymentProof: [] responses: '200': description: Delegations list content: application/json: schema: type: object properties: agent_id: type: string delegations: type: array items: type: object total: type: integer '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' /v1/delegation/depth: get: operationId: getDelegationDepth summary: Get delegation depth description: Get the delegation depth for an agent. tags: - Delegation parameters: - name: agent_id in: query required: true schema: type: string description: Agent identifier security: - ApiKeyAuth: [] - X402PaymentProof: [] responses: '200': description: Delegation depth content: application/json: schema: type: object properties: agent_id: type: string depth: type: integer max_allowed: type: integer '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/PaymentRequired' components: responses: PaymentRequired: description: 'Payment required. Use x402 protocol: send USDC on Base L2, Polygon, or Solana to the treasury address provided in the response, then retry with the X-Payment-Proof header.' content: application/json: schema: type: object properties: error: type: string example: Payment required amount: type: string example: '0.002' currency: type: string example: USDC treasury: type: string description: Destination wallet address chains: type: array items: type: string example: - base - polygon - solana BadRequest: description: Invalid request body or missing required fields. content: application/json: schema: type: object properties: error: type: string Unauthorized: description: Missing or invalid API key. content: application/json: schema: type: object properties: error: type: string example: Unauthorized securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key description: API key obtained from https://atomadic.tech/pay X402PaymentProof: type: apiKey in: header name: X-Payment-Proof description: Base64-encoded USDC payment proof for x402 autonomous payment flow (Base L2, Polygon, or Solana) AdminTokenAuth: type: apiKey in: header name: X-Admin-Token description: Admin token for privileged operations