connections

POST /v1/connections/{provider}

Validate or store a provider access token.

Усі кінцеві точки connections

Автентифікація

Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл connections.manage; ключ без нього відхиляється з кодом 403, а не 404.

Де вказується ідентифікатор вашої організації

Цей ендпоїнт приймає org_id як параметр запиту. Залиште його порожнім, і виклик охопить увесь ваше дерево орендарів; надішліть його, щоб звузити виклик до однієї організації.

Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
  -H "Authorization: Bearer zdk_live_…"

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

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`.

Параметри

НазваТипОбов'язковеЩо це таке
provider (path)ConnectionProviderТакThe third-party provider whose connections are addressed.
org_id (query)UuidНі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НіClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Відповідь

НазваТипОбов'язковеЩо це таке
validbooleanТак
account_loginobjectТакThe account the token authenticates as, when valid.
scopesstring[]Так
missing_scopesstring[]Так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…
messageobjectТакHuman-readable explanation, or null when valid.
permissionsPermissionReport | nullНі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…

Помилки, які може повертати ця кінцева точка

401 · 403 · 422 · 429 · 503