{ "openapi": "3.0.3", "info": { "title": "AgentFlow AI API", "description": "API documentation for the **AgentFlow AI** application.\n\n**Authentication:** Most endpoints require the `api_key` header. If using Swagger UI, click the **Authorize** button at the top of the page and enter your API key before trying any endpoint.", "version": "1.0.0" }, "servers": [ { "url": "https://agent-flow-ai-9855ea98.base44.app/api", "description": "API server" } ], "security": [ { "ApiKeyAuth": [] } ], "paths": { "/entities/Agent": { "get": { "tags": [ "Entities - Agent" ], "summary": "List Agent records", "operationId": "list_Agent", "description": "Retrieve a list of Agent records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Agent" } } } } } } }, "post": { "tags": [ "Entities - Agent" ], "summary": "Create a Agent record", "operationId": "create_Agent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" }, "example": { "name": "Example name", "category": "ready_to_use", "subcategory": "social_promotion", "description": "Example description", "platform": "Example platform" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } } } }, "delete": { "tags": [ "Entities - Agent" ], "summary": "Delete multiple Agent records", "operationId": "delete_many_Agent", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "name": "Example name" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/Agent/bulk": { "post": { "tags": [ "Entities - Agent" ], "summary": "Bulk create Agent records", "operationId": "bulk_create_Agent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Agent" } }, "example": [ { "name": "Example name", "category": "ready_to_use", "subcategory": "social_promotion", "description": "Example description", "platform": "Example platform" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Agent" } } } } } } }, "put": { "tags": [ "Entities - Agent" ], "summary": "Bulk update Agent records", "operationId": "bulk_update_Agent", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Agent" } }, "example": [ { "id": "", "name": "Example name", "category": "ready_to_use", "subcategory": "social_promotion", "description": "Example description", "platform": "Example platform" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Agent" } } } } } } } }, "/entities/Agent/update-many": { "patch": { "tags": [ "Entities - Agent" ], "summary": "Update many Agent records by query", "operationId": "update_many_Agent", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "name": "Example name" }, "data": { "$set": { "name": "Example name" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/Agent/{Agent_id}": { "get": { "tags": [ "Entities - Agent" ], "summary": "Get a Agent record by ID", "operationId": "get_Agent", "parameters": [ { "name": "Agent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } } } }, "put": { "tags": [ "Entities - Agent" ], "summary": "Update a Agent record", "operationId": "update_Agent", "parameters": [ { "name": "Agent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } } } }, "delete": { "tags": [ "Entities - Agent" ], "summary": "Delete a Agent record", "operationId": "delete_Agent", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "Agent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/Agent/{Agent_id}/restore": { "put": { "tags": [ "Entities - Agent" ], "summary": "Restore a deleted Agent record", "operationId": "restore_Agent", "parameters": [ { "name": "Agent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Agent" } } } } } } }, "/entities/Analytics": { "get": { "tags": [ "Entities - Analytics" ], "summary": "List Analytics records", "operationId": "list_Analytics", "description": "Retrieve a list of Analytics records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Analytics" } } } } } } }, "post": { "tags": [ "Entities - Analytics" ], "summary": "Create a Analytics record", "operationId": "create_Analytics", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" }, "example": { "agent_id": "Example agent_id", "metric_type": "traffic", "value": 0, "date": "Example date" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" } } } } } }, "delete": { "tags": [ "Entities - Analytics" ], "summary": "Delete multiple Analytics records", "operationId": "delete_many_Analytics", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "agent_id": "Example agent_id" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/Analytics/bulk": { "post": { "tags": [ "Entities - Analytics" ], "summary": "Bulk create Analytics records", "operationId": "bulk_create_Analytics", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Analytics" } }, "example": [ { "agent_id": "Example agent_id", "metric_type": "traffic", "value": 0, "date": "Example date" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Analytics" } } } } } } }, "put": { "tags": [ "Entities - Analytics" ], "summary": "Bulk update Analytics records", "operationId": "bulk_update_Analytics", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Analytics" } }, "example": [ { "id": "", "agent_id": "Example agent_id", "metric_type": "traffic", "value": 0, "date": "Example date" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Analytics" } } } } } } } }, "/entities/Analytics/update-many": { "patch": { "tags": [ "Entities - Analytics" ], "summary": "Update many Analytics records by query", "operationId": "update_many_Analytics", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "agent_id": "Example agent_id" }, "data": { "$set": { "agent_id": "Example agent_id" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/Analytics/{Analytics_id}": { "get": { "tags": [ "Entities - Analytics" ], "summary": "Get a Analytics record by ID", "operationId": "get_Analytics", "parameters": [ { "name": "Analytics_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" } } } } } }, "put": { "tags": [ "Entities - Analytics" ], "summary": "Update a Analytics record", "operationId": "update_Analytics", "parameters": [ { "name": "Analytics_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" } } } } } }, "delete": { "tags": [ "Entities - Analytics" ], "summary": "Delete a Analytics record", "operationId": "delete_Analytics", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "Analytics_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/Analytics/{Analytics_id}/restore": { "put": { "tags": [ "Entities - Analytics" ], "summary": "Restore a deleted Analytics record", "operationId": "restore_Analytics", "parameters": [ { "name": "Analytics_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Analytics" } } } } } } }, "/entities/Campaign": { "get": { "tags": [ "Entities - Campaign" ], "summary": "List Campaign records", "operationId": "list_Campaign", "description": "Retrieve a list of Campaign records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } } } } } } }, "post": { "tags": [ "Entities - Campaign" ], "summary": "Create a Campaign record", "operationId": "create_Campaign", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" }, "example": { "name": "Example name", "target_url": "Example target_url" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" } } } } } }, "delete": { "tags": [ "Entities - Campaign" ], "summary": "Delete multiple Campaign records", "operationId": "delete_many_Campaign", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "name": "Example name" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/Campaign/bulk": { "post": { "tags": [ "Entities - Campaign" ], "summary": "Bulk create Campaign records", "operationId": "bulk_create_Campaign", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } }, "example": [ { "name": "Example name", "target_url": "Example target_url" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } } } } } } }, "put": { "tags": [ "Entities - Campaign" ], "summary": "Bulk update Campaign records", "operationId": "bulk_update_Campaign", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } }, "example": [ { "id": "", "name": "Example name", "target_url": "Example target_url" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Campaign" } } } } } } } }, "/entities/Campaign/update-many": { "patch": { "tags": [ "Entities - Campaign" ], "summary": "Update many Campaign records by query", "operationId": "update_many_Campaign", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "name": "Example name" }, "data": { "$set": { "name": "Example name" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/Campaign/{Campaign_id}": { "get": { "tags": [ "Entities - Campaign" ], "summary": "Get a Campaign record by ID", "operationId": "get_Campaign", "parameters": [ { "name": "Campaign_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" } } } } } }, "put": { "tags": [ "Entities - Campaign" ], "summary": "Update a Campaign record", "operationId": "update_Campaign", "parameters": [ { "name": "Campaign_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" } } } } } }, "delete": { "tags": [ "Entities - Campaign" ], "summary": "Delete a Campaign record", "operationId": "delete_Campaign", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "Campaign_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/Campaign/{Campaign_id}/restore": { "put": { "tags": [ "Entities - Campaign" ], "summary": "Restore a deleted Campaign record", "operationId": "restore_Campaign", "parameters": [ { "name": "Campaign_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Campaign" } } } } } } }, "/entities/CodeRepository": { "get": { "tags": [ "Entities - CodeRepository" ], "summary": "List CodeRepository records", "operationId": "list_CodeRepository", "description": "Retrieve a list of CodeRepository records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CodeRepository" } } } } } } }, "post": { "tags": [ "Entities - CodeRepository" ], "summary": "Create a CodeRepository record", "operationId": "create_CodeRepository", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" }, "example": { "filename": "Example filename", "file_type": "code" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" } } } } } }, "delete": { "tags": [ "Entities - CodeRepository" ], "summary": "Delete multiple CodeRepository records", "operationId": "delete_many_CodeRepository", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "filename": "Example filename" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/CodeRepository/bulk": { "post": { "tags": [ "Entities - CodeRepository" ], "summary": "Bulk create CodeRepository records", "operationId": "bulk_create_CodeRepository", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CodeRepository" } }, "example": [ { "filename": "Example filename", "file_type": "code" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CodeRepository" } } } } } } }, "put": { "tags": [ "Entities - CodeRepository" ], "summary": "Bulk update CodeRepository records", "operationId": "bulk_update_CodeRepository", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CodeRepository" } }, "example": [ { "id": "", "filename": "Example filename", "file_type": "code" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CodeRepository" } } } } } } } }, "/entities/CodeRepository/update-many": { "patch": { "tags": [ "Entities - CodeRepository" ], "summary": "Update many CodeRepository records by query", "operationId": "update_many_CodeRepository", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "filename": "Example filename" }, "data": { "$set": { "filename": "Example filename" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/CodeRepository/{CodeRepository_id}": { "get": { "tags": [ "Entities - CodeRepository" ], "summary": "Get a CodeRepository record by ID", "operationId": "get_CodeRepository", "parameters": [ { "name": "CodeRepository_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" } } } } } }, "put": { "tags": [ "Entities - CodeRepository" ], "summary": "Update a CodeRepository record", "operationId": "update_CodeRepository", "parameters": [ { "name": "CodeRepository_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" } } } } } }, "delete": { "tags": [ "Entities - CodeRepository" ], "summary": "Delete a CodeRepository record", "operationId": "delete_CodeRepository", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "CodeRepository_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/CodeRepository/{CodeRepository_id}/restore": { "put": { "tags": [ "Entities - CodeRepository" ], "summary": "Restore a deleted CodeRepository record", "operationId": "restore_CodeRepository", "parameters": [ { "name": "CodeRepository_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeRepository" } } } } } } }, "/entities/ContentAsset": { "get": { "tags": [ "Entities - ContentAsset" ], "summary": "List ContentAsset records", "operationId": "list_ContentAsset", "description": "Retrieve a list of ContentAsset records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContentAsset" } } } } } } }, "post": { "tags": [ "Entities - ContentAsset" ], "summary": "Create a ContentAsset record", "operationId": "create_ContentAsset", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" }, "example": { "title": "Example title", "url": "Example url", "content_type": "video_short" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" } } } } } }, "delete": { "tags": [ "Entities - ContentAsset" ], "summary": "Delete multiple ContentAsset records", "operationId": "delete_many_ContentAsset", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "title": "Example title" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/ContentAsset/bulk": { "post": { "tags": [ "Entities - ContentAsset" ], "summary": "Bulk create ContentAsset records", "operationId": "bulk_create_ContentAsset", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContentAsset" } }, "example": [ { "title": "Example title", "url": "Example url", "content_type": "video_short" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContentAsset" } } } } } } }, "put": { "tags": [ "Entities - ContentAsset" ], "summary": "Bulk update ContentAsset records", "operationId": "bulk_update_ContentAsset", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContentAsset" } }, "example": [ { "id": "", "title": "Example title", "url": "Example url", "content_type": "video_short" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ContentAsset" } } } } } } } }, "/entities/ContentAsset/update-many": { "patch": { "tags": [ "Entities - ContentAsset" ], "summary": "Update many ContentAsset records by query", "operationId": "update_many_ContentAsset", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "title": "Example title" }, "data": { "$set": { "title": "Example title" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/ContentAsset/{ContentAsset_id}": { "get": { "tags": [ "Entities - ContentAsset" ], "summary": "Get a ContentAsset record by ID", "operationId": "get_ContentAsset", "parameters": [ { "name": "ContentAsset_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" } } } } } }, "put": { "tags": [ "Entities - ContentAsset" ], "summary": "Update a ContentAsset record", "operationId": "update_ContentAsset", "parameters": [ { "name": "ContentAsset_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" } } } } } }, "delete": { "tags": [ "Entities - ContentAsset" ], "summary": "Delete a ContentAsset record", "operationId": "delete_ContentAsset", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "ContentAsset_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/ContentAsset/{ContentAsset_id}/restore": { "put": { "tags": [ "Entities - ContentAsset" ], "summary": "Restore a deleted ContentAsset record", "operationId": "restore_ContentAsset", "parameters": [ { "name": "ContentAsset_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContentAsset" } } } } } } }, "/entities/CoursePromotion": { "get": { "tags": [ "Entities - CoursePromotion" ], "summary": "List CoursePromotion records", "operationId": "list_CoursePromotion", "description": "Retrieve a list of CoursePromotion records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoursePromotion" } } } } } } }, "post": { "tags": [ "Entities - CoursePromotion" ], "summary": "Create a CoursePromotion record", "operationId": "create_CoursePromotion", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" }, "example": { "course_name": "Example course_name" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" } } } } } }, "delete": { "tags": [ "Entities - CoursePromotion" ], "summary": "Delete multiple CoursePromotion records", "operationId": "delete_many_CoursePromotion", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "course_name": "Example course_name" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/CoursePromotion/bulk": { "post": { "tags": [ "Entities - CoursePromotion" ], "summary": "Bulk create CoursePromotion records", "operationId": "bulk_create_CoursePromotion", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoursePromotion" } }, "example": [ { "course_name": "Example course_name" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoursePromotion" } } } } } } }, "put": { "tags": [ "Entities - CoursePromotion" ], "summary": "Bulk update CoursePromotion records", "operationId": "bulk_update_CoursePromotion", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoursePromotion" } }, "example": [ { "id": "", "course_name": "Example course_name" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CoursePromotion" } } } } } } } }, "/entities/CoursePromotion/update-many": { "patch": { "tags": [ "Entities - CoursePromotion" ], "summary": "Update many CoursePromotion records by query", "operationId": "update_many_CoursePromotion", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "course_name": "Example course_name" }, "data": { "$set": { "course_name": "Example course_name" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/CoursePromotion/{CoursePromotion_id}": { "get": { "tags": [ "Entities - CoursePromotion" ], "summary": "Get a CoursePromotion record by ID", "operationId": "get_CoursePromotion", "parameters": [ { "name": "CoursePromotion_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" } } } } } }, "put": { "tags": [ "Entities - CoursePromotion" ], "summary": "Update a CoursePromotion record", "operationId": "update_CoursePromotion", "parameters": [ { "name": "CoursePromotion_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" } } } } } }, "delete": { "tags": [ "Entities - CoursePromotion" ], "summary": "Delete a CoursePromotion record", "operationId": "delete_CoursePromotion", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "CoursePromotion_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/CoursePromotion/{CoursePromotion_id}/restore": { "put": { "tags": [ "Entities - CoursePromotion" ], "summary": "Restore a deleted CoursePromotion record", "operationId": "restore_CoursePromotion", "parameters": [ { "name": "CoursePromotion_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CoursePromotion" } } } } } } }, "/entities/FinancialGoal": { "get": { "tags": [ "Entities - FinancialGoal" ], "summary": "List FinancialGoal records", "operationId": "list_FinancialGoal", "description": "Retrieve a list of FinancialGoal records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialGoal" } } } } } } }, "post": { "tags": [ "Entities - FinancialGoal" ], "summary": "Create a FinancialGoal record", "operationId": "create_FinancialGoal", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" }, "example": { "goal_name": "Example goal_name", "target_amount": 0, "category": "operational_costs" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" } } } } } }, "delete": { "tags": [ "Entities - FinancialGoal" ], "summary": "Delete multiple FinancialGoal records", "operationId": "delete_many_FinancialGoal", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "goal_name": "Example goal_name" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/FinancialGoal/bulk": { "post": { "tags": [ "Entities - FinancialGoal" ], "summary": "Bulk create FinancialGoal records", "operationId": "bulk_create_FinancialGoal", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialGoal" } }, "example": [ { "goal_name": "Example goal_name", "target_amount": 0, "category": "operational_costs" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialGoal" } } } } } } }, "put": { "tags": [ "Entities - FinancialGoal" ], "summary": "Bulk update FinancialGoal records", "operationId": "bulk_update_FinancialGoal", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialGoal" } }, "example": [ { "id": "", "goal_name": "Example goal_name", "target_amount": 0, "category": "operational_costs" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FinancialGoal" } } } } } } } }, "/entities/FinancialGoal/update-many": { "patch": { "tags": [ "Entities - FinancialGoal" ], "summary": "Update many FinancialGoal records by query", "operationId": "update_many_FinancialGoal", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "goal_name": "Example goal_name" }, "data": { "$set": { "goal_name": "Example goal_name" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/FinancialGoal/{FinancialGoal_id}": { "get": { "tags": [ "Entities - FinancialGoal" ], "summary": "Get a FinancialGoal record by ID", "operationId": "get_FinancialGoal", "parameters": [ { "name": "FinancialGoal_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" } } } } } }, "put": { "tags": [ "Entities - FinancialGoal" ], "summary": "Update a FinancialGoal record", "operationId": "update_FinancialGoal", "parameters": [ { "name": "FinancialGoal_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" } } } } } }, "delete": { "tags": [ "Entities - FinancialGoal" ], "summary": "Delete a FinancialGoal record", "operationId": "delete_FinancialGoal", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "FinancialGoal_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/FinancialGoal/{FinancialGoal_id}/restore": { "put": { "tags": [ "Entities - FinancialGoal" ], "summary": "Restore a deleted FinancialGoal record", "operationId": "restore_FinancialGoal", "parameters": [ { "name": "FinancialGoal_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinancialGoal" } } } } } } }, "/entities/KnowledgeEntry": { "get": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "List KnowledgeEntry records", "operationId": "list_KnowledgeEntry", "description": "Retrieve a list of KnowledgeEntry records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } } }, "post": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Create a KnowledgeEntry record", "operationId": "create_KnowledgeEntry", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" }, "example": { "title": "Example title", "type": "note" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } }, "delete": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Delete multiple KnowledgeEntry records", "operationId": "delete_many_KnowledgeEntry", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "title": "Example title" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/KnowledgeEntry/bulk": { "post": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Bulk create KnowledgeEntry records", "operationId": "bulk_create_KnowledgeEntry", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeEntry" } }, "example": [ { "title": "Example title", "type": "note" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } } }, "put": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Bulk update KnowledgeEntry records", "operationId": "bulk_update_KnowledgeEntry", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeEntry" } }, "example": [ { "id": "", "title": "Example title", "type": "note" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } } } }, "/entities/KnowledgeEntry/update-many": { "patch": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Update many KnowledgeEntry records by query", "operationId": "update_many_KnowledgeEntry", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "title": "Example title" }, "data": { "$set": { "title": "Example title" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/KnowledgeEntry/{KnowledgeEntry_id}": { "get": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Get a KnowledgeEntry record by ID", "operationId": "get_KnowledgeEntry", "parameters": [ { "name": "KnowledgeEntry_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } }, "put": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Update a KnowledgeEntry record", "operationId": "update_KnowledgeEntry", "parameters": [ { "name": "KnowledgeEntry_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } }, "delete": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Delete a KnowledgeEntry record", "operationId": "delete_KnowledgeEntry", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "KnowledgeEntry_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/KnowledgeEntry/{KnowledgeEntry_id}/restore": { "put": { "tags": [ "Entities - KnowledgeEntry" ], "summary": "Restore a deleted KnowledgeEntry record", "operationId": "restore_KnowledgeEntry", "parameters": [ { "name": "KnowledgeEntry_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeEntry" } } } } } } }, "/entities/Mission": { "get": { "tags": [ "Entities - Mission" ], "summary": "List Mission records", "operationId": "list_Mission", "description": "Retrieve a list of Mission records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Mission" } } } } } } }, "post": { "tags": [ "Entities - Mission" ], "summary": "Create a Mission record", "operationId": "create_Mission", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" }, "example": { "title": "Example title", "type": "marketing", "priority": "critical", "status": "pending" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" } } } } } }, "delete": { "tags": [ "Entities - Mission" ], "summary": "Delete multiple Mission records", "operationId": "delete_many_Mission", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "title": "Example title" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/Mission/bulk": { "post": { "tags": [ "Entities - Mission" ], "summary": "Bulk create Mission records", "operationId": "bulk_create_Mission", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Mission" } }, "example": [ { "title": "Example title", "type": "marketing", "priority": "critical", "status": "pending" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Mission" } } } } } } }, "put": { "tags": [ "Entities - Mission" ], "summary": "Bulk update Mission records", "operationId": "bulk_update_Mission", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Mission" } }, "example": [ { "id": "", "title": "Example title", "type": "marketing", "priority": "critical", "status": "pending" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Mission" } } } } } } } }, "/entities/Mission/update-many": { "patch": { "tags": [ "Entities - Mission" ], "summary": "Update many Mission records by query", "operationId": "update_many_Mission", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "title": "Example title" }, "data": { "$set": { "title": "Example title" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/Mission/{Mission_id}": { "get": { "tags": [ "Entities - Mission" ], "summary": "Get a Mission record by ID", "operationId": "get_Mission", "parameters": [ { "name": "Mission_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" } } } } } }, "put": { "tags": [ "Entities - Mission" ], "summary": "Update a Mission record", "operationId": "update_Mission", "parameters": [ { "name": "Mission_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" } } } } } }, "delete": { "tags": [ "Entities - Mission" ], "summary": "Delete a Mission record", "operationId": "delete_Mission", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "Mission_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/Mission/{Mission_id}/restore": { "put": { "tags": [ "Entities - Mission" ], "summary": "Restore a deleted Mission record", "operationId": "restore_Mission", "parameters": [ { "name": "Mission_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Mission" } } } } } } }, "/entities/PayoutBatch": { "get": { "tags": [ "Entities - PayoutBatch" ], "summary": "List PayoutBatch records", "operationId": "list_PayoutBatch", "description": "Retrieve a list of PayoutBatch records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutBatch" } } } } } } }, "post": { "tags": [ "Entities - PayoutBatch" ], "summary": "Create a PayoutBatch record", "operationId": "create_PayoutBatch", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" }, "example": { "batch_id": "Example batch_id", "total_amount": 0, "status": "pending_approval" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" } } } } } }, "delete": { "tags": [ "Entities - PayoutBatch" ], "summary": "Delete multiple PayoutBatch records", "operationId": "delete_many_PayoutBatch", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "batch_id": "Example batch_id" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/PayoutBatch/bulk": { "post": { "tags": [ "Entities - PayoutBatch" ], "summary": "Bulk create PayoutBatch records", "operationId": "bulk_create_PayoutBatch", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutBatch" } }, "example": [ { "batch_id": "Example batch_id", "total_amount": 0, "status": "pending_approval" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutBatch" } } } } } } }, "put": { "tags": [ "Entities - PayoutBatch" ], "summary": "Bulk update PayoutBatch records", "operationId": "bulk_update_PayoutBatch", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutBatch" } }, "example": [ { "id": "", "batch_id": "Example batch_id", "total_amount": 0, "status": "pending_approval" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutBatch" } } } } } } } }, "/entities/PayoutBatch/update-many": { "patch": { "tags": [ "Entities - PayoutBatch" ], "summary": "Update many PayoutBatch records by query", "operationId": "update_many_PayoutBatch", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "batch_id": "Example batch_id" }, "data": { "$set": { "batch_id": "Example batch_id" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/PayoutBatch/{PayoutBatch_id}": { "get": { "tags": [ "Entities - PayoutBatch" ], "summary": "Get a PayoutBatch record by ID", "operationId": "get_PayoutBatch", "parameters": [ { "name": "PayoutBatch_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" } } } } } }, "put": { "tags": [ "Entities - PayoutBatch" ], "summary": "Update a PayoutBatch record", "operationId": "update_PayoutBatch", "parameters": [ { "name": "PayoutBatch_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" } } } } } }, "delete": { "tags": [ "Entities - PayoutBatch" ], "summary": "Delete a PayoutBatch record", "operationId": "delete_PayoutBatch", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "PayoutBatch_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/PayoutBatch/{PayoutBatch_id}/restore": { "put": { "tags": [ "Entities - PayoutBatch" ], "summary": "Restore a deleted PayoutBatch record", "operationId": "restore_PayoutBatch", "parameters": [ { "name": "PayoutBatch_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutBatch" } } } } } } }, "/entities/PayoutItem": { "get": { "tags": [ "Entities - PayoutItem" ], "summary": "List PayoutItem records", "operationId": "list_PayoutItem", "description": "Retrieve a list of PayoutItem records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutItem" } } } } } } }, "post": { "tags": [ "Entities - PayoutItem" ], "summary": "Create a PayoutItem record", "operationId": "create_PayoutItem", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" }, "example": { "item_id": "Example item_id", "batch_id": "Example batch_id", "recipient": "Example recipient", "amount": 0, "status": "pending" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" } } } } } }, "delete": { "tags": [ "Entities - PayoutItem" ], "summary": "Delete multiple PayoutItem records", "operationId": "delete_many_PayoutItem", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "item_id": "Example item_id" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/PayoutItem/bulk": { "post": { "tags": [ "Entities - PayoutItem" ], "summary": "Bulk create PayoutItem records", "operationId": "bulk_create_PayoutItem", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutItem" } }, "example": [ { "item_id": "Example item_id", "batch_id": "Example batch_id", "recipient": "Example recipient", "amount": 0, "status": "pending" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutItem" } } } } } } }, "put": { "tags": [ "Entities - PayoutItem" ], "summary": "Bulk update PayoutItem records", "operationId": "bulk_update_PayoutItem", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutItem" } }, "example": [ { "id": "", "item_id": "Example item_id", "batch_id": "Example batch_id", "recipient": "Example recipient", "amount": 0, "status": "pending" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PayoutItem" } } } } } } } }, "/entities/PayoutItem/update-many": { "patch": { "tags": [ "Entities - PayoutItem" ], "summary": "Update many PayoutItem records by query", "operationId": "update_many_PayoutItem", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "item_id": "Example item_id" }, "data": { "$set": { "item_id": "Example item_id" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/PayoutItem/{PayoutItem_id}": { "get": { "tags": [ "Entities - PayoutItem" ], "summary": "Get a PayoutItem record by ID", "operationId": "get_PayoutItem", "parameters": [ { "name": "PayoutItem_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" } } } } } }, "put": { "tags": [ "Entities - PayoutItem" ], "summary": "Update a PayoutItem record", "operationId": "update_PayoutItem", "parameters": [ { "name": "PayoutItem_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" } } } } } }, "delete": { "tags": [ "Entities - PayoutItem" ], "summary": "Delete a PayoutItem record", "operationId": "delete_PayoutItem", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "PayoutItem_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/PayoutItem/{PayoutItem_id}/restore": { "put": { "tags": [ "Entities - PayoutItem" ], "summary": "Restore a deleted PayoutItem record", "operationId": "restore_PayoutItem", "parameters": [ { "name": "PayoutItem_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayoutItem" } } } } } } }, "/entities/RevenueEvent": { "get": { "tags": [ "Entities - RevenueEvent" ], "summary": "List RevenueEvent records", "operationId": "list_RevenueEvent", "description": "Retrieve a list of RevenueEvent records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueEvent" } } } } } } }, "post": { "tags": [ "Entities - RevenueEvent" ], "summary": "Create a RevenueEvent record", "operationId": "create_RevenueEvent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" }, "example": { "event_id": "Example event_id", "source": "mission_completed", "amount": 0, "status": "projected" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" } } } } } }, "delete": { "tags": [ "Entities - RevenueEvent" ], "summary": "Delete multiple RevenueEvent records", "operationId": "delete_many_RevenueEvent", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "event_id": "Example event_id" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/RevenueEvent/bulk": { "post": { "tags": [ "Entities - RevenueEvent" ], "summary": "Bulk create RevenueEvent records", "operationId": "bulk_create_RevenueEvent", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueEvent" } }, "example": [ { "event_id": "Example event_id", "source": "mission_completed", "amount": 0, "status": "projected" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueEvent" } } } } } } }, "put": { "tags": [ "Entities - RevenueEvent" ], "summary": "Bulk update RevenueEvent records", "operationId": "bulk_update_RevenueEvent", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueEvent" } }, "example": [ { "id": "", "event_id": "Example event_id", "source": "mission_completed", "amount": 0, "status": "projected" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RevenueEvent" } } } } } } } }, "/entities/RevenueEvent/update-many": { "patch": { "tags": [ "Entities - RevenueEvent" ], "summary": "Update many RevenueEvent records by query", "operationId": "update_many_RevenueEvent", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "event_id": "Example event_id" }, "data": { "$set": { "event_id": "Example event_id" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/RevenueEvent/{RevenueEvent_id}": { "get": { "tags": [ "Entities - RevenueEvent" ], "summary": "Get a RevenueEvent record by ID", "operationId": "get_RevenueEvent", "parameters": [ { "name": "RevenueEvent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" } } } } } }, "put": { "tags": [ "Entities - RevenueEvent" ], "summary": "Update a RevenueEvent record", "operationId": "update_RevenueEvent", "parameters": [ { "name": "RevenueEvent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" } } } } } }, "delete": { "tags": [ "Entities - RevenueEvent" ], "summary": "Delete a RevenueEvent record", "operationId": "delete_RevenueEvent", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "RevenueEvent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/RevenueEvent/{RevenueEvent_id}/restore": { "put": { "tags": [ "Entities - RevenueEvent" ], "summary": "Restore a deleted RevenueEvent record", "operationId": "restore_RevenueEvent", "parameters": [ { "name": "RevenueEvent_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevenueEvent" } } } } } } }, "/entities/SwarmCoordination": { "get": { "tags": [ "Entities - SwarmCoordination" ], "summary": "List SwarmCoordination records", "operationId": "list_SwarmCoordination", "description": "Retrieve a list of SwarmCoordination records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } } }, "post": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Create a SwarmCoordination record", "operationId": "create_SwarmCoordination", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" }, "example": { "coordination_id": "Example coordination_id", "coordinator_agent": "Example coordinator_agent", "coordination_type": "task_distribution", "objective": "Example objective" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } }, "delete": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Delete multiple SwarmCoordination records", "operationId": "delete_many_SwarmCoordination", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "coordination_id": "Example coordination_id" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/SwarmCoordination/bulk": { "post": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Bulk create SwarmCoordination records", "operationId": "bulk_create_SwarmCoordination", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmCoordination" } }, "example": [ { "coordination_id": "Example coordination_id", "coordinator_agent": "Example coordinator_agent", "coordination_type": "task_distribution", "objective": "Example objective" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } } }, "put": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Bulk update SwarmCoordination records", "operationId": "bulk_update_SwarmCoordination", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmCoordination" } }, "example": [ { "id": "", "coordination_id": "Example coordination_id", "coordinator_agent": "Example coordinator_agent", "coordination_type": "task_distribution", "objective": "Example objective" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } } } }, "/entities/SwarmCoordination/update-many": { "patch": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Update many SwarmCoordination records by query", "operationId": "update_many_SwarmCoordination", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "coordination_id": "Example coordination_id" }, "data": { "$set": { "coordination_id": "Example coordination_id" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/SwarmCoordination/{SwarmCoordination_id}": { "get": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Get a SwarmCoordination record by ID", "operationId": "get_SwarmCoordination", "parameters": [ { "name": "SwarmCoordination_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } }, "put": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Update a SwarmCoordination record", "operationId": "update_SwarmCoordination", "parameters": [ { "name": "SwarmCoordination_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } }, "delete": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Delete a SwarmCoordination record", "operationId": "delete_SwarmCoordination", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "SwarmCoordination_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/SwarmCoordination/{SwarmCoordination_id}/restore": { "put": { "tags": [ "Entities - SwarmCoordination" ], "summary": "Restore a deleted SwarmCoordination record", "operationId": "restore_SwarmCoordination", "parameters": [ { "name": "SwarmCoordination_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SwarmCoordination" } } } } } } }, "/entities/TransactionLog": { "get": { "tags": [ "Entities - TransactionLog" ], "summary": "List TransactionLog records", "operationId": "list_TransactionLog", "description": "Retrieve a list of TransactionLog records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionLog" } } } } } } }, "post": { "tags": [ "Entities - TransactionLog" ], "summary": "Create a TransactionLog record", "operationId": "create_TransactionLog", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" }, "example": { "transaction_type": "income", "amount": 0, "description": "Example description", "transaction_date": "Example transaction_date" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" } } } } } }, "delete": { "tags": [ "Entities - TransactionLog" ], "summary": "Delete multiple TransactionLog records", "operationId": "delete_many_TransactionLog", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "transaction_type": "income" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/TransactionLog/bulk": { "post": { "tags": [ "Entities - TransactionLog" ], "summary": "Bulk create TransactionLog records", "operationId": "bulk_create_TransactionLog", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionLog" } }, "example": [ { "transaction_type": "income", "amount": 0, "description": "Example description", "transaction_date": "Example transaction_date" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionLog" } } } } } } }, "put": { "tags": [ "Entities - TransactionLog" ], "summary": "Bulk update TransactionLog records", "operationId": "bulk_update_TransactionLog", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionLog" } }, "example": [ { "id": "", "transaction_type": "income", "amount": 0, "description": "Example description", "transaction_date": "Example transaction_date" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionLog" } } } } } } } }, "/entities/TransactionLog/update-many": { "patch": { "tags": [ "Entities - TransactionLog" ], "summary": "Update many TransactionLog records by query", "operationId": "update_many_TransactionLog", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "transaction_type": "income" }, "data": { "$set": { "transaction_type": "income" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/TransactionLog/{TransactionLog_id}": { "get": { "tags": [ "Entities - TransactionLog" ], "summary": "Get a TransactionLog record by ID", "operationId": "get_TransactionLog", "parameters": [ { "name": "TransactionLog_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" } } } } } }, "put": { "tags": [ "Entities - TransactionLog" ], "summary": "Update a TransactionLog record", "operationId": "update_TransactionLog", "parameters": [ { "name": "TransactionLog_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" } } } } } }, "delete": { "tags": [ "Entities - TransactionLog" ], "summary": "Delete a TransactionLog record", "operationId": "delete_TransactionLog", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "TransactionLog_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/TransactionLog/{TransactionLog_id}/restore": { "put": { "tags": [ "Entities - TransactionLog" ], "summary": "Restore a deleted TransactionLog record", "operationId": "restore_TransactionLog", "parameters": [ { "name": "TransactionLog_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransactionLog" } } } } } } }, "/entities/WorkflowExecution": { "get": { "tags": [ "Entities - WorkflowExecution" ], "summary": "List WorkflowExecution records", "operationId": "list_WorkflowExecution", "description": "Retrieve a list of WorkflowExecution records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } } }, "post": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Create a WorkflowExecution record", "operationId": "create_WorkflowExecution", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" }, "example": { "workflow_name": "Example workflow_name", "trigger_type": "manual" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } }, "delete": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Delete multiple WorkflowExecution records", "operationId": "delete_many_WorkflowExecution", "description": "**Warning:** Passing an empty `{}` query will delete ALL records in this entity.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "description": "Query filter to match records to delete" }, "example": { "workflow_name": "Example workflow_name" } } } }, "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deleted": { "type": "integer" } } } } } } } } }, "/entities/WorkflowExecution/bulk": { "post": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Bulk create WorkflowExecution records", "operationId": "bulk_create_WorkflowExecution", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowExecution" } }, "example": [ { "workflow_name": "Example workflow_name", "trigger_type": "manual" } ] } } }, "responses": { "200": { "description": "List of created records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } } }, "put": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Bulk update WorkflowExecution records", "operationId": "bulk_update_WorkflowExecution", "description": "Each item must include an 'id' field along with the fields to update.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowExecution" } }, "example": [ { "id": "", "workflow_name": "Example workflow_name", "trigger_type": "manual" } ] } } }, "responses": { "200": { "description": "List of updated records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } } } }, "/entities/WorkflowExecution/update-many": { "patch": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Update many WorkflowExecution records by query", "operationId": "update_many_WorkflowExecution", "description": "Update multiple records matching a query filter. Supports MongoDB update operators ($set, $inc, $push, $pull).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "query", "data" ], "properties": { "query": { "type": "object", "description": "Query filter to match records" }, "data": { "type": "object", "description": "Update operations to apply" } } }, "example": { "query": { "workflow_name": "Example workflow_name" }, "data": { "$set": { "workflow_name": "Example workflow_name" } } } } } }, "responses": { "200": { "description": "Update result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "updated": { "type": "integer" }, "has_more": { "type": "boolean" } } } } } } } } }, "/entities/WorkflowExecution/{WorkflowExecution_id}": { "get": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Get a WorkflowExecution record by ID", "operationId": "get_WorkflowExecution", "parameters": [ { "name": "WorkflowExecution_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } }, "put": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Update a WorkflowExecution record", "operationId": "update_WorkflowExecution", "parameters": [ { "name": "WorkflowExecution_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } }, "delete": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Delete a WorkflowExecution record", "operationId": "delete_WorkflowExecution", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "WorkflowExecution_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/entities/WorkflowExecution/{WorkflowExecution_id}/restore": { "put": { "tags": [ "Entities - WorkflowExecution" ], "summary": "Restore a deleted WorkflowExecution record", "operationId": "restore_WorkflowExecution", "parameters": [ { "name": "WorkflowExecution_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Restored record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowExecution" } } } } } } }, "/entities/User": { "get": { "tags": [ "Entities - User" ], "summary": "List User records", "operationId": "list_User", "description": "Retrieve a list of User records with optional filtering, sorting, and pagination.", "parameters": [ { "name": "q", "in": "query", "schema": { "type": "string" }, "description": "JSON query filter, e.g. {\"status\":\"active\"}" }, { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of records to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of records to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order, e.g. -created_date" } ], "responses": { "200": { "description": "List of records", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/User" } } } } } } }, "post": { "tags": [ "Entities - User" ], "summary": "Create a User record", "operationId": "create_User", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" }, "example": { "role": "admin", "email": "Example email", "full_name": "Example full_name" } } } }, "responses": { "200": { "description": "Created record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } } } } }, "/entities/User/{User_id}": { "get": { "tags": [ "Entities - User" ], "summary": "Get a User record by ID", "operationId": "get_User", "parameters": [ { "name": "User_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "The record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } } } }, "put": { "tags": [ "Entities - User" ], "summary": "Update a User record", "operationId": "update_User", "parameters": [ { "name": "User_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "responses": { "200": { "description": "Updated record", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } } } }, "delete": { "tags": [ "Entities - User" ], "summary": "Delete a User record", "operationId": "delete_User", "description": "Soft-deletes the record. Use the restore endpoint to undo.", "parameters": [ { "name": "User_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Record ID" } ], "responses": { "200": { "description": "Deletion result", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } } } }, "/apps/6888ac155ebf84dd9855ea98/agents/conversations": { "get": { "tags": [ "App Agents" ], "summary": "List conversations", "operationId": "list_agent_conversations", "description": "List the authenticated user's agent conversations. Returns the most recent conversations first.", "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 100 }, "description": "Maximum number of conversations to return" }, { "name": "skip", "in": "query", "schema": { "type": "integer", "default": 0 }, "description": "Number of conversations to skip (pagination)" }, { "name": "sort_by", "in": "query", "schema": { "type": "string" }, "description": "Field name to sort by. Prefix with '-' for descending order" } ], "responses": { "200": { "description": "List of conversations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AgentConversation" } } } } } } }, "post": { "tags": [ "App Agents" ], "summary": "Create a conversation", "operationId": "create_agent_conversation", "description": "Start a new conversation with an app agent. Available agent names: `course_content_publisher`, `income_monitor`, `sales_campaign_manager`, `SwarmOrchestrator`, `auto_scaler`, `content_auto_updater`, `FinancialSupervisor`.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "agent_name" ], "properties": { "agent_name": { "type": "string", "description": "Name of the agent to start a conversation with", "enum": [ "course_content_publisher", "income_monitor", "sales_campaign_manager", "SwarmOrchestrator", "auto_scaler", "content_auto_updater", "FinancialSupervisor" ] }, "metadata": { "type": "object", "description": "Optional metadata to attach to the conversation", "default": {} } } }, "example": { "agent_name": "course_content_publisher" } } } }, "responses": { "200": { "description": "Created conversation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentConversation" } } } } } } }, "/apps/6888ac155ebf84dd9855ea98/agents/conversations/{conversation_id}": { "get": { "tags": [ "App Agents" ], "summary": "Get a conversation", "operationId": "get_agent_conversation", "description": "Retrieve a specific conversation by ID, including all messages.", "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Conversation ID" } ], "responses": { "200": { "description": "The conversation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentConversation" } } } } } } }, "/apps/6888ac155ebf84dd9855ea98/agents/conversations/{conversation_id}/messages": { "post": { "tags": [ "App Agents" ], "summary": "Send a message", "operationId": "send_agent_message", "description": "Send a message to an existing agent conversation and receive the agent's response. The agent processes the message and returns its reply.", "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Conversation ID" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string", "description": "The message text to send to the agent" }, "role": { "type": "string", "enum": [ "user" ], "default": "user", "description": "Message role" } } }, "example": { "role": "user", "content": "Hello, how can you help me?" } } } }, "responses": { "200": { "description": "Agent response message", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentMessage" } } } } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "api_key", "description": "Your API key. Obtain it from your user profile or via `User.me()` in the app SDK." } }, "schemas": { "Agent": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the AI agent" }, "category": { "type": "string", "enum": [ "ready_to_use", "framework_based", "custom", "viral_swarm", "enterprise_suite", "ai_workforce", "automation_bots" ], "description": "Type of agent" }, "subcategory": { "type": "string", "enum": [ "social_promotion", "content_creation", "seo_optimization", "traffic_conversion", "analytics", "email_automation", "community_engagement", "viral_marketing", "cross_platform_sync", "trend_hijacking", "market_research", "system_resilience", "financial_tracking", "workflow_automation", "data_processing", "api_monitoring", "task_scheduling", "swarm_coordination", "real_time_monitoring", "integration_management", "performance_optimization", "security_monitoring", "compliance_tracking", "resource_management" ], "description": "Agent specialization" }, "description": { "type": "string", "description": "Detailed description of what the agent does" }, "platform": { "type": "string", "description": "Platform or service the agent uses" }, "target_social_platforms": { "type": "array", "items": { "type": "string" }, "description": "Social platforms this agent operates on" }, "automation_level": { "type": "string", "enum": [ "fully_autonomous", "semi_autonomous", "scheduled", "triggered", "real_time", "continuous" ], "description": "Level of automation" }, "setup_difficulty": { "type": "string", "enum": [ "beginner", "intermediate", "advanced", "expert", "enterprise" ], "description": "How difficult it is to set up" }, "cost": { "type": "string", "enum": [ "free", "freemium", "paid", "enterprise", "custom_pricing" ], "description": "Cost structure" }, "expected_traffic_boost": { "type": "string", "description": "Expected percentage increase in traffic" }, "viral_potential": { "type": "string", "enum": [ "low", "medium", "high", "extreme", "viral_guaranteed" ], "description": "Potential for viral spread" }, "setup_time": { "type": "string", "description": "Estimated time to set up" }, "status": { "type": "string", "enum": [ "not_deployed", "setting_up", "active", "paused", "error", "viral_mode", "monitoring", "optimizing", "scaling" ], "description": "Current deployment status", "default": "not_deployed" }, "swarm_compatible": { "type": "boolean", "description": "Is this agent compatible with SwarmOS", "default": true }, "swarm_role": { "type": "string", "enum": [ "commander", "planner", "executor", "researcher", "analyst", "specialist", "coordinator", "monitor", "optimizer" ], "description": "Agent's role within the swarm" }, "success_rate": { "type": "number", "description": "Success rate of completed missions" }, "median_latency": { "type": "number", "description": "Median response time in milliseconds" }, "value_per_hour": { "type": "number", "description": "Estimated value generated per hour" }, "setup_instructions": { "type": "string", "description": "Step-by-step setup guide" }, "api_requirements": { "type": "array", "items": { "type": "string" }, "description": "Required API keys or accounts" }, "target_urls": { "type": "array", "items": { "type": "string" }, "description": "URLs this agent will promote" }, "content_types": { "type": "array", "items": { "type": "string" }, "description": "Types of content this agent creates/shares" }, "real_time_metrics": { "type": "object", "properties": { "cpu_usage": { "type": "number" }, "memory_usage": { "type": "number" }, "active_tasks": { "type": "number" }, "queue_length": { "type": "number" }, "last_heartbeat": { "type": "string", "format": "date-time" }, "error_count": { "type": "number" }, "throughput": { "type": "number" } } }, "workflow_config": { "type": "object", "properties": { "triggers": { "type": "array", "items": { "type": "string" } }, "schedule": { "type": "string" }, "dependencies": { "type": "array", "items": { "type": "string" } }, "retry_policy": { "type": "object" }, "timeout": { "type": "number" } } }, "coordination_settings": { "type": "object", "properties": { "can_coordinate_others": { "type": "boolean" }, "coordination_priority": { "type": "number" }, "collaboration_agents": { "type": "array", "items": { "type": "string" } } } }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "name", "category", "subcategory", "description", "platform" ], "description": "Agent entity" }, "Analytics": { "type": "object", "properties": { "agent_id": { "type": "string", "description": "ID of the agent that generated this data" }, "campaign_id": { "type": "string", "description": "ID of the campaign if applicable" }, "metric_type": { "type": "string", "enum": [ "traffic", "conversions", "engagement", "revenue", "clicks", "task_execution" ], "description": "Type of metric being tracked" }, "value": { "type": "number", "description": "The metric value" }, "date": { "type": "string", "description": "Date of the metric", "format": "date" }, "source_platform": { "type": "string", "description": "Where the traffic/engagement came from" }, "target_url": { "type": "string", "description": "URL that was promoted" }, "outcome": { "type": "string", "enum": [ "success", "failure", "in_progress" ], "description": "Outcome of the logged task" }, "error_details": { "type": "string", "description": "Details of any error that occurred" }, "cost_incurred": { "type": "number", "description": "Cost associated with this action (e.g., API call cost)" }, "notes": { "type": "string", "description": "Additional context about this metric" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "agent_id", "metric_type", "value", "date" ], "description": "Analytics entity" }, "Campaign": { "type": "object", "properties": { "name": { "type": "string", "description": "Campaign name" }, "description": { "type": "string", "description": "Campaign description and goals" }, "target_url": { "type": "string", "description": "Primary URL to promote (Udemy profile or RealWorldCerts)" }, "agents": { "type": "array", "items": { "type": "string" }, "description": "List of agent IDs participating in this campaign" }, "status": { "type": "string", "enum": [ "draft", "active", "paused", "completed" ], "description": "Campaign status", "default": "draft" }, "start_date": { "type": "string", "description": "When the campaign started", "format": "date" }, "end_date": { "type": "string", "description": "When the campaign should end", "format": "date" }, "target_metrics": { "type": "object", "properties": { "traffic_goal": { "type": "number" }, "conversion_goal": { "type": "number" }, "engagement_goal": { "type": "number" } } }, "budget": { "type": "number", "description": "Campaign budget if any paid agents are used" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "name", "target_url" ], "description": "Campaign entity" }, "CodeRepository": { "type": "object", "properties": { "filename": { "type": "string", "description": "Original name of the uploaded file" }, "file_uri": { "type": "string", "description": "Private file URI for secure access" }, "file_url": { "type": "string", "description": "Public file URL if applicable" }, "file_type": { "type": "string", "enum": [ "code", "config", "documentation", "data", "credentials", "other" ], "description": "Type of file uploaded" }, "programming_language": { "type": "string", "description": "Programming language if it's a code file" }, "description": { "type": "string", "description": "Description of what this file contains" }, "access_level": { "type": "string", "enum": [ "private", "swarm_internal", "public" ], "description": "Who can access this file", "default": "swarm_internal" }, "assigned_agents": { "type": "array", "items": { "type": "string" }, "description": "Agent IDs that have access to this file" }, "file_size": { "type": "number", "description": "File size in bytes" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags for easy searching" }, "is_active": { "type": "boolean", "description": "Whether this file is actively used", "default": true }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "filename", "file_type" ], "description": "CodeRepository entity" }, "ContentAsset": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of the content asset" }, "url": { "type": "string", "description": "URL to the content (e.g., YouTube Short link)", "format": "uri" }, "content_type": { "type": "string", "enum": [ "video_short", "image", "article", "tweet_template" ], "description": "The type of content", "default": "video_short" }, "source_platform": { "type": "string", "description": "The platform where the content originates", "default": "YouTube" }, "associated_courses": { "type": "array", "items": { "type": "string" }, "description": "Course names or topics this content is related to" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Descriptive tags for easy searching" }, "status": { "type": "string", "enum": [ "available", "in_use", "archived", "needs_review" ], "description": "The current status of the asset", "default": "available" }, "quality_score": { "type": "number", "description": "A score from 0-100 indicating the quality of the content, as rated by the Quality Scorer Agent." }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "title", "url", "content_type" ], "description": "ContentAsset entity" }, "CoursePromotion": { "type": "object", "properties": { "course_name": { "type": "string", "description": "Exact name of the course being promoted" }, "udemy_course_id": { "type": "string", "description": "The course ID from Udemy" }, "referral_url": { "type": "string", "description": "Full Udemy URL with referral code" }, "coupon_code": { "type": "string", "description": "Extracted coupon or referral code" }, "currency": { "type": "string", "default": "USD" }, "best_price": { "type": "number", "description": "The primary discounted price for the course" }, "min_price": { "type": "number", "description": "The minimum possible custom price" }, "max_price": { "type": "number", "description": "The maximum possible custom price" }, "coupons_remaining": { "type": "number", "description": "Number of promotional coupons left" }, "is_discounted": { "type": "boolean", "description": "Whether this course has a special offer discount" }, "promotion_status": { "type": "string", "enum": [ "pending", "claimed", "promoted", "completed" ], "description": "Current promotion status", "default": "pending" }, "assigned_agent": { "type": "string", "description": "ID of the agent assigned to promote this course" }, "promo_content": { "type": "string", "description": "Generated promotional content for this course" }, "hashtags": { "type": "array", "items": { "type": "string" }, "description": "Relevant hashtags for this course" }, "platforms_posted": { "type": "array", "items": { "type": "string" }, "description": "Platforms where this course has been promoted" }, "engagement_metrics": { "type": "object", "properties": { "views": { "type": "number" }, "clicks": { "type": "number" }, "conversions": { "type": "number" } } }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "course_name" ], "description": "CoursePromotion entity" }, "FinancialGoal": { "type": "object", "properties": { "goal_name": { "type": "string", "description": "Name of the financial goal" }, "target_amount": { "type": "number", "description": "Target amount in USD" }, "current_amount": { "type": "number", "description": "Current progress toward goal", "default": 0 }, "deadline": { "type": "string", "description": "Target completion date", "format": "date" }, "priority": { "type": "string", "enum": [ "critical", "high", "medium", "low" ], "default": "medium" }, "category": { "type": "string", "enum": [ "operational_costs", "debt_payment", "savings", "investment", "emergency_fund" ], "description": "Type of financial goal" }, "status": { "type": "string", "enum": [ "active", "completed", "paused", "overdue" ], "default": "active" }, "recurring": { "type": "boolean", "description": "Is this a recurring goal (e.g., monthly expenses)", "default": false }, "recurrence_period": { "type": "string", "enum": [ "daily", "weekly", "monthly", "quarterly", "yearly" ], "description": "How often this goal recurs" }, "notes": { "type": "string", "description": "Additional details about this goal" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "goal_name", "target_amount", "category" ], "description": "FinancialGoal entity" }, "KnowledgeEntry": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of the knowledge entry" }, "type": { "type": "string", "enum": [ "note", "link", "document", "idea", "reference" ], "description": "Type of entry", "default": "note" }, "content": { "type": "string", "description": "Main content, notes, or description" }, "url": { "type": "string", "description": "URL for links or references" }, "file_url": { "type": "string", "description": "Uploaded file URL" }, "filename": { "type": "string", "description": "Original filename if a document was uploaded" }, "category": { "type": "string", "description": "Custom category or topic" }, "tags": { "type": "array", "items": { "type": "string" }, "description": "Tags for filtering" }, "is_starred": { "type": "boolean", "description": "Starred/important entries", "default": false }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "title", "type" ], "description": "KnowledgeEntry entity" }, "Mission": { "type": "object", "properties": { "title": { "type": "string", "description": "The primary objective of the mission." }, "type": { "type": "string", "enum": [ "marketing", "research", "operations", "content_creation", "financial_simulation" ], "description": "The category or type of the mission." }, "priority": { "type": "string", "enum": [ "critical", "high", "medium", "low" ], "description": "The priority level of the mission.", "default": "medium" }, "status": { "type": "string", "enum": [ "pending", "deployed", "in_progress", "completed", "failed", "aborted" ], "description": "The current status of the mission.", "default": "pending" }, "assigned_agent_ids": { "type": "array", "items": { "type": "string" }, "description": "A list of agent IDs assigned to this mission." }, "mission_parameters": { "type": "object", "description": "Specific parameters and data required for the mission execution (e.g., URLs, keywords, financial details for simulation)." }, "progress_data": { "type": "object", "description": "Real-time data reflecting the mission's progress (e.g., percentage complete, steps finished)." }, "estimated_duration_hours": { "type": "number", "description": "The estimated time in hours to complete the mission." }, "actual_duration_hours": { "type": "number", "description": "The actual time in hours it took to complete the mission." }, "deadline": { "type": "string", "description": "The deadline for mission completion.", "format": "date-time" }, "completion_notes": { "type": "string", "description": "Notes or a summary of the mission's outcome upon completion." }, "revenue_generated": { "type": "number", "description": "Amount of revenue generated or financial impact of the mission (can be negative for costs)." }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "title", "type", "priority", "status" ], "description": "Mission entity" }, "PayoutBatch": { "type": "object", "properties": { "batch_id": { "type": "string", "description": "Unique batch identifier" }, "batch_hash": { "type": "string", "description": "SHA-256 hash of batch contents for idempotency" }, "total_amount": { "type": "number", "description": "Total amount in this batch" }, "currency": { "type": "string", "default": "USD" }, "status": { "type": "string", "enum": [ "pending_approval", "approved", "submitted_to_paypal", "processing", "completed", "failed", "cancelled" ], "description": "Current batch status", "default": "pending_approval" }, "approved_by": { "type": "string", "description": "Email of user who approved this batch" }, "approved_at": { "type": "string", "format": "date-time" }, "paypal_batch_id": { "type": "string", "description": "PayPal's batch ID after submission" }, "paypal_status": { "type": "string", "description": "Status from PayPal API" }, "submitted_at": { "type": "string", "format": "date-time" }, "completed_at": { "type": "string", "format": "date-time" }, "revenue_event_ids": { "type": "array", "items": { "type": "string" }, "description": "IDs of revenue events included in this batch" }, "error_message": { "type": "string" }, "retry_count": { "type": "number", "default": 0 }, "notes": { "type": "string" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "batch_id", "total_amount", "status" ], "description": "PayoutBatch entity" }, "PayoutItem": { "type": "object", "properties": { "item_id": { "type": "string", "description": "Unique item identifier" }, "batch_id": { "type": "string", "description": "Associated payout batch" }, "revenue_event_id": { "type": "string", "description": "Source revenue event" }, "recipient_type": { "type": "string", "enum": [ "paypal_email", "bank_account", "internal" ], "default": "paypal_email" }, "recipient": { "type": "string", "description": "PayPal email or account identifier" }, "amount": { "type": "number" }, "currency": { "type": "string", "default": "USD" }, "status": { "type": "string", "enum": [ "pending", "processing", "success", "failed", "refunded", "unclaimed" ], "default": "pending" }, "paypal_transaction_id": { "type": "string", "description": "PayPal's transaction ID" }, "paypal_status": { "type": "string", "description": "Status from PayPal" }, "processed_at": { "type": "string", "format": "date-time" }, "error_message": { "type": "string" }, "note": { "type": "string", "description": "Note sent to recipient" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "item_id", "batch_id", "recipient", "amount", "status" ], "description": "PayoutItem entity" }, "RevenueEvent": { "type": "object", "properties": { "event_id": { "type": "string", "description": "Unique identifier for this revenue event" }, "event_hash": { "type": "string", "description": "SHA-256 hash for deduplication (source + amount + date + description)" }, "source": { "type": "string", "enum": [ "mission_completed", "affiliate_commission", "course_sale", "service_payment", "manual_entry", "agent_generated" ], "description": "Where this revenue came from" }, "source_id": { "type": "string", "description": "ID of the mission, campaign, or transaction that generated this" }, "amount": { "type": "number", "description": "Revenue amount in USD" }, "currency": { "type": "string", "default": "USD" }, "status": { "type": "string", "enum": [ "projected", "confirmed", "reconciled", "paid_out", "disputed", "cancelled" ], "description": "Current status of this revenue", "default": "projected" }, "confirmation_date": { "type": "string", "description": "When this revenue was confirmed as real", "format": "date-time" }, "reconciliation_key": { "type": "string", "description": "Key used to match with PayPal transactions" }, "payout_batch_id": { "type": "string", "description": "ID of payout batch this was included in" }, "notes": { "type": "string" }, "metadata": { "type": "object", "description": "Additional event-specific data" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "event_id", "source", "amount", "status" ], "description": "RevenueEvent entity" }, "SwarmCoordination": { "type": "object", "properties": { "coordination_id": { "type": "string", "description": "Unique identifier for this coordination session" }, "coordinator_agent": { "type": "string", "description": "Agent ID acting as coordinator" }, "participating_agents": { "type": "array", "items": { "type": "string" }, "description": "Agent IDs participating in coordination" }, "coordination_type": { "type": "string", "enum": [ "task_distribution", "resource_sharing", "parallel_execution", "sequential_workflow", "emergency_response" ], "description": "Type of coordination being performed" }, "objective": { "type": "string", "description": "Main objective of this coordination" }, "status": { "type": "string", "enum": [ "planning", "active", "completed", "failed", "aborted" ], "description": "Current coordination status", "default": "planning" }, "task_allocation": { "type": "object", "description": "How tasks are distributed among agents" }, "resource_requirements": { "type": "object", "properties": { "cpu_cores": { "type": "number" }, "memory_gb": { "type": "number" }, "api_calls": { "type": "number" }, "execution_time": { "type": "number" } } }, "performance_metrics": { "type": "object", "properties": { "coordination_efficiency": { "type": "number" }, "task_completion_rate": { "type": "number" }, "resource_utilization": { "type": "number" }, "communication_overhead": { "type": "number" } } }, "communication_log": { "type": "array", "items": { "type": "object", "properties": { "timestamp": { "type": "string", "format": "date-time" }, "from_agent": { "type": "string" }, "to_agent": { "type": "string" }, "message_type": { "type": "string" }, "content": { "type": "string" } } } }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "coordination_id", "coordinator_agent", "coordination_type", "objective" ], "description": "SwarmCoordination entity" }, "TransactionLog": { "type": "object", "properties": { "transaction_type": { "type": "string", "enum": [ "income", "expense", "transfer", "withdrawal" ], "description": "Type of transaction" }, "amount": { "type": "number", "description": "Transaction amount in USD" }, "currency": { "type": "string", "default": "USD" }, "description": { "type": "string", "description": "What this transaction was for" }, "category": { "type": "string", "enum": [ "affiliate_revenue", "course_sales", "service_fee", "hosting_cost", "debt_payment", "operational_expense", "withdrawal", "other" ], "description": "Transaction category" }, "payment_method": { "type": "string", "enum": [ "paypal", "bank_transfer", "credit_card", "cash", "crypto", "other" ], "default": "paypal" }, "source": { "type": "string", "description": "Where the money came from or went to" }, "transaction_date": { "type": "string", "description": "When the transaction occurred", "format": "date-time" }, "reference_id": { "type": "string", "description": "PayPal transaction ID or other reference" }, "linked_goal_id": { "type": "string", "description": "ID of associated financial goal if applicable" }, "agent_responsible": { "type": "string", "description": "Which agent/campaign generated this revenue" }, "status": { "type": "string", "enum": [ "completed", "pending", "failed", "refunded" ], "default": "completed" }, "receipt_url": { "type": "string", "description": "Link to receipt or proof of transaction" }, "notes": { "type": "string" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "transaction_type", "amount", "description", "transaction_date" ], "description": "TransactionLog entity" }, "WorkflowExecution": { "type": "object", "properties": { "workflow_name": { "type": "string", "description": "Name of the workflow being executed" }, "trigger_type": { "type": "string", "enum": [ "manual", "scheduled", "event_triggered", "api_triggered", "agent_triggered" ], "description": "What triggered this workflow execution" }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "cancelled", "retrying" ], "description": "Current execution status", "default": "pending" }, "participating_agents": { "type": "array", "items": { "type": "string" }, "description": "Agent IDs participating in this workflow" }, "execution_steps": { "type": "array", "items": { "type": "object", "properties": { "step_name": { "type": "string" }, "agent_id": { "type": "string" }, "status": { "type": "string" }, "start_time": { "type": "string", "format": "date-time" }, "end_time": { "type": "string", "format": "date-time" }, "output": { "type": "string" }, "error_message": { "type": "string" } } } }, "start_time": { "type": "string", "description": "When execution started", "format": "date-time" }, "end_time": { "type": "string", "description": "When execution completed", "format": "date-time" }, "total_duration": { "type": "number", "description": "Total execution time in milliseconds" }, "success_metrics": { "type": "object", "properties": { "tasks_completed": { "type": "number" }, "tasks_failed": { "type": "number" }, "efficiency_score": { "type": "number" }, "resource_utilization": { "type": "number" } } }, "execution_logs": { "type": "array", "items": { "type": "string" }, "description": "Detailed execution logs" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "workflow_name", "trigger_type" ], "description": "WorkflowExecution entity" }, "User": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "admin", "user" ], "description": "The role of the user in the app" }, "email": { "type": "string", "description": "The email of the user" }, "full_name": { "type": "string", "description": "The full name of the user" }, "id": { "type": "string", "description": "Unique record identifier" }, "created_date": { "type": "string", "format": "date-time", "description": "Record creation timestamp" }, "updated_date": { "type": "string", "format": "date-time", "description": "Record last update timestamp" }, "created_by_id": { "type": "string", "description": "ID of the user who created the record" } }, "required": [ "email", "full_name", "role" ], "description": "User entity" }, "AgentConversation": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique conversation identifier" }, "agent_name": { "type": "string", "description": "Name of the agent" }, "created_by_id": { "type": "string", "description": "ID of the user who created the conversation" }, "messages": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "role": { "type": "string", "enum": [ "user", "assistant" ] }, "content": { "type": "string" } } }, "description": "List of messages in the conversation" }, "metadata": { "type": "object", "description": "Custom metadata attached to the conversation" }, "created_date": { "type": "string", "format": "date-time" }, "updated_date": { "type": "string", "format": "date-time" } }, "description": "An agent conversation with its messages" }, "AgentMessage": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique message identifier" }, "role": { "type": "string", "enum": [ "user", "assistant" ], "description": "Message role" }, "content": { "type": "string", "description": "The message text content" }, "tool_calls": { "type": "array", "nullable": true, "description": "List of tool calls made by the agent during this response", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "description": "Tool name" }, "status": { "type": "string", "enum": [ "running", "success", "error", "stopped" ] }, "results": { "description": "Tool execution results" } } } }, "usage": { "type": "object", "nullable": true, "description": "Token usage metrics for this message", "properties": { "prompt_tokens": { "type": "integer" }, "completion_tokens": { "type": "integer" }, "credits_charged": { "type": "number", "nullable": true } } }, "additional_message_params": { "type": "object", "description": "Extra metadata including timing info, tool iteration count, and bottleneck details" }, "metadata": { "type": "object", "description": "Message metadata including created_date and created_by_email" } }, "description": "A message in an agent conversation, including the agent's response with tool calls and usage metrics" } } }, "tags": [ { "name": "Entities - Agent", "description": "CRUD operations for Agent records" }, { "name": "Entities - Analytics", "description": "CRUD operations for Analytics records" }, { "name": "Entities - Campaign", "description": "CRUD operations for Campaign records" }, { "name": "Entities - CodeRepository", "description": "CRUD operations for CodeRepository records" }, { "name": "Entities - ContentAsset", "description": "CRUD operations for ContentAsset records" }, { "name": "Entities - CoursePromotion", "description": "CRUD operations for CoursePromotion records" }, { "name": "Entities - FinancialGoal", "description": "CRUD operations for FinancialGoal records" }, { "name": "Entities - KnowledgeEntry", "description": "CRUD operations for KnowledgeEntry records" }, { "name": "Entities - Mission", "description": "CRUD operations for Mission records" }, { "name": "Entities - PayoutBatch", "description": "CRUD operations for PayoutBatch records" }, { "name": "Entities - PayoutItem", "description": "CRUD operations for PayoutItem records" }, { "name": "Entities - RevenueEvent", "description": "CRUD operations for RevenueEvent records" }, { "name": "Entities - SwarmCoordination", "description": "CRUD operations for SwarmCoordination records" }, { "name": "Entities - TransactionLog", "description": "CRUD operations for TransactionLog records" }, { "name": "Entities - WorkflowExecution", "description": "CRUD operations for WorkflowExecution records" }, { "name": "Entities - User", "description": "CRUD operations for User records" }, { "name": "App Agents", "description": "Interact with app agents via conversations" } ] }