links

POST /v1/content/external-sites

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

Bütün links nöqtələri

Doğrulama

API açarını bearer token kimi göndərin. Bu səhifə spresifikasiyada xüsusi icazə tələb etmir, buna görə də açarınıza ehtiyac duyduğu minimum səviyyədə icazə verin və güman etmək əvəzinə cavabı yoxlayın.

Təşkilatınızın identifikatorunun yerləşdiyi yer

Bu son nöqtə sorğu parametri kimi org_id qəbul edir. Onu buraxın və sorğu bütün kirayə alt ağacınızı əhatə etsin; sorğunu bir təşkilatla məhdudlaşdırmaq üçün onu göndərin.

Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.

Sınaqdan keçir

Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.

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> }'

Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın

Təfərrüatlar

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.

Parametrlər

AdTipTələb olunurNədir
org_id (query)stringXeyr

Sorğu gövdəsi

AdTipTələb olunurNədir
urlstringBəliThe site's address, e.g. `https://example.com` or `https://example.com/blog`.
usernamestringBəli
application_passwordstringBəliThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringXeyr

Cavab

AdTipTələb olunurNədir
site_idstringBəli
primary_domainstringBəli
namestringBəli
is_externalbooleanBəliAlways true here. The same site appears in `/v1/sites` badged External.
base_urlstringBəliThe address we publish to, including any path (e.g. `https://example.com/blog`).
reachablebooleanXeyrWhat 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_atstringXeyr
detailstringXeyrWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringXeyr

Bu son nöqtənin qaytara biləcəyi xətalar

401 · 403 · 422