API Documentation

Build custom integrations with Cresva's REST API. Access forecasts, insights, and analytics programmatically.

REST API
JSON Responses
OAuth 2.0

Quick Start

Get started with the Cresva API in minutes

1

Get Your API Key

Generate an API key from your Cresva dashboard under Settings → API Keys.

Example API Key
cresva_sk_test_abc123xyz

⚠️ This is an example key for demonstration purposes

2

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"
3

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
    }]
  }
}

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

100 requests/min
Per minute
10,000/day
Daily limit

Professional

500 requests/min
Per minute
50,000/day
Daily limit

Enterprise

Custom
Per minute
Unlimited
Daily limit

Rate Limit Headers

Check response headers for your current rate limit status:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1698765432

SDKs & Libraries

Official client libraries for popular languages

Node.js

Available
npm install @cresva/sdk

Python

Available
pip install cresva

Ruby

Coming Soon

PHP

Coming Soon