ads
POST /v1/ads/wordpress/sites
Make a one-time code that connects a WordPress site with the Zinn® Ads plugin.
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
| Name | Type | Required | What it is |
|---|---|---|---|
org_id | string | No | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
id | string | Yes | — |
org_id | string | Yes | — |
status | string<pending, active> | Yes | — |
site_host | string | Yes | — |
site_url | string | No | — |
token_hint | string | No | The token's last 4 characters. |
plugin_version | string | No | — |
wp_version | string | No | — |
cloudflare_detected | boolean | Yes | — |
click_shield_refusal | object | Yes | Why 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… |
mode | string<browser, zaraz> | Yes | — |
offer_zaraz | boolean | Yes | — |
tag_id | object | No | The site's tag in "Install on any site" (null = none for this host). |
tag_enabled | boolean | No | Whether that tag loads (browser mode sends nothing without it). |
zaraz_health | object | Yes | Zaraz-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_at | object | No | — |
last_seen_at | object | No | — |
claimed_at | object | No | — |
created_at | object | No | — |
code | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 422 · 429