ads

PUT /v1/ads/connections/{connection_id}/product-trials

Set the free-trial length of named products (null resets to recommended).

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.

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 PUT https://api.zinndigital.com/v1/ads/connections/{connection_id}/product-trials \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "products": <object[]> }'

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.product_trials. Each named product gets its trial_days (0, 7, 14 or 30); null deletes its own choice so it follows the recommendation again. Products not named are left as they are. A product named twice (or a blank id) is a field-level 422 naming products (never refused), and nothing is saved.

Parameters

NameTypeRequiredWhat it is
connection_id (path)stringYes—

Request body

NameTypeRequiredWhat it is
productsobject[]Yes—

Response

NameTypeRequiredWhat it is
connection_idstringYes—
business_typestringYesThe account's business type ("" = not chosen); the recommendation follows it.
choicesinteger[]YesThe lengths that may be chosen
recommended_daysintegerYesOur recommended trial length for this account.
longest_daysintegerYesThe longest trial the account's products run — how long a campaign's sales verdict waits.
productsAdsProductTrial[]Yes—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429