API Endpoints (Selected)
Base URL: Backend host (e.g., Cloud Run) — set in frontend as NEXT_PUBLIC_API_URL.
Google Ads (/api/google-ads)
- GET
/auth/url— Get OAuth authorization URL - GET
/auth/connect— Start OAuth flow - GET
/auth/available-accounts?accessToken=...— List accounts accessible by the OAuth token - GET/POST
/auth/callback— OAuth callback handler - GET
/connection-status— Connection state (requires tenant) - POST
/accounts/create— Create account from OAuth (requires tenant) - DELETE
/accounts— Remove all Google Ads accounts for org (requires tenant)
Meta Ads (/api/meta-ads)
- GET
/auth/available-accounts - GET
/auth/connect - GET
/connection-status
TikTok Ads (/api/tiktok-ads)
- GET
/auth/available-accounts - GET
/auth/connect - GET
/connection-status
Notes:
- Protected routes require Authorization Bearer and
x-organization-idheader. - See definitions in
backend/src/routes/*.tsand controllers inbackend/src/controllers/*.ts.