links

POST /v1/content/external-sites

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

Alle links-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.

Waar je organisatie-id komt te staan

Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.

Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.

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

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

Details

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.

Parameters

NaamTypeVerplichtWat dit is
org_id (query)stringNee

Aanvraaglichaam

NaamTypeVerplichtWat dit is
urlstringJaThe site's address, e.g. `https://example.com` or `https://example.com/blog`.
usernamestringJa
application_passwordstringJaThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringNee

Reactie

NaamTypeVerplichtWat dit is
site_idstringJa
primary_domainstringJa
namestringJa
is_externalbooleanJaAlways true here. The same site appears in `/v1/sites` badged External.
base_urlstringJaThe address we publish to, including any path (e.g. `https://example.com/blog`).
reachablebooleanNeeWhat 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_atstringNee
detailstringNeeWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringNee

Fouten die dit eindpunt kan retourneren

401 · 403 · 422