API & webhooks
API overview
Which programmatic interfaces STINGIM offers, base URLs, authentication, errors and rate limits.
STINGIM exposes a few focused programmatic interfaces rather than one general-purpose REST API. Pick the one that matches your use case.
| Interface | Direction | Auth | Use it to | Status |
|---|---|---|---|---|
| Webhooks | STINGIM → your server | HMAC-SHA256 signature (X-Stingim-Signature) | React to conversations, messages, contacts, tickets, ratings, feedback, leads and AI usage | GA |
| MCP server | AI client → STINGIM | Bearer token or OAuth 2.1 | Let AI assistants search your knowledge base and read/write tickets, contacts, orders and conversations | Beta |
| Embedded workspace | Your server → STINGIM | HMAC-SHA256 signed request | Embed the agent workspace in your own admin panel; add custom side panels | Beta |
| Partner API | Partner server → STINGIM | HMAC-SHA256 signed request | Provision and manage merchants as an agency, platform or ISV | Beta, by agreement |
| Web JS SDK | Browser | Public site identifier + optional HMAC identity | Chat widget on your website | GA |
| Mobile SDKs | App | Server-issued visitor token | In-app chat | GA |
No general REST API yet
There are no merchant API keys for calling console endpoints (for example to list conversations or send messages) from your own code. The console's own /v1/* endpoints use agent session tokens and are not a supported public API — they may change without notice. If you need a capability that is not covered here, tell us at [email protected].
Base URLs
| Purpose | URL |
|---|---|
| Public APIs (MCP, OAuth, embed tokens, Partner API, channel callbacks) | https://api.stingim.com |
| Console (settings, OAuth consent, embedded workspace) | https://chat.stingim.com |
| Web widget script | https://app.stingim.com/chat-bubble/install.js |
| Real-time gateway (SDKs) | wss://msg.stingim.com |
All traffic is HTTPS/WSS only.
Signatures at a glance
Every server-to-server interface uses HMAC-SHA256 with lowercase hex output. The signed string differs:
| Interface | Header | Signed string |
|---|---|---|
| Webhooks (you verify) | X-Stingim-Signature: t=<unix>,v1=<hex> | <unix> + "." + raw body |
| Embed token (you sign) | X-Embed-Signature: v1=<hex> + X-Embed-Timestamp | <unix> + "." + raw body |
| Partner API (you sign) | X-Partner-Signature: v1=<hex> | METHOD\nPATH_AND_QUERY\nTIMESTAMP\nNONCE\nhex(sha256(body)) |
| Widget / SDK identity (you sign) | userHash / user_hash | userId or userId + ":" + exp |
Always sign and verify the raw bytes you send or receive, compare in constant time and keep secrets on your server.
Errors
Each interface documents its own error format:
| Interface | Error shape |
|---|---|
SDK / visitor endpoints (for example open-create-contact) | HTTP 200 with { "code": <non-zero>, "message": "…", "data": null }; success is code: 0. Messages follow Accept-Language. |
| Embed token | Real HTTP status with { "code": "invalid_signature", "message": "…" } |
| Partner API | Real HTTP status with { "error": { "code", "message", "details?" }, "request_id" } |
| MCP | JSON-RPC errors; tool failures as results with isError: true |
| OAuth | { "error", "error_description" } (RFC 6749) |
Rate limits
| Interface | Limit | When exceeded |
|---|---|---|
| MCP | 120 requests / minute / token; 20 write tool calls / minute / token | HTTP 429 with Retry-After: 60; write calls return the rate_limited tool error |
| MCP dynamic client registration | 10 / hour / IP | HTTP 429 |
| Embed token | 120 / minute / key | HTTP 429 rate_limited |
| Partner API | 600 requests / minute / key; 120 conversation reads / minute per partner and merchant | HTTP 429 rate_limited, Retry-After: 60 |
| Webhook endpoints | Up to 20 endpoints per project | — |
Found a mistake? Email [email protected]
