Skip to Content
Messages

Send a template

POST
/partner/messages

Sends an approved template to to on behalf of a sub-customer (customer_id or external_id). In order: the customer must be active (409 PARTNER_CUSTOMER_SUSPENDED); the recipient must not have opted out of every customer or of this one (422 RECIPIENT_OPTED_OUT); the template must be approved on the sending number's account (422); the customer's daily limit must not be reached (429 PARTNER_DAILY_LIMIT); then the template's cost in credits is reserved (402 INSUFFICIENT_CREDITS) and the message is queued, all in one transaction. The reservation is consumed when Meta reports the message sent (or delivered or read) and released when it fails, exactly once. The customer's display_name fills the template's company-name variable unless variables gives it. The Idempotency-Key header is required and unique per provider for good: the same key returns the first send (200), a different request with it is 409 IDEMPOTENCY_KEY_REUSED. A number connected through Messora's Meta app also needs your workspace's message balance: without one, 402 MESSAGE_BALANCE_EXHAUSTED.

Scope: one of partner.manage, partner.send. Rate limit: 300 requests per minute per API key.

Authorization

headerAuthorizationBearer <msk_live_…>

An API key created under API keys in the panel: Authorization: Bearer msk_live_…. The key's scopes decide which operations it may call.

Scope: partner.manage

Header Parameters

Idempotency-Key*string

Required, unique per provider for good. A send repeated with the same key returns the first send instead of sending again; the same key with a different request is 409 IDEMPOTENCY_KEY_REUSED.

Length8 <= length <= 200

Request Body

application/json
  1. body

Give the sub-customer as customer_id or external_id (one of them).

customer_id?string
Formatuuid
external_id?string
Length1 <= length <= 128
header_media?

The file of an image, video or document header.

phone_number_id?string

The sending number, when the provider has several (GET /partner/numbers); by default its only number in notification mode, else the default number.

Formatuuid
template*
to*string

The recipient in international format, e.g. +905551112233.

Length7 <= length <= 32
variables?

Text values of the template's variables by name ({{first_name}}) or number ({{1}}), as GET /partner/templates lists them. The company-name variable may be left out (the customer's display name fills it). buttons fills URL buttons with a variable, by button position ("0", "1").

Response Body

The send made earlier with this Idempotency-Key

application/json
  1. response
data*
meta*
Example Request
curl -X POST 'https://app.messora.tech/api/v1/partner/messages' \  -H 'Idempotency-Key: invoice-1042-2026-12' \  -H 'Content-Type: application/json' \  -d '{  "external_id": "acc-1042",  "template": {    "language": "tr",    "name": "invoice_ready"  },  "to": "+905551112233",  "variables": {    "body": {      "2": "1 Aralık"    }  }}'
Example Response
{  "data": {    "created_at": "2026-12-02T09:00:00Z",    "credits": {      "amount": 2,      "state": "reserved",      "unlimited": false    },    "customer": {      "display_name": "Yıldız Muhasebe",      "external_id": "acc-1042",      "id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000001"    },    "delivered_at": null,    "error": null,    "failed_at": null,    "id": "019a8c2e-4f1b-7a00-9c3d-5e7a10000501",    "phone_number_id": "019a8c2e-4f1b-7a04-9c3d-5e7a10000004",    "read_at": null,    "sent_at": null,    "status": "queued",    "template": {      "language": "tr",      "name": "invoice_ready"    },    "to": "+905551112233",    "wamid": null  },  "meta": {    "request_id": "019a8c2e-4f1b-7fff-9c3d-5e7a1000ffff"  }}