Skip to content

API Reference

The Famasi Provider API is a REST API that powers all provider operations. The MCP server wraps this API — every provider tool maps to one of these endpoints.

Base URL: https://api.famasi.ai/api/v1/providers

Version: 1.1.5

Authentication: All endpoints require an API key via the x-api-key header. See provider authentication.


Endpoints by category

Authentication (2 endpoints)

MethodPathDescription
GET/meFetch the authenticated provider’s details
POST/me/tokenRefresh the provider’s API token

Customer Management (4 endpoints)

MethodPathDescription
GET/customersFetch customers for a provider
POST/customersCreate a new customer for a provider
PUT/customers/{unique_customer_id}Edit a customer in the provider’s organisation
GET/view-customer/{customer_id}View details of a specific customer

Plan Management (2 endpoints)

MethodPathDescription
GET/plansFetch plans for a provider
POST/customers/{unique_customer_id}/plansAdd a customer to a plan

Product Management (1 endpoint)

MethodPathDescription
GET/formularySearch products in the formulary

Order Management (2 endpoints)

MethodPathDescription
GET/ordersFetch all orders for a provider
POST/ordersCreate a new order for a provider

Analytics (3 endpoints)

MethodPathDescription
GET/analyticsFetch analytics data for a provider
GET/provider-orders/analyticsFetch analytics data for provider orders
GET/orders-statsFetch statistics for provider orders

User Management (2 endpoints)

MethodPathDescription
POST/usersAdd a user to a provider
GET/profilesFetch user profiles

Provider Management (5 endpoints)

MethodPathDescription
PUT/editEdit provider information
POST/upload_logoUpload a logo for a provider
POST/update-payment-typeUpdate the preferred payment type
POST/set-low-balance-thresholdSet the low wallet balance threshold
POST/toggle-auto-debitToggle auto-debit functionality

Wallet & Transactions (3 endpoints)

MethodPathDescription
GET/wallet-balanceFetch the wallet balance of a provider
GET/virtual-accountsFetch all virtual accounts for a provider
GET/transactionsFetch the transaction history of a provider

Using the API directly vs MCP

Most providers should use the MCP server rather than calling the API directly. The MCP server:

  • Handles authentication and session management
  • Provides natural language access via AI assistants
  • Wraps each endpoint as a typed tool with validation

Direct API access is available for custom integrations where you need full control over request/response handling.


Interactive API reference

The full OpenAPI specification with request/response schemas, parameters, and example payloads is available as an interactive reference:

Import either file into your preferred API client (Postman, Insomnia, Bruno, etc.) to explore endpoints interactively.


Quick example

Terminal window
# Fetch your provider profile
curl -X GET https://api.famasi.ai/api/v1/providers/me \
-H "x-api-key: pk_live_..."
# Search the formulary
curl -X GET "https://api.famasi.ai/api/v1/providers/formulary?search=amoxicillin" \
-H "x-api-key: pk_live_..."
# Create a customer
curl -X POST https://api.famasi.ai/api/v1/providers/customers \
-H "x-api-key: pk_live_..." \
-H "Content-Type: application/json" \
-d '{"phone": "+2348012345678", "first_name": "Jane", "last_name": "Doe"}'

Rate limits

The API enforces rate limits per API key. If you receive a 429 Too Many Requests response, back off and retry after the Retry-After header value.

Provider tools reference → · Authentication → · Troubleshooting →