connections
POST /v1/connections/{provider}
Validate or store a provider access token.
אימות
שלחו מפתח 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. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
valid | boolean | כן | — |
account_login | object | כן | The account the token authenticates as, when valid. |
scopes | string[] | כן | — |
missing_scopes | string[] | כן | 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 | כן | Human-readable explanation, or null when valid. |
permissions | PermissionReport | 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