links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Sehemu hii ya mwisho haitaji ruhusa maalum katika maelezo, kwa hivyo ipe ufunguo wako kiwango cha chini kabisa kinachohitajika na uangalie jibu badala ya kukisia.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
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> }'Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
org_id (query) | string | Hapana | — |
Mwili wa ombi
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
url | string | Ndiyo | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | Ndiyo | — |
application_password | string | Ndiyo | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | Hapana | — |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
site_id | string | Ndiyo | — |
primary_domain | string | Ndiyo | — |
name | string | Ndiyo | — |
is_external | boolean | Ndiyo | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | Ndiyo | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | Hapana | 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 | Hapana | — |
detail | string | Hapana | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | Hapana | — |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 422