links

POST /v1/content/external-sites

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

Wszystkie punkty końcowe links

Wszystkie dokumentacje dla programistów

Uwierzytelnianie

Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.

Miejsce na identyfikator organizacji

Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.

Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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.

Parametry

NazwaTypWymaganeCo to jest
org_id (query)stringNie

Treść żądania

NazwaTypWymaganeCo to jest
urlstringTakThe site's address, e.g. https://example.com or https://example.com/blog.
usernamestringTak
application_passwordstringTakThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringNie

Odpowiedź

NazwaTypWymaganeCo to jest
site_idstringTak
primary_domainstringTak
namestringTak
is_externalbooleanTakAlways true here. The same site appears in /v1/sites badged External.
base_urlstringTakThe address we publish to, including any path (e.g. https://example.com/blog).
reachablebooleanNieWhat 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_atstringNie
detailstringNieWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringNie
backupobjectTakWhether we can back this site up, and whether we can put it back. Served on the list so a screen showing a customer's whole external estate makes one request rather than one per…

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 422