ads
POST /v1/public/ads-wordpress/zaraz/connect
Connect the Cloudflare zone serving this site for Zaraz, from wp-admin.
Authentication
This endpoint does not take an API key. It takes its own credential, issued to the plugin or service that calls it, as a bearer token; see the description above.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
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/public/ads-wordpress/zaraz/connect \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "token": <string> }'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
za-312. Site token only; audit action ads.zaraz_connect. Among the zones the pasted token reaches, the one serving the site's host is connected exactly as the dashboard's createAdsZarazConnection does (READ and EDIT proved, nothing written). The token goes to Vault and is never stored on the site, in the database or returned. Refusals (422, refusal.adsconnect.zaraz.<code>): tokenShape, tokenRejected, permissionMissing, zoneNotFound (no reached zone serves this site), zoneNotActive (the zone's nameservers are not switched yet), rateLimited, unavailable, unexpected, vaultUnavailable.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
token | string | Yes | A Cloudflare API token with Zaraz Read + Edit on the site's zone. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
data | AdsZarazConnection | Yes | A Cloudflare zone connected for Zaraz (za-131). The token is in Vault, never here; token_hint is its last four characters. |
Errors this endpoint can return
401 · 422 · 429