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
Operations

Request

Returns a list of all scheduled jobs for your organization.

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

Responses

Success

Bodyapplication/json
jobsArray of objects(Job)
Response
application/json
{ "jobs": [ {} ] }

Request

Creates a new scheduled job.

Security
ApiKeyAuth and OrgIdAuth
Bodyapplication/jsonrequired
agentIdstring(uuid)required

Agent to assign to this job

namestringrequired

Job name

Example: "Daily Sales Report"
descriptionstring

Job description

Example: "Generate daily sales summary"
schedulestringrequired

Job schedule frequency

Enum"hourly""daily""weekly""monthly"
Example: "daily"
curl -i -X POST \
  https://hyfn.redocly.app/_mock/openapi/jobs \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE' \
  -d '{
    "agentId": "6310db44-39c9-4e4d-8b67-83c45700e545",
    "name": "Daily Sales Report",
    "description": "Generate daily sales summary",
    "schedule": "daily"
  }'

Responses

Created

Bodyapplication/json
jobobject(Job)
Response
application/json
{ "job": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "name": "Daily Sales Report", "description": "Generate daily sales summary report", "schedule": "daily", "status": "queued", "lastRunAt": "2019-08-24T14:15:22Z", "runsCount": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "agentName": "string" } }

Request

Returns details of a specific job.

Security
ApiKeyAuth and OrgIdAuth
Path
jobIdstring(uuid)required

Unique identifier for the job

Example: deaf5733-cb4c-40ec-9b59-5de3fab80a80
curl -i -X GET \
  https://hyfn.redocly.app/_mock/openapi/jobs/deaf5733-cb4c-40ec-9b59-5de3fab80a80 \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE'

Responses

Success

Bodyapplication/json
jobobject(Job)
Response
application/json
{ "job": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "name": "Daily Sales Report", "description": "Generate daily sales summary report", "schedule": "daily", "status": "queued", "lastRunAt": "2019-08-24T14:15:22Z", "runsCount": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "agentName": "string" } }

Request

Updates an existing job.

Security
ApiKeyAuth and OrgIdAuth
Path
jobIdstring(uuid)required

Unique identifier for the job

Example: deaf5733-cb4c-40ec-9b59-5de3fab80a80
Bodyapplication/jsonrequired
agentIdstring(uuid)
namestring
descriptionstring
schedulestring
Enum"hourly""daily""weekly""monthly"
statusstring
Enum"queued""running""completed""failed"
curl -i -X PATCH \
  https://hyfn.redocly.app/_mock/openapi/jobs/deaf5733-cb4c-40ec-9b59-5de3fab80a80 \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE' \
  -d '{
    "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2",
    "name": "string",
    "description": "string",
    "schedule": "hourly",
    "status": "queued"
  }'

Responses

Success

Bodyapplication/json
jobobject(Job)
Response
application/json
{ "job": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "name": "Daily Sales Report", "description": "Generate daily sales summary report", "schedule": "daily", "status": "queued", "lastRunAt": "2019-08-24T14:15:22Z", "runsCount": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "agentName": "string" } }

Request

Deletes a scheduled job.

Security
ApiKeyAuth and OrgIdAuth
Path
jobIdstring(uuid)required

Unique identifier for the job

Example: deaf5733-cb4c-40ec-9b59-5de3fab80a80
curl -i -X DELETE \
  https://hyfn.redocly.app/_mock/openapi/jobs/deaf5733-cb4c-40ec-9b59-5de3fab80a80 \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-org-id: YOUR_API_KEY_HERE'

Responses

Success - no content

Response
No content

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