links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
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
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
org_id (query) | string | Nee | — |
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
url | string | Ja | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Ja | — |
application_password | string | Ja | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | Nee | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
site_id | string | Ja | — |
primary_domain | string | Ja | — |
name | string | Ja | — |
is_external | boolean | Ja | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Ja | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | Nee | 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 | Nee | — |
detail | string | Nee | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | Nee | — |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422