API Reference
The Foil API provides programmatic access to traces, alerts, analytics, and more.Base URL
Authentication
Foil supports two authentication methods:JWT Bearer Token
For dashboard and user-authenticated requests:API Key
For SDK and programmatic access:Rate Limits
Rate limit headers are included in responses:
Response Format
All responses are JSON with consistent structure:Success Response
Error Response
Common Error Codes
Pagination
List endpoints support pagination:
Response includes pagination info:
Date Filtering
Most endpoints accept date filters:YYYY-MM-DD or YYYY-MM-DDTHH:mm:ssZ
Core Endpoints
Users
Authentication
API Keys
Spans & Traces
Signals
Agents
Alerts
Analytics
Experiments
SDKs
For easier integration, use our official SDKs:JavaScript SDK
npm install @getfoil/foil-js
Python SDK
pip install foil-sdk