# Hyfn Public API Public REST API for managing your AI workforce programmatically. Create and manage AI agents, knowledge sources, scheduled jobs, track billable work tasks, and access invoices. **⚠️ SECURITY WARNING**: This API is currently in development and uses a system-wide API key. Do not use in production without implementing per-organization API keys. See documentation for details. Version: 1.0.0 License: MIT ## Servers Production server ``` https://your-domain.replit.app/api/public ``` Local development server ``` http://localhost:5000/api/public ``` ## Security ### ApiKeyAuth Your API key for authentication Type: apiKey In: header Name: x-api-key ### OrgIdAuth Your organization ID Type: apiKey In: header Name: x-org-id ## Download OpenAPI description [Hyfn Public API](https://hyfn.redocly.app/_bundle/openapi.yaml) ## Agents Manage AI agents ### List all agents - [GET /agents](https://hyfn.redocly.app/openapi/agents/listagents.md): Returns a list of all AI agents for your organization. ### Create agent - [POST /agents](https://hyfn.redocly.app/openapi/agents/createagent.md): Creates a new AI agent. ### Get agent by ID - [GET /agents/{agentId}](https://hyfn.redocly.app/openapi/agents/getagent.md): Returns details of a specific AI agent. ### Update agent - [PATCH /agents/{agentId}](https://hyfn.redocly.app/openapi/agents/updateagent.md): Updates an existing AI agent. ### Delete agent - [DELETE /agents/{agentId}](https://hyfn.redocly.app/openapi/agents/deleteagent.md): Deletes an AI agent. ## Knowledge Manage knowledge sources and documents ### List knowledge sources - [GET /knowledge](https://hyfn.redocly.app/openapi/knowledge/listknowledgesources.md): Returns a list of all knowledge sources for your organization. ### Create knowledge source - [POST /knowledge](https://hyfn.redocly.app/openapi/knowledge/createknowledgesource.md): Creates a new knowledge source. ### Get knowledge source - [GET /knowledge/{knowledgeId}](https://hyfn.redocly.app/openapi/knowledge/getknowledgesource.md): Returns details of a specific knowledge source. ### Update knowledge source - [PATCH /knowledge/{knowledgeId}](https://hyfn.redocly.app/openapi/knowledge/updateknowledgesource.md): Updates an existing knowledge source. ### Delete knowledge source - [DELETE /knowledge/{knowledgeId}](https://hyfn.redocly.app/openapi/knowledge/deleteknowledgesource.md): Deletes a knowledge source. ## Jobs Manage scheduled AI jobs ### List jobs - [GET /jobs](https://hyfn.redocly.app/openapi/jobs/listjobs.md): Returns a list of all scheduled jobs for your organization. ### Create job - [POST /jobs](https://hyfn.redocly.app/openapi/jobs/createjob.md): Creates a new scheduled job. ### Get job - [GET /jobs/{jobId}](https://hyfn.redocly.app/openapi/jobs/getjob.md): Returns details of a specific job. ### Update job - [PATCH /jobs/{jobId}](https://hyfn.redocly.app/openapi/jobs/updatejob.md): Updates an existing job. ### Delete job - [DELETE /jobs/{jobId}](https://hyfn.redocly.app/openapi/jobs/deletejob.md): Deletes a scheduled job. ## Work Items Track billable AI work tasks ### List work items - [GET /work_items](https://hyfn.redocly.app/openapi/work-items/listworkitems.md): Returns a list of all billable work items for your organization. ### Create work item - [POST /work_items](https://hyfn.redocly.app/openapi/work-items/createworkitem.md): Creates a new billable work item. ### Get work item - [GET /work_items/{workItemId}](https://hyfn.redocly.app/openapi/work-items/getworkitem.md): Returns details of a specific work item. ### Update work item - [PATCH /work_items/{workItemId}](https://hyfn.redocly.app/openapi/work-items/updateworkitem.md): Updates an existing work item. Note work items are immutable by design for audit purposes. ### Delete work item - [DELETE /work_items/{workItemId}](https://hyfn.redocly.app/openapi/work-items/deleteworkitem.md): Soft-deletes a work item (maintains audit trail). ## Invoices Access invoices and billing information (read-only) ### List invoices - [GET /invoices](https://hyfn.redocly.app/openapi/invoices/listinvoices.md): Returns a list of all invoices for your organization (read-only). ### Get invoice with line items - [GET /invoices/{invoiceId}](https://hyfn.redocly.app/openapi/invoices/getinvoice.md): Returns details of a specific invoice including all line items. ## Skills Browse and execute integration actions from connected tools ### List connected integrations - [GET /skills](https://hyfn.redocly.app/openapi/skills/listskills.md): Returns a list of all integrations (skills) connected to your organization. These are third-party tools like Notion, Slack, Salesforce, etc. that your AI agents can interact with. ### List integration actions - [GET /skills/{integration}/actions](https://hyfn.redocly.app/openapi/skills/listintegrationactions.md): Returns all available actions for a specific integration. Actions are capabilities like "Create Page" in Notion or "Send Message" in Slack. ### Execute integration action - [POST /skills/{integration}/actions/{action}/execute](https://hyfn.redocly.app/openapi/skills/executeintegrationaction.md): Executes a specific action for an integration with the provided parameters. For example, create a Notion page or send a Slack message.