ads

POST /v1/ads/wordpress/sites

Make a one-time code that connects a WordPress site with the Zinn® Ads plugin.

All ads endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the ads.manage permission; a key without it is refused with 403, not 404.

Where your organisation id goes

This endpoint takes org_id as a field in the JSON body.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/ads/wordpress/sites \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Gated on ads.manage; audit action ads.wordpress_pairing_created. The code is shown ONCE (only its SHA-256 hash is stored) and is valid for 30 minutes. The customer pastes it into the plugin's settings page; the plugin redeems it at claimAdsWordPressSite.

Request body

NameTypeRequiredWhat it is
org_idstringNo—

Response

NameTypeRequiredWhat it is
idstringYes—
org_idstringYes—
statusstring<pending, active>Yes—
site_hoststringYes—
site_urlstringNo—
token_hintstringNoThe token's last 4 characters.
plugin_versionstringNo—
wp_versionstringNo—
cloudflare_detectedbooleanYes—
click_shield_refusalobjectYesWhy this site's paid clicks are not checked now: a site Zinn Digital® does not host needs the click-shield add-on (or a plan that carries it), and the account must be in good…
modestring<browser, zaraz>Yes—
offer_zarazbooleanYes—
tag_idobjectNoThe site's tag in "Install on any site" (null = none for this host).
tag_enabledbooleanNoWhether that tag loads (browser mode sends nothing without it).
zaraz_healthobjectYesZaraz-sent purchases vs network-credited, per SITE: compared only when the organisation's credit can be attributed to this site (it is the only connected WordPress site, enabled…
pairing_expires_atobjectNo—
last_seen_atobjectNo—
claimed_atobjectNo—
created_atobjectNo—
codestringYes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429