Аутентификация
Передайте API-ключ в качестве маркера носителя (bearer token). Эта конечная точка не указывает конкретное разрешение в спецификации, поэтому предоставьте своему ключу минимум необходимых прав и проверьте ответ, вместо того чтобы делать предположения.
Идентификатор вашей организации
Этот эндпоинт принимает org_id в качестве параметра запроса. Оставьте его пустым, и вызов охватит все поддерево вашей аренды; передайте его, чтобы сузить область вызова до одной организации.
Идентификатор вашей организации находится на экране ключей API в вашей панели управления, рядом с самим ключом. Это один и тот же идентификатор для каждого вашего запроса.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/syndication/connections \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "channel": <string>, "name": <string>, "credentials": <object> }'Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему API, чтобы вы могли увидеть актуальный ответ. Откройте эту конечную точку в API-консоли
Подробнее
Stores the credential in Vault and the pointer on the row, then probes it immediately so the customer learns now whether it works rather than when their next article publishes. Gated on `syndication.manage`, which is a separate key from `links.edit` because this posts publicly on the customer's own brand accounts.
Параметры
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
org_id (query) | string | Нет | Which organisation to connect it for, within the caller's subtree. ⛔ Scoped by `syndication.manage`, never by the reading key — a member holding only view on a client org must n… |
Тело запроса
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
channel | string | Да | — |
name | string | Да | — |
credentials | object | Да | Every value the channel's `fields` name. The secret half goes to Vault and is never returned. |
byo | boolean | Нет | — |
Ответ
| Имя | Тип | Обязательно | Что это |
|---|---|---|---|
id | string | Да | — |
channel | string | Да | — |
name | string | Да | The customer's own name for it. ⛔ `name` on the wire, `label` on the model: `Field.label` is DRF's own attribute and shadowing it is silent at runtime. |
target | string | Да | The non-secret half — a handle, an instance, a board id. |
status | string<unverified, ready, needs_reconnect, error> | Да | ⛔⛔ `needs_reconnect` is NOT a failure — the credential lapsed and only the customer can fix it. `unverified` means we have not looked, which is a third fact and not a quiet green. |
account_ref | string | Да | The account the VENDOR said this credential belongs to — discovered. |
verify_error | string | Да | A machine code the dashboard turns into copy. Never a sentence. |
verified_at | string | Да | — |
expires_at | string | Да | ⛔ `null` means **no stated expiry**, which is a different fact from "never expires" and must not render as an unqualified green. |
byo | boolean | Да | Whether the customer supplied their own developer app. |
created_at | string | Да | — |
Ошибки, которые может возвращать этот эндпоинт
401 · 403 · 422