Skip to main content

Developer overview

Everything you can do in the FYAI web app is backed by a set of REST APIs. You can call the same APIs from your own code, scripts, CI pipelines and AI coding tools. This section covers how.

Ways to work with FYAI programmatically​

You want to…UsePage
Call FYAI from a script, backend service or CI jobThe REST APIs with an API keyPlatform API, Common API tasks
Get a credential for codeAn API key from Settings → API KeysAuthentication
Let an AI assistant (Claude Code, Claude Desktop, VS Code Copilot) manage and run your FYAI agents, workflows and knowledgeThe FYAI platform MCP serverPlatform MCP server, MCP tool reference
Hand a task or workflow run from Claude Code to an FYAI agent and get told when it finishesThe delegation tools in the platform MCP serverDelegating from Claude Code
React live to changes in your project (an agent was edited, a workflow was created)The events WebSocketPlatform API
Start a workflow when something happens in another systemAn inbound webhookWebhooks, Triggering workflows with webhooks
Tell agents which GitHub repositories they work onThe FYAI GitHub App and Settings → RepositoriesGitHub repositories
Give your agents tools from external MCP servers, or expose tools through a governed endpointThe MCP GatewayMCP Gateway

The public API hosts​

FYAI is split into services. Each has its own host, and each owns a different part of the platform:

ServiceBase URLWhat it owns
Agenthttps://agent.fyai.co.nzAgents, teams, LLM configs (models), functions, chat sessions, running agents, executing workflows, test cases, observability, usage, promotions
Cataloghttps://catalog.fyai.co.nzWorkflow definitions, missions, programs, knowledge bases and documents, agent memory, data sources, dashboards, elements, manifests, execution environments, webhooks, workflow schedules, repositories
Integrationhttps://integration.fyai.co.nzIntegrations, integration secrets, access grants and sharing, integration templates
Authhttps://auth.fyai.co.nzAPI keys, organisations, projects, users and roles

The web app itself is at https://fyai.co.nz. The full breakdown, conventions and error codes are in Platform API.

Quick start​

  1. In the web app, open Settings. Under My account, select API Keys.

  2. Select Create Key, give it a Key Name, choose an Expiry and Access level, then select Create.

  3. Copy the key from the API Key Created dialog. It starts with fyai_ and you can't see it again.

  4. Call any API with the key in the X-API-Key header:

    curl -H "X-API-Key: $FYAI_API_KEY" https://agent.fyai.co.nz/agents

    This returns the agents in the project the key belongs to.

From there, Common API tasks walks through creating and running an agent, starting a workflow and ingesting documents.

Things to know up front​

  • Everything is scoped to one project. A credential always acts inside one organisation and one project, and every list, create and run happens there. You never pass a tenant or project ID in a request. See Authentication.
  • Access follows project roles. An API key carries one of four access levels (Run, Read, Write, Admin), which map to the project roles described in Members and roles.
  • Long-running work is asynchronous. Agent runs, workflow runs and document ingestion can take minutes. Use the asynchronous endpoints and poll, rather than holding a request open. See Platform API.
  • There's no public OpenAPI explorer. The /docs and /openapi.json paths aren't exposed on the public hosts. This section and the MCP tool reference document the endpoints customers use.