Skip to content

Hyfn Public API (1.0.0)

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.

Download OpenAPI description
Languages
Servers
Mock server

https://hyfn.redocly.app/_mock/openapi/

Production server

https://your-domain.replit.app/api/public/

Local development server

http://localhost:5000/api/public/

Operations

Knowledge

Manage knowledge sources and documents

Operations

Request

Returns a list of all knowledge sources for your organization.

Security
ApiKeyAuth and OrgIdAuth
curl -i -X GET \
  https://hyfn.redocly.app/_mock/openapi/knowledge \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/json
knowledgeSourcesArray of objects(KnowledgeSource)
Response
application/json
{ "knowledgeSources": [ {} ] }

Request

Creates a new knowledge source.

Security
ApiKeyAuth and OrgIdAuth
Bodyapplication/jsonrequired
typestringrequired

Type of knowledge source

Enum"website""document"
Example: "website"
sourcestringrequired

URL for websites or filename for documents

Example: "https://docs.example.com"
agentIdstring(uuid)

Optional agent ID

metadataobject

Additional metadata

curl -i -X POST \
  https://hyfn.redocly.app/_mock/openapi/knowledge \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE' \
  -d '{
    "type": "website",
    "source": "https://docs.example.com"
  }'

Responses

Created

Bodyapplication/json
knowledgeSourceobject(KnowledgeSource)
Response
application/json
{ "knowledgeSource": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "type": "website", "source": "https://docs.example.com", "status": "pending", "lastSyncedAt": "2019-08-24T14:15:22Z", "metadata": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }

Request

Returns details of a specific knowledge source.

Security
ApiKeyAuth and OrgIdAuth
Path
knowledgeIdstring(uuid)required

Unique identifier for the knowledge source

Example: 8e3bd21d-dc1b-4565-82a5-274efc6ab411
curl -i -X GET \
  https://hyfn.redocly.app/_mock/openapi/knowledge/8e3bd21d-dc1b-4565-82a5-274efc6ab411 \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/json
knowledgeSourceobject(KnowledgeSource)
Response
application/json
{ "knowledgeSource": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "type": "website", "source": "https://docs.example.com", "status": "pending", "lastSyncedAt": "2019-08-24T14:15:22Z", "metadata": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }

Request

Updates an existing knowledge source.

Security
ApiKeyAuth and OrgIdAuth
Path
knowledgeIdstring(uuid)required

Unique identifier for the knowledge source

Example: 8e3bd21d-dc1b-4565-82a5-274efc6ab411
Bodyapplication/jsonrequired
typestring
Enum"website""document"
sourcestring
agentIdstring or null(uuid)
statusstring
Enum"pending""processing""completed""failed"
metadataobject
curl -i -X PATCH \
  https://hyfn.redocly.app/_mock/openapi/knowledge/8e3bd21d-dc1b-4565-82a5-274efc6ab411 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE' \
  -d '{
    "type": "website",
    "source": "string",
    "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",
    "status": "pending",
    "metadata": {}
  }'

Responses

Success

Bodyapplication/json
knowledgeSourceobject(KnowledgeSource)
Response
application/json
{ "knowledgeSource": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "type": "website", "source": "https://docs.example.com", "status": "pending", "lastSyncedAt": "2019-08-24T14:15:22Z", "metadata": {}, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } }

Request

Deletes a knowledge source.

Security
ApiKeyAuth and OrgIdAuth
Path
knowledgeIdstring(uuid)required

Unique identifier for the knowledge source

Example: 8e3bd21d-dc1b-4565-82a5-274efc6ab411
curl -i -X DELETE \
  https://hyfn.redocly.app/_mock/openapi/knowledge/8e3bd21d-dc1b-4565-82a5-274efc6ab411 \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE'

Responses

Success - no content

Response
No content
Operations

Work Items

Track billable AI work tasks

Operations

Invoices

Access invoices and billing information (read-only)

Operations

Skills

Browse and execute integration actions from connected tools

Operations