قم ببناء عمليات تكامل قوية مع REST API الشامل الخاص بنا. أكثر من 818 نقطة نهاية، ومواصفات OpenAPI الكاملة، وTypeScript SDK.
ابدأ العمل باستخدام ECOSIRE API خلال دقائق
استخدم OAuth2 عبر مفاتيح Authentik أو API للحصول على رمز حامل JWT للوصول إلى API.
استخدم الرمز المميز لحامله في رأس التفويض للاتصال بأي نقطة نهاية لواجهة برمجة التطبيقات.
قم بتثبيت TypeScript SDK الخاص بنا لاستدعاءات واجهة برمجة التطبيقات الآمنة من النوع مع معالجة الأخطاء المضمنة.
استكشف 57 وحدة تغطي كل جانب من جوانب عمليات المؤسسة
طريقتان للمصادقة لتناسب احتياجات التكامل الخاصة بك
مصادقة آمنة تعتمد على ملفات تعريف الارتباط لتطبيقات المتصفح. لا يتم عرض الرموز المميزة أبدًا لجافا سكريبت.
استخدم الرموز المميزة لحامل JWT لعمليات التكامل من خادم إلى خادم وعملاء API.
Try any endpoint directly from your browser. Select an endpoint, fill in parameters, and send live requests to the ECOSIRE API.
/auth/loginLogin with email and password
curl -X POST \ \
"https://api.ecosire.com/api/auth/login" \ \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "password": "secret" }'Install the ECOSIRE SDK in your language of choice and explore 6 common operations with full code snippets.
Choose your language and install the ECOSIRE SDK
npm install @ecosire/sdk6 common operations with full SDK snippets
1. Authentication
Obtain a JWT token and include it in subsequent requests.
import { EcosireClient } from '@ecosire/sdk';
const client = new EcosireClient({
baseUrl: 'https://api.ecosire.com/api',
apiKey: process.env.ECOSIRE_API_KEY,
});
// Login with credentials
const session = await client.auth.login({
email: '[email protected]',
password: 'secret',
});
console.log(session.token); // JWT token
console.log(session.user); // { id, email, name, role }
// All subsequent calls auto-attach the token
const contacts = await client.contacts.list();ECOSIRE sends real-time webhook events to your server when key actions occur — payments, subscriptions, license activations, and more.
Explore all 8 webhook events, generate cURL commands, and verify HMAC signatures.
Fired when a customer completes payment in a Stripe Checkout Session.
Trigger: Customer pays for a product in the storefront. Auto-grants licenses and creates order.
Example JSON payload delivered to your webhook endpoint for checkout.session.completed.
{
"id": "evt_1ABCxyz",
"object": "event",
"type": "checkout.session.completed",
"created": 1711000000,
"data": {
"object": {
"id": "cs_live_abc123",
"object": "checkout.session",
"customer_email": "[email protected]",
"amount_total": 24900,
"currency": "usd",
"mode": "payment",
"payment_status": "paid",
"metadata": {
"userId": "usr_01HXYZ",
"productIds": "[\"prd_01HODOOCRM\"]"
}
}
}
}| Event | |
|---|---|
checkout.session.completed | |
invoice.paid | |
customer.subscription.deleted | |
customer.subscription.updated | |
charge.refunded | |
payment_intent.payment_failed | |
license.validated | |
license.activated |
Verify webhook signatures in production
Always verify the stripe-signature header for Stripe events using your STRIPE_WEBHOOK_SECRET. For license events, verify the X-License-Signature header using ECOSIRE_LICENSE_SECRET. Unverified events should be rejected with 401.
All API errors follow RFC 7807 (Problem Details for HTTP APIs). Every error includes a machine-readable code and human-readable message.
| Status | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 204 | No Content |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 422 | Unprocessable |
| 429 | Too Many Requests |
| 500 | Server Error |
{
"statusCode": 422,
"error": "Unprocessable Entity",
"message": "Validation failed",
"details": [
{ "field": "email", "message": "Invalid email address" },
{ "field": "password", "message": "Must be at least 8 characters" }
]
}حدود الاستخدام العادل لضمان استقرار واجهة برمجة التطبيقات (API) لجميع المستخدمين
| نقطة النهاية | حد السعر |
|---|---|
| POST /support | 5/min |
| POST /crm/capture | 10/min |
| POST /ecosire-ai/ask | 20/min |
| POST /licenses/validate | 30/min |
| POST /licenses/activate | 10/min |
| POST /newsletter/subscribe | 5/min |
| Authenticated endpoints | 100/min |
X-RateLimit-LimitMaximum requests allowed in the windowX-RateLimit-RemainingRequests remaining in the current windowX-RateLimit-ResetUnix timestamp when the window resetsRetry-AfterSeconds to wait before retrying (on 429)كل ما تحتاجه لبناء التكامل الخاص بك
استكشف واختبر كل نقطة نهاية باستخدام واجهة Swagger UI الخاصة بنا. جرب استدعاءات API مباشرة من متصفحك.
قم بتنزيل مواصفات OpenAPI 3.0 الكاملة بتنسيق JSON. قم بالاستيراد إلى Postman أو Insomnia أو أدواتك الخاصة.
عميل API آمن النوع مع الإكمال التلقائي ومعالجة الأخطاء ومنطق إعادة المحاولة المدمج.
Create and manage API keys from your dashboard. Each key can be scoped to specific permissions and rotated independently.
Generate new API keys from Dashboard → Settings → API Keys. Each key has a name, optional expiry date, and role scope.
Keys can be scoped to read-only, read-write, or admin. Admin keys can manage other keys and access all endpoints.
Rotate keys at any time without downtime. The old key remains valid for 24 hours after rotation for a smooth transition.
View per-key request counts, error rates, and last-used timestamps from the API Keys dashboard page.
Maintain separate keys for development, staging, and production. Production keys log all requests for audit purposes.
Webhook endpoints also use a separate ECOSIRE_LICENSE_SECRET for HMAC-SHA256 signature verification on license events.
# Pass the key as a Bearer token in the Authorization header curl https://api.ecosire.com/api/contacts \ -H "Authorization: Bearer ecos_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Or use HttpOnly cookies (browser-based auth — set automatically on login) # Cookie: ecosire_auth=<jwt_token>
الأسئلة الشائعة حول ECOSIRE API
قم بالتسجيل للحصول على حساب ECOSIRE وانتقل إلى Dashboard > API Keys لإنشاء بيانات اعتماد API الخاصة بك. الوصول إلى واجهة برمجة التطبيقات (API) متاح في جميع الخطط.
نعم، تتضمن جميع حسابات ECOSIRE إمكانية الوصول إلى واجهة برمجة التطبيقات (API). تختلف حدود الأسعار حسب الخطة. تدعم الطبقة المجانية ما يصل إلى 1000 استدعاء لواجهة برمجة التطبيقات يوميًا.
نحن ندعم OAuth2 عبر Authentik (موصى به لتطبيقات الويب)، والرموز المميزة لحامل JWT (من خادم إلى خادم)، ومفاتيح API (من أجل عمليات تكامل بسيطة).
نعم، يدعم ECOSIRE خطافات الويب لإشعارات الأحداث في الوقت الفعلي. قم بتكوين نقاط نهاية خطاف الويب في لوحة المعلومات > الإعدادات > خطافات الويب.
نحن نحافظ على وقت تشغيل بنسبة 99.9% لجميع نقاط نهاية واجهة برمجة التطبيقات. تتوفر صفحة الحالة وسجل الحوادث على الموقعstatus.ecosire.com.
احصل على مفتاح API الخاص بك وابدأ في إنشاء عمليات التكامل في دقائق.