links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
L'ID della tua organizzazione va qui
Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.
L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua 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> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
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.
Parametri
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
org_id (query) | string | No | — |
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
url | string | Sì | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Sì | — |
application_password | string | Sì | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | No | — |
Risposta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
site_id | string | Sì | — |
primary_domain | string | Sì | — |
name | string | Sì | — |
is_external | boolean | Sì | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Sì | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | No | 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 | No | — |
detail | string | No | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | No | — |
Errori che questo endpoint può restituire
401 · 403 · 422