All requests require an API key passed in the x-api-key header. Create keys in Settings → API Keys.
Base URL
https://api.roas.to/external/v1/facebookExample Request
curl -H "x-api-key: roas_your_key_here" \ "https://api.roas.to/external/v1/facebook/campaigns?start_date=2026-03-29&end_date=2026-04-05"
Read-only
Only GET requests. No writes.
EST timestamps
All dates returned in America/New_York.
Budget units
Budget fields ending in Minor use account-currency minor units.
Every performance endpoint returns both Facebook-reported metrics and your true tracked metrics side by side.
| Field | Source | Description |
|---|---|---|
fbImpressions | Facebook | Total impressions (Facebook-reported) |
fbClicks | Facebook | Total clicks (all types) |
fbLinkClicks | Facebook | Link clicks only (outbound) |
fbSpend | Facebook | Total spend in account currency |
fbReach | Facebook | Unique users reached |
fbCtr | Facebook | Click-through rate (%) |
fbCpc | Facebook | Cost per click |
fbCpm | Facebook | Cost per 1,000 impressions |
fbPurchases | Facebook | Facebook-reported purchases (pixel) |
fbPurchaseValue | Facebook | Facebook-reported purchase value |
ourConversions | ROAS.to | Conversions tracked by ROAS.to |
ourRevenue | ROAS.to | Revenue tracked by ROAS.to |
trueRoas | ROAS.to | ourRevenue / fbSpend (your real ROAS) |
trueCpa | ROAS.to | fbSpend / ourConversions (your real CPA) |
profitLoss | ROAS.to | ourRevenue - fbSpend (daily endpoint only) |
60 requests / minute
Per API key. Check response headers for remaining quota.
1,000 max per page
Use limit + offset for pagination. Default: 100.
Rate Limit Headers
| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window (60) |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
X-Timezone | Timezone of response timestamps (America/New_York) |
Error Codes
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
404 | Resource not found (or belongs to another workspace) |
405 | Method not allowed (only GET is supported) |
429 | Rate limit exceeded. Wait and retry. |
500 | Internal server error. Contact support@roas.to. |