SIGNUP

Ads

Connect an ad platform and read its spend back through AHOOK. In v1 that is the whole product: connection plus read-only spend sync. The scopes are read-only, so AHOOK reads spend — it does not create, edit, or publish ads.

  1. Connect Meta

    Store the Meta app’s client secret in the vault first, then create the connection with POST /api/v1/ads/connections. It returns an authorize URL: complete it in Meta and the connection goes active. One connection per group and platform in v1.

  2. Sync spend

    POST /api/v1/ads/connections/<connection_id>/sync pulls the month’s campaign spend from Meta insights into the same ad-costs store as manual entries and CSV uploads.

  3. Read it back

    One stored row per group, month, channel, subchannel, campaign, and subject — a re-pull is idempotent and a key already held by a manual or CSV row is skipped, never double-entered.

Quickstart

curl https://ahook.app/api/v1/ads/platforms?platform=meta
# -> read-only scopes, authorize/token URLs, setup steps
curl -X POST https://ahook.app/api/v1/ads/connections -H "Authorization: Bearer <key>" -d '{"platform":"meta","group_id":"<group_id>","client_id":"<client_id>","client_secret_vault_secret_id":"<vault_secret_id>"}'
# -> 201 {"connection": {...}, "authorize_url": "<authorize_url>", "state_expires_in": 600}
curl -X POST https://ahook.app/api/v1/ads/connections/<connection_id>/sync -H "Authorization: Bearer <key>" -d '{"month":"2026-11"}'

Agent Quickstart

Connect Meta ads to AHOOK for my business and sync campaign spend, read-only. Get yourself an account from https://ahook.app. Read https://ahook.app/llms.txt and follow the steps for agents.