links
POST /v1/content/external-sites
Connect a WordPress site we do not host, with an application password.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (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 | لا | — |
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
url | string | نعم | The site's address, e.g. `https://example.com` or `https://example.com/blog`. |
username | string | نعم | — |
application_password | string | نعم | The application password WordPress generated. Spaces are ignored, so it may be pasted exactly as displayed. |
name | string | لا | — |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
site_id | string | نعم | — |
primary_domain | string | نعم | — |
name | string | نعم | — |
is_external | boolean | نعم | Always true here. The same site appears in `/v1/sites` badged External. |
base_url | string | نعم | The address we publish to, including any path (e.g. `https://example.com/blog`). |
reachable | boolean | لا | 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 | لا | — |
detail | string | لا | What the site said last time, verbatim. Shown on the site's own screen. |
detected_identity | string | لا | — |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 422