API Reference

Complete documentation for all Ferni Developer Platform v2 endpoints.

Base URL https://api.ferni.ai/api/v2/developers

Authentication Required

All endpoints require authentication via Authorization: Bearer pk_live_xxx header. Get your API key from the Getting Started guide.

MCP Servers

Register and manage external Model Context Protocol servers.

Method Endpoint Description
POST /mcp-servers Register a new MCP server
GET /mcp-servers List all your MCP servers
GET /mcp-servers/:id Get server details
PUT /mcp-servers/:id Update server configuration
DELETE /mcp-servers/:id Delete a server
POST /mcp-servers/:id/test Test server connection
GET /mcp-servers/:id/tools List discovered tools

Custom Tools

Create webhook, MCP, or prompt-based tools for voice agents.

Method Endpoint Description
POST /tools Create a new tool
GET /tools List all your tools
GET /tools/:id Get tool details
PUT /tools/:id Update tool configuration
DELETE /tools/:id Delete a tool
POST /tools/:id/test Test tool execution

Webhooks

Subscribe to real-time events from voice agent sessions.

Method Endpoint Description
POST /webhooks Create a webhook subscription
GET /webhooks List all your webhooks
GET /webhooks/:id Get webhook details
PUT /webhooks/:id Update webhook configuration
DELETE /webhooks/:id Delete a webhook
POST /webhooks/:id/test Send a test event
GET /webhooks/:id/logs View delivery logs

Workflows

Build multi-step automations with branching and parallel execution.

Method Endpoint Description
POST /workflows Create a new workflow
GET /workflows List all your workflows
GET /workflows/:id Get workflow details
PUT /workflows/:id Update workflow definition
DELETE /workflows/:id Delete a workflow
POST /workflows/:id/execute Execute workflow
POST /workflows/:id/test Test workflow (dry run)
GET /workflows/:id/executions List execution history

Activities

Track custom metrics and query historical activity data.

Method Endpoint Description
POST /activities Log a new activity
GET /activities Query activities
GET /activities/stats Get aggregate statistics
GET /activities/:id Get activity details
PUT /activities/:id Update activity
DELETE /activities/:id Delete activity

OAuth

Integrate external services using your own OAuth applications.

Method Endpoint Description
POST /oauth/providers Register OAuth provider
GET /oauth/providers List providers
GET /oauth/providers/:id Get provider details
PUT /oauth/providers/:id Update provider
DELETE /oauth/providers/:id Delete provider
POST /oauth/authorize Start OAuth flow
GET /oauth/callback OAuth callback
GET /oauth/tokens List tokens
DELETE /oauth/tokens/:id Revoke token