links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
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
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id (query) | string | Nie | — |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
url | string | Tak | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Tak | — |
application_password | string | Tak | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | Nie | — |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
site_id | string | Tak | — |
primary_domain | string | Tak | — |
name | string | Tak | — |
is_external | boolean | Tak | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Tak | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | Nie | What 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_at | string | Nie | — |
detail | string | Nie | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | Nie | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422