اربط أنظمتك بـ Inboxy: أرسل كل أنواع رسائل واتساب، وأنشئ القوالب والحملات والرسائل المجدولة، وأدر جهات الاتصال والمحادثات والعملاء المحتملين والتذاكر والطلبات والمنتجات والـ Webhooks — بمفتاح API واحد.
مسارات /public ترجع هذا الشكل للنجاح، وباقي المسارات ترجع كائن JSON الخاص بها. كل خطأ على أي مسار بالمفتاح يأتي بالشكل الثاني دائماً، وأي حقول إضافية تكون داخل details.
المفتاح مفقود أو ملغى أو منتهي، أو المسار لا يقبل المفاتيح.
403
INSUFFICIENT_PERMISSIONS
المفتاح لا يملك الصلاحية المطلوبة.
403
SUBSCRIPTION_NOT_ACTIVE · FORBIDDEN
الباقة أو القناة لا تسمح بهذا الإجراء.
404
NOT_FOUND
المورد غير موجود في شركتك.
409
CONFLICT
حالة المورد لا تسمح بهذا الإجراء.
429
TOO_MANY_REQUESTS
60 طلباً في الدقيقة لكل مفتاح.
500
INTERNAL_ERROR
خطأ من جهتنا. أعد المحاولة لاحقاً وأرسل قيمة X-Request-Id للدعم.
الـ Webhooks
سجّل رابطاً عاماً (HTTPS) ليصلك كل ما يحدث في Inboxy لحظة حدوثه: الرسائل على كل القنوات، نقرات الأزرار، إيصالات التسليم والقراءة، التذاكر، العملاء المحتملون، وكل تغيّر في طلبات المتاجر.
اشترك بأسماء أحداث محددة، أو بـ "*" لكل شيء، أو ببادئة مثل "whatsapp.*".
نعتبر أي رد 2xx خلال 30 ثانية نجاحاً. غير ذلك نعيد المحاولة 3 مرات افتراضياً (حتى 9) بتأخير متضاعف يبدأ من ثانية.
بعد 50 فشلاً متتالياً (قابلة للتغيير) يتوقف الـ Webhook تلقائياً ونبلغ مدير الشركة. يمكنك إعادة إرسال الإخفاقات من آخر 7 أيام عبر /replay.
قد يصل الحدث نفسه أكثر من مرة عند إعادة المحاولة — استخدم الحقل id لمنع التكرار، وقارن sequence لتجاهل حدث أقدم وصل متأخراً. version يحدد شكل الحدث (v1).
curl -X GET "https://api.inboxy.chat/api/v1/whatsapp/templates" \
-H "Authorization: Bearer inboxy_your_token"
POST/api/v1/whatsapp/templatestemplates:write
Create a WhatsApp template and submit it to Meta for review
Requires templates:write permission.
محتوى الطلب
nameمطلوب
string
Lowercase letters, digits and underscores. Unique per language.
categoryمطلوب
MARKETING | UTILITY | AUTHENTICATION
languageمطلوب
string
Meta language code.
templateType
STANDARD | CAROUSEL | LIMITED_TIME_OFFER
headerType
NONE | TEXT | IMAGE | VIDEO | DOCUMENT
headerText
string
TEXT headers: up to 60 characters, at most one {{1}}.
headerExample
string
TEXT headers: sample for {{1}}. IMAGE/VIDEO/DOCUMENT headers: the media handle from POST /api/v1/whatsapp/media/upload-for-template.
headerMediaUrl
string
Media headers: the public URL of the same file, stored so every send attaches it automatically.
bodyTextمطلوب
string
Up to 1,024 characters. Variables are {{1}}, {{2}}, … in order.
bodyExamples
string[]
One sample value per body variable, in order. Meta reviews the template with these.
footerText
string
Up to 60 characters, no variables.
buttons
object[]
Up to 10 buttons.
carouselCards
object[]
CAROUSEL templates: 2–10 cards, each with a media header, body and buttons.
ltoText
string
LIMITED_TIME_OFFER: the offer headline, up to 16 characters. The offer also needs exactly one URL button in `buttons`.
ltoExpiration
string
LIMITED_TIME_OFFER: when the offer ends.
ltoCouponCode
string
LIMITED_TIME_OFFER: coupon shown on a copy-code button, placed before the URL button.
authSecurityDisclaimer
boolean
AUTHENTICATION: add "Do not share this code" (default true).
authExpirationMinutes
number
AUTHENTICATION: code lifetime shown to the customer.
variableMapping
object
Required when bodyText has variables: one entry per variable number, saying where the value comes from at send time. Types: `static` (value used as-is), `contact_field` (firstName, lastName, name, email, phone), `custom_field` (a contact custom-field key), `order_field` (last.order.total, last.order.product, last.order.status, last.order.date, last.order.shipping_address, last.order.tracking_number), `web_event_field` (a path in the triggering web event).
WhatsApp (Meta) message templates that are not archived, newest first. Filter by status, category, language or name. Requires templates:read permission.
معاملات الاستعلام
limit
integer
Page size, 1-100 (default 20).
pageSize
integer
Deprecated alias of `limit`.
cursor
string
The `meta.nextCursor` of the previous page. Opaque.
page
integer
Removed in favour of `cursor`. `page=1` is accepted; any other value is refused with 400.
status
approved | pending | rejected | paused | disabled
category
utility | marketing | authentication
language
string
For example `ar` or `en_US`.
search
string
Template name contains.
curl -X GET "https://api.inboxy.chat/api/v1/public/templates" \
-H "Authorization: Bearer inboxy_your_token"
WhatsApp analytics
GET/api/v1/whatsapp/statsanalytics:read
WhatsApp message and conversation totals
Requires analytics:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/whatsapp/stats" \
-H "Authorization: Bearer inboxy_your_token"
curl -X GET "https://api.inboxy.chat/api/v1/whatsapp/campaigns" \
-H "Authorization: Bearer inboxy_your_token"
POST/api/v1/whatsapp/campaignscampaigns:write
Create a campaign
Requires campaigns:write permission.
محتوى الطلب
nameمطلوب
string
templateIdمطلوب
string
An APPROVED template id (GET /api/v1/whatsapp/templates).
audienceمطلوب
object
Who receives the campaign. `ALL`: every opted-in contact. `TAGS`: contacts with any of `tagIds`. `CONTACTS`: exactly `contactIds` (max 5,000). `IMPORT_BATCH`: the `batchId` returned by import-audience.
templateComponents
object[]
Meta template components; omit to use the template’s saved variable mapping.
scheduledAt
string
Omit to create a draft; run it with POST /campaigns/:id/run.
curl -X GET "https://api.inboxy.chat/api/v1/whatsapp/campaigns/{id}" \
-H "Authorization: Bearer inboxy_your_token"
PUT/api/v1/whatsapp/campaigns/{id}campaigns:write
Update a draft or scheduled campaign
Requires campaigns:write permission.
معاملات المسار
idمطلوب
string
محتوى الطلب
name
string
templateId
string
audience
object
Who receives the campaign. `ALL`: every opted-in contact. `TAGS`: contacts with any of `tagIds`. `CONTACTS`: exactly `contactIds` (max 5,000). `IMPORT_BATCH`: the `batchId` returned by import-audience.
Who receives the campaign. `ALL`: every opted-in contact. `TAGS`: contacts with any of `tagIds`. `CONTACTS`: exactly `contactIds` (max 5,000). `IMPORT_BATCH`: the `batchId` returned by import-audience.
The event that starts the workflow — any webhook platform event name, e.g. "whatsapp.message.received", "ecommerce.cart.abandoned", "web_event.received".
Each node: `{ id, type, position?, label?, config?, version? }`. `type` is a registered node type (e.g. "whatsapp.send.text", "time.delay", "ticket.create"); `config` is validated per type on publish. Max 500. Easiest start: export a workflow built in the dashboard (GET …/:workflowId/export) and edit it.
edgesمطلوب
object[]
Each edge: `{ id, source, target, sourceHandle? }` referencing node ids. Max 1000.
The event that starts the workflow — any webhook platform event name, e.g. "whatsapp.message.received", "ecommerce.cart.abandoned", "web_event.received".
Each node: `{ id, type, position?, label?, config?, version? }`. `type` is a registered node type (e.g. "whatsapp.send.text", "time.delay", "ticket.create"); `config` is validated per type on publish. Max 500. Easiest start: export a workflow built in the dashboard (GET …/:workflowId/export) and edit it.
edgesمطلوب
object[]
Each edge: `{ id, source, target, sourceHandle? }` referencing node ids. Max 1000.
curl -X GET "https://api.inboxy.chat/api/v1/ecommerce/customers" \
-H "Authorization: Bearer inboxy_your_token"
GET/api/v1/ecommerce/customers/{id}ecommerce:read
Get a store customer with orders
Requires ecommerce:read permission.
معاملات المسار
idمطلوب
string
curl -X GET "https://api.inboxy.chat/api/v1/ecommerce/customers/{id}" \
-H "Authorization: Bearer inboxy_your_token"
Webhooks
GET/api/v1/webhooks/eventswebhooks:read
List webhook event types
Requires webhooks:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/webhooks/events" \
-H "Authorization: Bearer inboxy_your_token"
GET/api/v1/webhookswebhooks:read
List webhooks
Requires webhooks:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/webhooks" \
-H "Authorization: Bearer inboxy_your_token"
POST/api/v1/webhookswebhooks:write
Register a webhook
Requires webhooks:write permission.
محتوى الطلب
nameمطلوب
string
Webhook name.
urlمطلوب
string
HTTPS endpoint to receive events. Must be a public, non-private-network URL.
eventsمطلوب
string[]
Events to receive: exact names from GET /api/v1/webhooks/events, "*" for everything, or a prefix wildcard such as "whatsapp.*", "ecommerce.order.*" or "ticket.*".
maxRetries
number
Max delivery retry attempts.
fieldExclusions
string[]
Dot-separated payload paths to omit from delivered payloads (max 20).
consecutiveFailureThreshold
number
Consecutive failures (5-1000) before the webhook auto-pauses.
curl -X GET "https://api.inboxy.chat/api/v1/webhooks/{webhookId}" \
-H "Authorization: Bearer inboxy_your_token"
PUT/api/v1/webhooks/{webhookId}webhooks:write
Update a webhook
Requires webhooks:write permission.
معاملات المسار
webhookIdمطلوب
string
محتوى الطلب
name
string
Webhook name.
url
string
HTTPS endpoint to receive events.
events
string[]
Events to receive: exact names from GET /api/v1/webhooks/events, "*" for everything, or a prefix wildcard such as "whatsapp.*", "ecommerce.order.*" or "ticket.*".
status
ACTIVE | PAUSED | FAILED
Webhook status.
maxRetries
number
Max delivery retry attempts.
fieldExclusions
string[]
Dot-separated payload paths to omit from delivered payloads (max 20).
consecutiveFailureThreshold
number
Consecutive failures (5-1000) before the webhook auto-pauses.
The Inboxy catalog (products made in Inboxy and synced from stores into it), newest first. Requires products:read permission.
معاملات الاستعلام
limit
integer
Page size, 1-100 (default 20).
pageSize
integer
Deprecated alias of `limit`.
cursor
string
The `meta.nextCursor` of the previous page. Opaque.
page
integer
Removed in favour of `cursor`. `page=1` is accepted; any other value is refused with 400.
search
string
Name or SKU contains.
categoryId
string
isActive
true | false
curl -X GET "https://api.inboxy.chat/api/v1/public/products" \
-H "Authorization: Bearer inboxy_your_token"
GET/api/v1/public/products/{id}products:read
Get a product
One catalog product. Requires products:read permission.
معاملات المسار
idمطلوب
string
Resource id
curl -X GET "https://api.inboxy.chat/api/v1/public/products/{id}" \
-H "Authorization: Bearer inboxy_your_token"
Web events
GET/api/v1/web-eventsautomations:read
List web event integrations
Requires automations:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/web-events" \
-H "Authorization: Bearer inboxy_your_token"
POST/api/v1/web-eventsautomations:write
Create an integration your website posts events to
Requires automations:write permission.
محتوى الطلب
nameمطلوب
string
description
string
authTypeمطلوب
HMAC_SHA256 | API_KEY
How your site authenticates when it posts events to POST /api/webhook/web-events/:integrationId — an `X-Webhook-Signature` HMAC-SHA256 of the raw body, or the secret in `X-Api-Key`. The secret is shown in the dashboard.
autoCreateContact
boolean
Create a contact when an event matches none.
contactMapping
object
`{ phoneField, emailField, nameField?, autoCreate, enrichFields?, displayColumns? }` — which JSON fields identify the contact.
curl -X GET "https://api.inboxy.chat/api/v1/web-events/{id}" \
-H "Authorization: Bearer inboxy_your_token"
PUT/api/v1/web-events/{id}automations:write
Update an integration
Requires automations:write permission.
معاملات المسار
idمطلوب
string
محتوى الطلب
nameمطلوب
string
description
string
authTypeمطلوب
HMAC_SHA256 | API_KEY
How your site authenticates when it posts events to POST /api/webhook/web-events/:integrationId — an `X-Webhook-Signature` HMAC-SHA256 of the raw body, or the secret in `X-Api-Key`. The secret is shown in the dashboard.
autoCreateContact
boolean
Create a contact when an event matches none.
contactMapping
object
`{ phoneField, emailField, nameField?, autoCreate, enrichFields?, displayColumns? }` — which JSON fields identify the contact.
curl -X POST "https://api.inboxy.chat/api/v1/meetings/{id}/complete" \
-H "Authorization: Bearer inboxy_your_token"
POST/api/v1/meetings/{id}/cancelmeetings:write
Mark a meeting cancelled
Requires meetings:write permission.
معاملات المسار
idمطلوب
string
curl -X POST "https://api.inboxy.chat/api/v1/meetings/{id}/cancel" \
-H "Authorization: Bearer inboxy_your_token"
Account
GET/api/v1/public/usageanalytics:read
Get plan usage
Plan, billing period and usage against each plan limit (null limit = unlimited), plus API requests in the last 24 hours. Requires analytics:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/public/usage" \
-H "Authorization: Bearer inboxy_your_token"
Calendar
GET/api/v1/public/appointmentsmeetings:read
List calendar appointments
Calendar appointments, newest first. Filter by status, contact or start time. Requires meetings:read permission.
معاملات الاستعلام
limit
integer
Page size, 1-100 (default 20).
pageSize
integer
Deprecated alias of `limit`.
cursor
string
The `meta.nextCursor` of the previous page. Opaque.
page
integer
Removed in favour of `cursor`. `page=1` is accepted; any other value is refused with 400.
status
scheduled | completed | cancelled
contactId
string
startAfter
string
Starts at or after.
startBefore
string
Starts at or before.
curl -X GET "https://api.inboxy.chat/api/v1/public/appointments" \
-H "Authorization: Bearer inboxy_your_token"
Connection status of every channel (WhatsApp, Instagram, Messenger, Telegram, website chat)
Aggregate connection state for all channels (WhatsApp, Instagram, Messenger, Telegram, Widget). One request, parallel-fetched. Requires channels:read permission.
curl -X GET "https://api.inboxy.chat/api/v1/me/channels" \
-H "Authorization: Bearer inboxy_your_token"
Phone number (WhatsApp) or the channel’s recipient id. Required without `conversationId`; with one, the recipient is the conversation’s customer and this field is ignored.
scheduledForمطلوب
string
conversationId
string
recurrence
NONE | DAILY | WEEKLY | MONTHLY
payloadمطلوب
object
`{kind:"text", text}` or `{kind:"template", templateName, languageCode, bodyVariables?, components?}`. Outside the 24-hour window WhatsApp needs a template (`details.reason = window_requires_template`); a repeating message on WhatsApp, Messenger or Instagram must be a template.