Messora Partner API
The Partner API is for notification providers: software companies (an accounting package, an e-commerce platform, a booking system) that send WhatsApp notifications to their own customers' recipients, from their own number and under their own name. Your customers are sub-customers in your workspace; you give them credits, set what each template costs, and send on their behalf with one credit-checked request.
How it fits together
| Piece | What it is |
|---|---|
| Sub-customer | Your customer, as a record keyed by your own identifier (external_id), with the company name its messages carry (display_name), a status, an optional daily limit and low-credit threshold. It has no login of its own. |
| Credits | Lots with an amount and a required expiry, spent soonest expiry first. |
| Tariff | What one send of a template costs a sub-customer (per template, optionally per language; 1 credit without one, 0 makes it free). |
| Send | POST /partner/messages checks the sub-customer, the recipient, the template, the daily limit and the credits, reserves the credits and queues the message in one step. |
| Events | Webhooks for every state of a send, low and expired credits, opt-outs and replies, each naming the sub-customer. |
| Usage | GET /partner/usage: messages, credits and Meta's estimated cost per sub-customer and per period, also as CSV. |
Recipients only ever see you: messages go from your number with your
verified name, and each sub-customer's display_name fills the template's
company-name variable. Start with the onboarding guide.
Your API address
Every workspace uses the same API address; your API key tells Messora which workspace a request is for:
https://app.messora.tech/api/v1Workspaces on the Kurumsal (Enterprise) plan can also use their own address
(their sub-domain or custom domain, followed by /api/v1).
Authentication
Create a key under API keys in your workspace's panel with the Partner API scopes and send it as a bearer token:
curl https://app.messora.tech/api/v1/partner/customers \
-H "Authorization: Bearer msk_live_…"A key belongs to exactly one workspace and is shown once, when it is
created. A revoked, expired or unknown key answers 401 API_KEY_INVALID.
GET /api-keys/whoami checks a key and lists its scopes. Every Partner API
operation also needs the partner feature of your plan: without it the API
answers 403 PARTNER_NOT_ENABLED.
Scopes
Each operation states the scopes that grant it (also in
x-required-scopes); any one of them is enough. Owners and admins of the
workspace have all of them.
| Scope | Allows |
|---|---|
partner.read | Reading: sub-customers, credits, sends, opt-outs, settings, numbers, templates and usage. |
partner.manage | Everything of the Partner API: the reads, and creating and changing sub-customers, granting and adjusting credits, the tariff, opt-outs, settings, notification mode and sending. |
partner.send | Only sending: POST /partner/messages, GET /partner/messages/{messageId} and GET /partner/templates. Give it to the system that sends notifications when it should see nothing else. |
webhooks.manage | The webhook endpoints that receive the Partner API's events. |
A key without the scope gets 403 FORBIDDEN with the missing permission in
the message.
Templates
Templates belong to your WhatsApp Business account and serve every
sub-customer, so they are created with the main API: a key that creates
them also needs templates.manage. Submit one with
POST /templates;
its account_id is a number's account_id from
GET /channels/phone-numbers.
A variable named {{company_name}} carries the sub-customer's name
without a mapping. Meta's review result (approved, rejected with its
reason, paused, disabled) arrives as the template.status webhook event:
subscribe to it in standard_event_types of
POST /partner/webhook-endpoints. Approved templates appear in
GET /partner/templates.
Rate limits
Each API key may make 300 requests per minute, with bursts of up to
the same number. Every response reports the budget in RateLimit-Limit,
RateLimit-Remaining, RateLimit-Reset and RateLimit-Policy
(300;w=60); over it the API answers 429 RATE_LIMITED with
Retry-After. A workspace's plan may set another budget.
On top of that, a sub-customer with a daily_limit can send that many
messages per day (your workspace's time zone): one more is refused with
429 PARTNER_DAILY_LIMIT, its details naming the limit and when the day
ends, and Retry-After the seconds until then. Your number's quality
rating is shared by all your sub-customers; the daily limit keeps one of
them from using it up.
Idempotency
| Operation | Idempotency-Key |
|---|---|
POST /partner/messages | Required, unique per provider for good: the same key returns the first send (200), so a retry after a timeout never sends or charges twice. The same key with a different request is 409 IDEMPOTENCY_KEY_REUSED. |
POST /partner/customers/{customerId}/credits | Required: the same key returns the first grant (200) for as long as its lot exists, instead of adding credits again. |
Other POST operations | Optional: a retry with the same key and body replays the first successful response for 24 hours. |
Use a key that names the action in your system, e.g.
invoice-1042-2026-12 for a send or inv-2026-12-1042 for a grant.
Responses and errors
Successful responses wrap the result in an envelope:
{ "data": { … }, "meta": { "request_id": "01a2…" } }Errors use one format for every status:
{
"error": {
"code": "INSUFFICIENT_CREDITS",
"message": "The customer has 40 credits available",
"details": [{ "field": "available", "code": "credits", "message": "40" }]
},
"meta": { "request_id": "01a2…" }
}Branch on error.code, not on message. Besides the API's common codes
(UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR,
RATE_LIMITED, …) the Partner API has its own:
| Code | Status | When |
|---|---|---|
PARTNER_NOT_ENABLED | 403 | The workspace's plan does not include the partner feature. |
INSUFFICIENT_CREDITS | 402 | A send or a negative adjustment needs more than the available credits. |
MESSAGE_BALANCE_EXHAUSTED | 402 | A send from a number connected through Messora's Meta app while your workspace's message balance is used up. |
PARTNER_CUSTOMER_SUSPENDED | 409 | A send for a suspended sub-customer. |
IDEMPOTENCY_KEY_REUSED | 409 | An Idempotency-Key used before for a different send or grant. |
CREDIT_EXPIRY_REQUIRED | 422 | Credits without a future expires_at. |
RECIPIENT_OPTED_OUT | 422 | A send to a recipient that opted out. |
PARTNER_DAILY_LIMIT | 429 | A send over the sub-customer's daily limit. |
Every code with what to do about it: error codes.
Quote meta.request_id (also the X-Request-Id header) when you contact
support.
Pagination
List operations return at most limit items (default 50, maximum 200). When
more exist, meta.next_cursor is set: pass it as cursor to get the next
page, until it is absent. Cursors are opaque; do not build them yourself.
Webhooks
Register an HTTPS endpoint for the Partner API's events
(POST /partner/webhook-endpoints) and Messora pushes every state of a
send, low and expired credits, opt-outs and replies, each naming the
sub-customer. Deliveries are signed POSTs with Messora-Signature
(t=<unix seconds>,v1=<hex>, HMAC-SHA256 with the endpoint secret over
"<t>.<raw body>"), at least once and not ordered: drop duplicates by the
event id. The workspace's other events, such as template.status,
are added to the same endpoint with standard_event_types
(event catalogue).
Payloads and reply attribution: Webhook events.
The rest of the API
The same key calls the rest of the Messora API when its scopes allow: managing webhook endpoints and their delivery log, templates, numbers and more. See the API reference.