Read in English →

SMS ও Email API + Webhook Integration Guide

CRM, ecommerce বা নিজের platform থেকে Bartago API call এবং signed webhook safely process করার architecture।

BBartago Editorial TeamResponsible messaging field guide · Updated ১ আগস্ট, ২০২৬
SMS ও Email API + Webhook Integration Guide বিষয়ক Bartago editorial illustration

API-first platform-এর সুবিধা হলো dashboard ছাড়াও ecommerce checkout, CRM, support tool বা custom app থেকে contact, campaign এবং automation চালানো যায়। কিন্তু production integration শুধু HTTP request সফল হওয়া নয়। Secret storage, tenant scope, request validation, idempotency, bounded retry এবং signed webhook verification একসঙ্গে দরকার। Bartago Swagger contract থেকে request/response shape নিন; business system-এ stable external reference রাখুন যাতে retry duplicate campaign বা message না বানায়।

01

Server-to-server boundary রাখুন

API key browser বা mobile bundle-এ নয়

Secret শুধু trusted backend বা secret manager-এ রাখুন। Least-privilege key, environment separation এবং rotation date ব্যবহার করুন। Request log-এ authorization header, SMTP secret বা contact PII mask করুন।

02

Idempotent request design করুন

Timeout মানে failure প্রমাণ নয়

Client timeout হলেও server operation সফল হতে পারে। Stable order ID, lead ID বা campaign reference দিয়ে retry করলে existing result ফেরত দিন। Network error-এ exponential backoff এবং maximum attempt রাখুন।

  • HTTPS
  • Scoped API key
  • Stable idempotency ID
  • Timeout + bounded retry
  • Structured error handling
03

Webhook verify করে দ্রুত acknowledge করুন

Signature আগে, business work পরে

Raw payload ও provider signature verify করুন, event ID deduplicate করুন এবং দ্রুত 2xx দিয়ে durable queue-তে কাজ দিন। Out-of-order event সম্ভব ধরে state transition design করুন। Secret mismatch বা stale timestamp reject করুন।

ব্যবহারিক checklist

  • Swagger contract
  • Backend-only key
  • Idempotency reference
  • Retry ceiling
  • Webhook signature
  • Replay test
মূল takeaway

Reliable integration happy-path request নয়; duplicate, timeout, replay ও out-of-order event সামলানোর contract।

শেষ কথা

প্রথমে sandbox/test workspace-এ একটি contact create, একটি message enqueue এবং একটি webhook replay test করুন। Logs-এ secret নেই এবং একই request/event দুইবারেও এক business action হচ্ছে নিশ্চিত করে production key দিন।

নিজের SIM, আপনার নিয়ন্ত্রণ—সঙ্গে দায়িত্বও আপনার।

Campaign চালুর আগে consent, mobile operator policy এবং প্রযোজ্য current নিয়ম যাচাই করুন।

১০০ free automation credit দিয়ে শুরু করুন →

সাধারণ প্রশ্ন

API key Flutter app-এ রাখব?

না। Long-lived workspace key backend-এ রাখুন; mobile app pairing/session-এর জন্য scoped short-lived mechanism ব্যবহার করুন।

Webhook দুইবার এলে?

Provider retry স্বাভাবিক। Stable event ID ও idempotent handler দিয়ে duplicate business action ঠেকান।

Sources ও editorial note

সর্বশেষ editorial review: ১ আগস্ট, ২০২৬। Product behavior release অনুযায়ী বদলাতে পারে; current documentation দেখুন।