links

POST /v1/content/external-sites

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

جميع نقاط نهاية links

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API) كرمز حامل (bearer token). لا يحدد نقطة النهاية هذه إذنًا محددًا في المواصفات، لذا امنح مفتاحك الحد الأدنى الذي محتاجه وتحقق من الاستجابة بدلاً من الافتراض.

حيث يتم إدخال معرف مؤسستك

تأخذ نقطة النهاية هذه 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

التفاصيل

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