links

POST /v1/content/external-sites

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

ټول links پای ټکي

تصدیق‌هویت

د بیارر ټوکن په توګه یو API کي وسپارئ. دا پای ټکی په مشخصاتو کې کوم ځانګړی اجازه لیک نه بیانوي، نو خپل کیلي ته لږترلږه هغه څه ورکړئ چې ورته اړتیا لري او د فرض کولو پر ځای ځواب وپلټئ.

چیرته چې ستاسو د سازمان آی ډي ځي

دا پای ټکی د پوښتنې پیرامیتر په توګه org_id اخلي. دا پریږدئ او زنګ ستاسو د استوګنې ټولې څانګې پوښي؛ د یوې سازمان لپاره د زنګ محدودولو لپاره یې واستوئ.

ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.

هڅه وکړئ

د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.

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

ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ

تفصیلات

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.

پارامترونه

نومډولاړیندا څه شی دی
org_id (query)stringنه

د غوښتنې بدن

نومډولاړیندا څه شی دی
urlstringهوThe site's address, e.g. `https://example.com` or `https://example.com/blog`.
usernamestringهو
application_passwordstringهوThe application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed.
namestringنه

ځواب

نومډولاړیندا څه شی دی
site_idstringهو
primary_domainstringهو
namestringهو
is_externalbooleanهوAlways true here. The same site appears in `/v1/sites` badged External.
base_urlstringهوThe address we publish to, including any path (e.g. `https://example.com/blog`).
reachablebooleanنه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_atstringنه
detailstringنهWhat the site said last time, verbatim. Shown on the site's own screen.
detected_identitystringنه

تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي

401 · 403 · 422