Skip to content
Developers

Public API

The Fovea REST API: list and search creatives, read collections and products, and pull Meta ads performance for one workspace.

Base URL: https://api.foveahq.com/api/v1/public. Authenticate every request with an API key: Authorization: Bearer fov_.... The key decides the workspace; there is no workspace parameter.

The interactive reference (try requests in the browser) lives at api.foveahq.com/api/v1/public/docs, and the OpenAPI document at /api/v1/public/openapi.json.

Endpoints

Method + pathScopeWhat it returns
GET /mereadThe key's workspace, scopes, role and revenue_visible
GET /assets?q=&tag=&media_type=&limit=&offset=readCreatives, newest first. q matches name, description, hook, angle, style, creator, OCR text, transcript and product; every word must match. tag repeats. limit up to 100.
GET /assets/{id}readOne creative: tags, AI analysis, OCR and transcript excerpt, linked products, linked Meta ads, collections, all-time performance
GET /assets/top?metric=&days=&date_from=&date_to=&limit=readCreatives ranked by spend, roas, ctr, impressions or purchases from their linked Meta ads
GET /collections?q=&limit=readCollections with asset counts
POST /collectionswriteCreate a collection: {"name", "description"?, "asset_ids"?}
POST /collections/{id}/assetswriteAdd assets: {"asset_ids": [...]}
GET /products?q=&limit=&offset=readProducts from your Shopify catalog
GET /products/{id or handle}readA product and its creatives, best sellers first
GET /ads/summary?days=&date_from=&date_to=&ad_id=&limit=readAccount totals and top ads for a window, or one ad's window, lifetime and daily numbers

Spend, revenue, purchases and ROAS appear only for keys with the Money scope; otherwise those keys are absent from the response and revenue_visible is false.

Example

curl "https://api.foveahq.com/api/v1/public/assets/top?metric=roas&days=30&limit=5" \
  -H "Authorization: Bearer fov_your_key"
{
  "metric_used": "roas",
  "window": {"from": "2026-09-22", "to": "2026-10-21"},
  "revenue_visible": true,
  "count": 5,
  "creatives": [
    {"id": "8f2c...", "name": "UGC hook v3", "media_type": "video", "tags": ["ugc"],
     "impressions": 48210, "clicks": 1290, "ctr": 0.0268,
     "spend": 1840.5, "purchases": 61, "revenue": 7302.0, "roas": 3.97}
  ]
}

Errors

Errors use {"detail": ...}, with a code where your code should branch:

StatusCodeMeaning
401invalid_api_keyMissing, unknown, revoked or expired key, or its creator left the workspace
403insufficient_scopeThe key lacks the scope (or its creator's role lacks the permission)
403upgrade_requiredThe workspace is not on a paid plan
404-Not found in this workspace (an id from another workspace looks the same)
429rate_limitedOver 120 requests a minute; wait Retry-After seconds