links

POST /v1/content/external-sites

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

Gbogbo àwọn links endpoints

Ìfàṣẹ́pọ̀

Fi bọ́kì kọ́kọ́ (bearer token) ránṣẹ́ gẹ́gẹ́ bí àmì ìdánimọ̀ API. Ibùdó yìí kò sọ àṣẹ pàtó kan nínú àlàyé rẹ̀, nítorí náà fún kọ́kọ́ rẹ̀ ní ohun tó kéré jù lọ tí ó nílò kí o sì ṣàyẹ̀wò ìdáhùn náà dípò kí o kàn rò ó.

Ibùdó àmì ìdánimọ̀ ilé-iṣẹ́ rẹ sí

Oju-iwọle yii nlo org_id gẹgẹbi ayẹwo ibeere. Fi silẹ ni ita yoo si bo igi iyalo rẹ lapapọ; ranṣẹ si lati dín ibeere naa kù si ajọ kan.

Id àjọ rẹ wa lórí ojú-ìwákòòkò àwọn bọ́tìnnì API nínú daṣibọọdú rẹ, lẹ́gbẹ̀ẹ́ bọ́tìnnì náà gan-an. Ó jẹ́ ìd kan náà nínú gbogbo ìpè tí o bá ṣe.

Gbiyanju rẹ

Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.

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

Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API

Àwọn kúlẹ̀kúlẹ̀

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.

Àwọn ìpìlẹ̀

OrúkọIruTí a nílòKini o jẹ
org_id (query)stringBẹẹkọ

Akoonu ibeere naa

OrúkọIruTí a nílòKini o jẹ
urlstringBẹẹniThe site's address, e.g. `https://example.com` or `https://example.com/blog`.
usernamestringBẹẹni
application_passwordstringBẹẹniThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringBẹẹkọ

Idahun

OrúkọIruTí a nílòKini o jẹ
site_idstringBẹẹni
primary_domainstringBẹẹni
namestringBẹẹni
is_externalbooleanBẹẹniAlways true here. The same site appears in `/v1/sites` badged External.
base_urlstringBẹẹniThe address we publish to, including any path (e.g. `https://example.com/blog`).
reachablebooleanBẹẹkọ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_atstringBẹẹkọ
detailstringBẹẹkọWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringBẹẹkọ

Awọn aṣiṣe ti ibudo ipari yii le da pada

401 · 403 · 422