Endpoints
Ads
Session-authenticated ad campaign draft, saved campaign, and performance endpoints.
POST
Ads endpoints power the dashboard campaign builder. They use the signed-in app session, not
X-NearIQ-Key. Ad campaign creation requires a plan with ad campaign access. Drafts are saved for review; users remain in control before publishing.
NearIQ drafts campaign structure, copy, budgets, and targeting from stored business and competitor context. Users should review and edit all ad content before publishing.
POST /api/ads/generate-draft
Generates an ad campaign draft for a selected platform and mode.google or facebook. Defaults to google.simple or advanced. Defaults to simple.Optional voice and music preference for video creative.
GET /api/ads/google/campaigns
Lists saved Google campaign drafts for the active business.POST /api/ads/google/campaigns
Saves a Google campaign draft.GET /api/ads/meta/campaigns
Lists saved Facebook and Instagram campaign drafts for the active business.POST /api/ads/meta/campaigns
Saves a Facebook or Instagram campaign draft.GET /api/ads/google/performance
Returns stored Google ads freshness and performance summaries for the active business.GET /api/ads/meta/performance
Returns stored Facebook and Instagram ads freshness and performance summaries for the active business.Errors
| Status | Meaning |
|---|---|
400 | Invalid JSON or missing campaign fields |
401 | Missing dashboard session |
403 | Plan does not include ad campaigns |
404 | No active business found |
500 | Draft generation or save failed |
503 | Connected ad account support is not configured |