links

POST /v1/content/external-sites

Connect a WordPress site we do not host, with an application password.

Tüm links uç noktaları

Kimlik Doğrulama

Bir API anahtarını bearer token olarak gönderin. Bu uç nokta, teknik özelliklerde belirli bir yetki belirtmemektedir; bu nedenle, varsaymak yerine anahtarınıza ihtiyaç duyduğu en az yetkiyi verin ve yanıtı kontrol edin.

Kurum kimliğinizin yazılacağı yer

Bu uç nokta, org_id parametresini bir sorgu parametresi olarak alır. Bu parametreyi dışarıda bırakırsanız çağrı tüm kiracı alt ağacınızı kapsar; çağrıyı tek bir kuruluşa daraltmak için gönderin.

Kuruluş kimliğiniz (id), kontrol panelinizdeki API anahtarları ekranında, anahtarın hemen yanında yer alır. Yaptığınız her çağrıda aynı kimlik kullanılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

curl -X POST https://api.zinndigital.com/v1/content/external-sites \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "url": <string>, "username": <string>, "application_password": <string> }'

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

Gated on `links.edit`. The credential is **verified against the site before anything is stored**: if WordPress refuses it, nothing is created and the error says what to fix. The password goes to Vault; no secret is stored on the row. Generate the application password in that site's WordPress admin under Users → your user → Application Passwords. The user needs to be able to publish posts.

Parametreler

AdTürZorunluNe olduğu
org_id (query)stringHayır

İstek gövdesi

AdTürZorunluNe olduğu
urlstringEvetThe site's address, e.g. `https://example.com` or `https://example.com/blog`.
usernamestringEvet
application_passwordstringEvetThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringHayır

Yanıt

AdTürZorunluNe olduğu
site_idstringEvet
primary_domainstringEvet
namestringEvet
is_externalbooleanEvetAlways true here. The same site appears in `/v1/sites` badged External.
base_urlstringEvetThe address we publish to, including any path (e.g. `https://example.com/blog`).
reachablebooleanHayırWhat the last check found. **`null` means we have not checked**, which is not the same as "it does not work" — an unchecked site is never rendered as broken.
checked_atstringHayır
detailstringHayırWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringHayır

Bu uç noktanın dönderebileceği hatalar

401 · 403 · 422