快速入门
只需几分钟即可启动并运行 ECOSIRE API
认证
通过 Authentik 或 API 密钥使用 OAuth2 来获取用于 API 访问的 JWT 不记名令牌。
拨打您的第一个电话
使用授权标头中的不记名令牌来调用任何 API 端点。
调用公开端点
应用目录是开放的:无需密钥,也无需安装任何东西。任何 HTTP 客户端都可以使用。
API模块
探索涵盖企业运营各个方面的 57 个模块
核心
金融
运营
人力资源
营销与发展
人工智能与自动化
认证
两种身份验证方法可满足您的集成需求
仅 Http Cookie
浏览器应用程序基于 cookie 的安全身份验证。令牌永远不会暴露给 JavaScript。
- 通过网络应用程序自动完成
- HttpOnly、安全、SameSite=Lax
- 7 天刷新代币轮换
不记名令牌
使用 JWT 不记名令牌进行服务器到服务器集成和 API 客户端。
API Playground
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": "user@example.com", "password": "secret" }'HTTP 代码示例
无需安装任何东西。使用你的编程语言自带的 HTTP 客户端调用 API——下面的每个请求都可以直接在线上 API 运行。
代码示例
目录、许可证和智能体工具——提供 curl、TypeScript、Python、PHP 和 Ruby 版本
1. 列出平台
应用目录中的所有平台,以及每个平台收录的应用数量和今天即可安装的应用数量。无需密钥。
curl -s "https://api.ecosire.com/api/apps/platforms" \
-H "User-Agent: my-integration/1.0"
# 200 OK — no key needed
# [
# { "platform": "odoo", "slug": "odoo", "label": "Odoo",
# "appCount": <apps listed>, "sellableCount": <ready to install today> },
# ...
# ]Webhook Events
ECOSIRE sends real-time webhook events to your server when key actions occur — payments, subscriptions, license activations, and more.
Webhook Event Tester
Explore all 8 webhook events, generate cURL commands, and verify HMAC signatures.
Checkout Completed
checkout.session.completedFired 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": "customer@company.com",
"amount_total": 24900,
"currency": "usd",
"mode": "payment",
"payment_status": "paid",
"metadata": {
"userId": "usr_01HXYZ",
"productIds": "[\"prd_01HODOOCRM\"]"
}
}
}
}All Webhook Events
| 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.
Error Codes
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 |
Rate Limit Response Headers
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)API Key Management
Create and manage API keys from your dashboard. Each key can be scoped to specific permissions and rotated independently.
Create API Keys
Generate new API keys from Dashboard → Settings → API Keys. Each key has a name, optional expiry date, and role scope.
Scoped Permissions
Keys can be scoped to read-only, read-write, or admin. Admin keys can manage other keys and access all endpoints.
Key Rotation
Rotate keys at any time without downtime. The old key remains valid for 24 hours after rotation for a smooth transition.
Usage Analytics
View per-key request counts, error rates, and last-used timestamps from the API Keys dashboard page.
Environment Keys
Maintain separate keys for development, staging, and production. Production keys log all requests for audit purposes.
Webhook Secrets
Webhook endpoints also use a separate ECOSIRE_LICENSE_SECRET for HMAC-SHA256 signature verification on license events.
Using an API Key
# 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 的常见问题
我如何获得 API 访问权限?
注册 ECOSIRE 帐户并导航至仪表板 > API 密钥以生成您的 API 凭证。所有计划均提供 API 访问权限。
有免费套餐吗?
是的,所有 ECOSIRE 帐户都包含 API 访问权限。费率限制因计划而异。免费套餐每天支持最多 1,000 个 API 调用。
支持哪些身份验证方法?
我们通过 Authentik(推荐用于 Web 应用程序)、JWT 不记名令牌(用于服务器到服务器)和 API 密钥(用于简单集成)支持 OAuth2。
你们有网络钩子支持吗?
是的,ECOSIRE 支持用于实时事件通知的 Webhooks。在仪表板 > 设置 > Webhooks 中配置 Webhook 端点。
API 正常运行时间 SLA 是什么?
我们不公布正常运行时间百分比,而是公开其背后的系统。API 以多实例冗余集群运行并配有健康检查,发布采用零停机重载而非重启,实时服务状态和事件历史可在 status.ecosire.com 查看。事件的响应承诺写在您的支持协议中,而不是一个营销数字里。
准备好构建了吗?
获取您的 API 密钥并在几分钟内开始构建集成。