MTE WHATSAPP API

Connect your application.
Keep the conversation moving.

Use your MTE account to send approved WhatsApp templates, read replies and track message status from your own software.

Server-to-server API · JSON over HTTPS · MTE API key

Your first integration

Your application connects to MTE directly. You do not need provider credentials in your application.

01

Prepare your account

Activate your subscription, connect WhatsApp, and make sure messaging balance is available.

02

Create an API key

In the customer portal, open API & integrations and create a key for your application.

03

Send a template

Choose an approved template and a recipient who has given permission. Then check message events for status.

Prefer to try it first? Download the Postman collection and environment. Import both into Postman Desktop and select the MTE environment. The download contains no API key.

API base URL

https://whatsapp-api.mytallyextension.com/api/v1/whatsapp

All paths below are relative to this URL. Requests and responses use JSON.

API keys & authentication

  1. Sign in to the customer portal and open API & integrations.
  2. Enter an application name and your portal password, then select Create API key.
  3. Copy and save the key securely. It is displayed only once. If it is lost, create another key and revoke the old one.
Protect your key. Every key has full access to your account’s messaging and integrations, including sending messages, managing consent and templates, and reading conversations and events. Give it only to a trusted application. Keep it in your server’s secret store; never put it in browser or mobile code, URLs, source control, screenshots or shared exports.

Send the key with every request. The examples below assume your server has supplied a secure environment variable named MTE_API_KEY.

Authorization: Bearer <your MTE API key>
Content-Type: application/json

Use a trusted backend or Postman Desktop. Requests with an Origin header are rejected. Your portal login and your MTE API key are separate credentials.

Check the connection

curl --request GET \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/connection' \
  --header "Authorization: Bearer $MTE_API_KEY"

A successful response includes connected and may include details of the connected WhatsApp number.

Request a message template

Submit a template request through MTE. WhatsApp reviews the request; the response can be pending and is not approval to send. The final category may change during review. You can also create requests in the customer portal.

curl --request POST \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/templates' \
  --header "Authorization: Bearer $MTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "order_update",
    "language": "en_US",
    "category": "UTILITY",
    "body": "Hello {{1}}, your order has shipped.",
    "bodyExamples": ["Asha"]
  }'

Use a lowercase name beginning with a letter, and provide an example for each numbered variable. If a submission result is uncertain, check the list before trying again to avoid duplicates. Check the list for the final WhatsApp status:

curl --request GET \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/templates' \
  --header "Authorization: Bearer $MTE_API_KEY"

Wait for APPROVED, then use the exact name and language to send. For template requests submitted after this feature is enabled, MTE also publishes a template status event when WhatsApp first approves or rejects the request. For earlier requests, check this list. The send example below uses a text body, an optional static footer, and positional body variables such as {{1}}. Some static button types are supported; dynamic buttons and named variables are not. Media headers require a valid media reference associated with the same account and connection. There is no API endpoint to upload media independently; contact MTE support for media integration. For a body with no variables, send an empty array []. Template availability depends on your connected account and the supported template components.

Send an approved template

Replace the recipient, template name, language and body values with your own. Each value fills the corresponding numbered variable in the approved template, in order.

curl --request POST \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/messages' \
  --header "Authorization: Bearer $MTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: REPLACE-WITH-UNIQUE-MESSAGE-ID' \
  --data '{
    "to": "919876543210",
    "type": "template",
    "templateName": "your_approved_template",
    "language": "en_US",
    "bodyParameters": ["first value", "second value"]
  }'
Prevent duplicate sends. Generate and persist a unique Idempotency-Key (for example, a UUID) for each intended message. Keys must be unique across all your applications. If the request times out, retry the exact same request with the same key—even if you rotate your API key. Do not create a new message ID until the previous outcome is known.

A successful response contains operationId, providerMessageId and status. An accepted response means the request was accepted for sending; it does not mean it was delivered.

Check an operation

Replace OPERATION_ID with the operation ID returned when sending:

curl --request GET \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/messages/OPERATION_ID' \
  --header "Authorization: Bearer $MTE_API_KEY"

The operation reports acceptance or an uncertain outcome; use message events for subsequent sent, delivered, read or failed status.

Check message status

Poll events from your backend and match providerMessageId to the one returned by the send request. Events with kind: message_status may report sent, delivered, read or failed.

curl --request GET \
  'https://whatsapp-api.mytallyextension.com/api/v1/whatsapp/events?after=0&limit=50' \
  --header "Authorization: Bearer $MTE_API_KEY"

Start with after=0. After processing a page, save its nextAfter and use it in the next request. Continue while hasMore is true, then poll for new events. Deduplicate events using their IDs.

Billing: Under the sent-confirmation billing rule, the applicable template-category amount is reserved while confirmation is pending. It is charged when sending is confirmed; a confirmed failure before sending releases the reservation. Delivered or read status also confirms sending. A later failure after sending was confirmed does not automatically reverse that charge. An unresolved outcome remains reserved for review.

Receive events with a webhook

Open API & integrations, enter your public HTTPS webhook URL and portal password, then save. Copy the signing secret immediately: it is displayed only once. The URL receives this customer's new incoming messages, message status events and first approval or rejection for newly submitted template requests after setup. Requests made before this feature was enabled are not tracked; check their status in the template list. Only configure an endpoint you trust with your message data. Do not put API keys or passwords in your URL. Saving the address does not test its reachability; review the delivery status after a new event.

A template decision callback uses kind: template_status, an APPROVED or REJECTED status, and these fields: templateId, templateName, language, category and occurredAt. In GET /events, the corresponding fields are templateId, templateName, templateLanguage and templateCategory. MTE checks for decisions periodically, so notification is not instant.

Every request contains X-MTE-Timestamp (Unix seconds), X-MTE-Signature and X-MTE-Event-Id. Before parsing, verify the lowercase hexadecimal HMAC-SHA256 of the timestamp, a dot and the exact raw request body, using your signing secret as the key. Use a constant-time comparison and a five-minute freshness window. Deduplicate event IDs and return a 2xx response after successful processing. Deliveries may be retried and arrive out of order. The portal shows your recent webhook delivery attempts.

Changing the webhook URL creates a new secret and applies to future events. Pending deliveries for the old address are paused and are not redirected or replayed to the new URL. If you disable the webhook, use the event API to check the history.

Read conversations and replies

Use these endpoints from your trusted backend to read conversations and messages belonging to your MTE account:

GET /conversations?limit=50
GET /conversations/CONVERSATION_ID/messages?limit=50

Copy the conversation id from the first response into the second path. Both responses provide items, hasMore and nextBefore. To read another page, pass the returned nextBefore as the before parameter. Items are returned newest first.

Incoming text replies appear in conversation history and events. Incoming media retrieval is not currently supported. Conversation access is scoped to the MTE customer account, so your application must enforce any further restrictions needed for its own users.

Errors & safe retries

StatusWhat to check
400Check the request format, number, parameters and required headers.
401Check the MTE API key and whether it has been revoked.
403Check account access and the permissions on your key. Do not send an Origin header.
404The requested operation or resource may not be accessible to this account.
409Check consent, template approval, account state or the idempotency key. If the outcome is submitting or unknown, stop and investigate before sending again.
429Wait before retrying; machine API requests are limited to 120 per minute per integration identity.
502The result may be uncertain. Check the operation and events; do not send again with a new message ID until the outcome is known.

When requesting help, provide the operation ID, time and error code. Never share your API key, password, or unnecessary message content.

Current capabilities

You can check your connection, manage recorded consent, request and list templates, send supported approved template messages, inspect operations and events, read conversations, and set a webhook in the portal. In the current category-billing mode, sending is limited to supported approved templates; free-form replies cannot be sent via the API. The API does not currently provide an independent media-upload endpoint; media headers require a valid same-account, same-connection media reference.