links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
Autentikasi
Kirimkan kunci API sebagai token bearer. Titik akhir ini tidak menyatakan izin tertentu dalam spesifikasi, jadi berikan kunci Anda izin minimum yang diperlukan dan periksa responsnya alih-alih berasumsi.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
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> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
org_id (query) | string | Tidak | — |
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
url | string | Ya | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Ya | — |
application_password | string | Ya | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | Tidak | — |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
site_id | string | Ya | — |
primary_domain | string | Ya | — |
name | string | Ya | — |
is_external | boolean | Ya | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Ya | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | Tidak | 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 | Tidak | — |
detail | string | Tidak | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | Tidak | — |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 422