{
 "openapi": "3.1.0",
 "info": {
  "title": "Delegated Tasks (Agentic AI)",
  "version": "20261030b",
  "description": "Work an agent handed to a licensed Claude worker because it was too big for one model turn. Claim one to get a worker token and the connection for Claude Code, the Agent SDK or a managed agent; the worker reaches this company only through the agent's own tool grants, guardrails and approvals, and every call is recorded."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "delegations": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "task_no": {
      "type": "string",
      "description": "Task no",
      "readOnly": true
     },
     "run_id": {
      "type": "string",
      "format": "uuid",
      "description": "Run id",
      "readOnly": true
     },
     "tool_call_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tool call id",
      "readOnly": true
     },
     "tool_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tool id",
      "readOnly": true
     },
     "agent_id": {
      "type": "string",
      "format": "uuid",
      "description": "Agent id",
      "readOnly": true
     },
     "node_key": {
      "type": "string",
      "description": "Node key",
      "readOnly": true
     },
     "title": {
      "type": "string",
      "description": "Title",
      "readOnly": true
     },
     "brief": {
      "type": "string",
      "description": "Brief",
      "readOnly": true
     },
     "input": {
      "type": "object",
      "description": "Input",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "worker_kind": {
      "type": "string",
      "description": "Worker kind",
      "readOnly": true
     },
     "requires_review": {
      "type": "boolean",
      "description": "Requires review",
      "readOnly": true
     },
     "claimed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Claimed by",
      "readOnly": true
     },
     "claimed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Claimed at",
      "readOnly": true
     },
     "claimed_kind": {
      "type": "string",
      "description": "Claimed kind",
      "readOnly": true
     },
     "worker_session_id": {
      "type": "string",
      "format": "uuid",
      "description": "Worker session id",
      "readOnly": true
     },
     "token_expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Token expires at",
      "readOnly": true
     },
     "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Expires at",
      "readOnly": true
     },
     "mcp_calls": {
      "type": "integer",
      "description": "Mcp calls",
      "readOnly": true
     },
     "last_call_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last call at",
      "readOnly": true
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at",
      "readOnly": true
     },
     "submitted_by": {
      "type": "string",
      "format": "uuid",
      "description": "Submitted by",
      "readOnly": true
     },
     "result_summary": {
      "type": "string",
      "description": "Result summary",
      "readOnly": true
     },
     "result": {
      "type": "object",
      "description": "Result",
      "readOnly": true
     },
     "files": {
      "type": "object",
      "description": "Files",
      "readOnly": true
     },
     "review_approval_id": {
      "type": "string",
      "format": "uuid",
      "description": "Review approval id",
      "readOnly": true
     },
     "decided_by": {
      "type": "string",
      "format": "uuid",
      "description": "Decided by",
      "readOnly": true
     },
     "decided_at": {
      "type": "string",
      "format": "date-time",
      "description": "Decided at",
      "readOnly": true
     },
     "decision_note": {
      "type": "string",
      "description": "Decision note",
      "readOnly": true
     },
     "settled_at": {
      "type": "string",
      "format": "date-time",
      "description": "Settled at",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/agentic/delegations": {
   "get": {
    "summary": "list delegations",
    "operationId": "list_delegations_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post delegated tasks",
    "operationId": "action_delegations_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}": {
   "get": {
    "summary": "get delegations",
    "operationId": "get_delegations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put delegated tasks",
    "operationId": "action_delegations_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete delegated tasks",
    "operationId": "action_delegations_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/sweep": {
   "post": {
    "summary": "Sweep",
    "operationId": "action_delegations_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/claim": {
   "post": {
    "summary": "Claim",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: kind, worker_kind",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/renew": {
   "post": {
    "summary": "Renew",
    "operationId": "action_delegations_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/release": {
   "post": {
    "summary": "Release",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/submit": {
   "post": {
    "summary": "Submit",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: file, contentBase64, summary, result",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/accept": {
   "post": {
    "summary": "Accept",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: note",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/reject": {
   "post": {
    "summary": "Reject",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: note, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/cancel": {
   "post": {
    "summary": "Cancel",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/delegations/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_delegations_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}