ads

PUT /v1/ads/connections/{connection_id}/crm-sources/{vendor}

Connect or update one CRM / sheet / call-log source and its stage mapping (za-160).

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}/crm-sources/{vendor} \
  -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.crm_source_saved (the credential is never in its metadata). A credential (token for HubSpot / Pipedrive, client_id + client_secret of the customer's own Salesforce connected app) is proven with one read, then kept in Vault only; omit it to change only the mapping. Each stage_map action and the call_action must be one of THIS account's conversion actions. A vendor refusal answers 422 with failure (CLAUDE.md §2.57) and nothing is stored. A pulled source starts a sync.

Parameters

NameTypeRequiredWhat it is
connection_id (path)stringYes—
vendor (path)string<hubspot, pipedrive, salesforce, sheet, csv, calls_csv, telnyx>Yes—

Request body

NameTypeRequiredWhat it is
namestringNo—
enabledbooleanNo—
tokenstringNo—
client_idstringNo—
client_secretstringNo—
instancestringNo—
sandboxbooleanNo—
object_typestring<Lead, Opportunity>No—
sheet_gidstringNo—
stage_mapAdsCrmStageRule[]No—
field_mapobjectNo—
currencystringNo—
consent_attestedbooleanNo—
consent_valuesstring[]No—
min_call_secondsintegerNo—
call_actionstringNo—
call_value_minorobjectNo—

Response

NameTypeRequiredWhat it is
dataAdsCrmSourceYesOne CRM / sheet / call-log source feeding offline conversions (za-160). The credential is never returned.

Errors this endpoint can return

401 · 403 · 404 · 422 · 429