API Documentation
Build custom integrations with Cresva's REST API. Access forecasts, insights, and analytics programmatically.
Quick Start
Get started with the Cresva API in minutes
Get Your API Key
Generate an API key from your Cresva dashboard under Settings → API Keys.
cresva_sk_test_abc123xyz⚠️ This is an example key for demonstration purposes
Make Your First Request
Use your API key to authenticate and fetch your campaign data.
curl https://api.cresva.com/v1/campaigns \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
Handle the Response
All responses are returned in JSON format.
{
"success": true,
"data": {
"campaigns": [{
"id": "camp_123",
"name": "Summer Campaign 2025",
"status": "active",
"spend": 12450.00,
"revenue": 42350.00,
"roas": 3.4
}]
}
}API Endpoints
Core endpoints for building integrations
/v1/campaignsList all campaigns across connected ad platforms
/v1/forecastsGet revenue forecasts with confidence intervals
/v1/queryAsk natural language questions about your data
/v1/insightsGet AI-generated insights and recommendations
/v1/analyticsRetrieve cross-channel analytics and metrics
/v1/mmmAccess Marketing Mix Modeling results
Authentication
Secure your API requests with Bearer tokens
Bearer Token Authentication
Include your API key in the Authorization header of every request:
Authorization: Bearer YOUR_API_KEY
Keep Keys Secure
Never commit API keys to version control or expose them in client-side code.
Environment Keys
Use test keys for development and production keys for live data.
Rate Limits
API usage limits by plan tier
Starter
Professional
Enterprise
Rate Limit Headers
Check response headers for your current rate limit status:
SDKs & Libraries
Official client libraries for popular languages
Node.js
npm install @cresva/sdk
Python
pip install cresva