zinn-campaigns

POST /v1/store-connect/token

The store plugin exchanges the one-time code and its PKCE verifier for a store token.

All zinn-campaigns endpoints

All developer docs →

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

Authentication

This endpoint is public. It takes no credential and no organisation — it is what our own marketing site and AI answer engines read.

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/store-connect/token \
  -H "Content-Type: application/json" \
  -d '{ "code": <string>, "code_verifier": <string>, "site_url": <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

⛔ No session: server to server from the store. The code is claimed with one conditional write before anything else is checked, so it works once; a wrong verifier or another site burns it. Unknown, used, expired and mismatched codes are one answer (422 codeInvalid). Re-connecting a store retires its old token in the same step. The token (zou_…) is returned ONCE; we keep its SHA-256. Audit action store_connect.connected.

Request body

NameTypeRequiredWhat it is
codestringYes—
code_verifierstringYes—
site_urlstringYes—
site_uuidstringNo—
plugin_versionstringNo—
wp_versionstringNo—
integrationsstring[]No—
platformobjectNoReported facts such as the WooCommerce version; scalars only.
clientstring<zinn-order-updates, zinn-campaigns>NoMust match the client the code was approved for. A store holds one active token per plugin; re-connecting one plugin revokes only its own earlier token.

Response

NameTypeRequiredWhat it is
tokenstringYeszou_… — store it; it is never shown again.
connectionStoreConnectStatusYes—

Errors this endpoint can return

422 · 429