Skip to main content

Setup

In the MessageMedia console:
  1. Create a new API key.
  2. Copy the API key and secret (make sure you save the api_secret as you will not be able to see it again).
In Courier, navigate to the MessageMedia Integration page, paste your credentials, and click “Save.”

Profile Requirements

To deliver a message to a recipient via MessageMedia, Courier must be provided the recipient’s SMS-compatible telephone number. This value should be included in the recipient profile as phone_number.
{
  "message": {
    "to": {
      "phone_number": "+12025550156"
    }
  }
}

Overrides

Overrides can be used to change the request body, config, and headers that Courier uses to send a message through MessageMedia. You can override the apiKey, apiSecret, isHmacEnabled, and url via config, and any of the SendMessages body fields via body.
{
  "message": {
    "template": "NOTIFICATION_TEMPLATE_ID",
    "to": {
      "phone_number": "+12345678901"
    },
    "providers": {
      "messagemedia": {
        "override": {
          "body": {
            "source_number": "+15555555555"
          },
          "config": {
            "apiKey": "<override API key>",
            "apiSecret": "<override API secret>"
          }
        }
      }
    }
  }
}

Delivery Tracking

After integrating MessageMedia into Courier, you will have access to a unique webhook URL that you can integrate with MessageMedia webhooks to receive delivery updates that sync to Courier’s Message Logs. To configure webhooks, navigate to the MessageMedia integration in Courier and copy the unique webhook URL. With the webhook URL in hand, follow these steps in the MessageMedia console:
  1. Select “New Webhook”.
  2. Paste Courier’s webhook URL.
  3. Under “Event”, select “Message is rejected”, “Message has failed”, and “Message is delivered” under Delivery reports.
  1. Under “Content”, map the content to be passed in the request to Courier’s webhook endpoint.
Only messageId, receivedTimestamp, status, and statusCode are supported.
Courier will now receive delivery updates visible in the message logs.