connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie connections.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
With `validate_only` the token is checked and nothing is stored, and the result is returned with 200 **even when the token is invalid** — an invalid token is an answer the caller renders, not a request error. Without it the token is re-validated and then stored in Vault, returning 201; a token that fails validation is rejected with `TOKEN_INVALID` and never persisted. The token itself is never logged or echoed. Requires `connections.manage`.
Parameters
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
provider (path) | ConnectionProvider | Ja | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Nee | Which organization this connected account belongs to. Required when the caller manages connections for more than one — a reseller or an agency by construction — because a creden… |
Idempotency-Key (header) | string | Nee | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
valid | boolean | Ja | — |
account_login | object | Ja | The account the token authenticates as, when valid. |
scopes | string[] | Ja | — |
missing_scopes | string[] | Ja | Required scopes the token lacks. Empty when the token is valid, and also empty when the provider could not enumerate its permissions — in that case the connection is usable but… |
message | object | Ja | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Nee | The per-permission checklist, exercised against the provider. ⛔ `null` means **we cannot test this provider's permissions** — it does not mean "nothing is required". The two rea… |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422 · 429 · 503