Mobile Messaging API¶
The Mobile Messaging API is a simple and future-proof interface for sending SMS and RCS messages to phone numbers. By integrating with this API, you are automatically prepared for RCS messaging. Messages seamlessly fall back to SMS when recipients are not RCS-capable, without requiring any changes to your code. The API handles SMS-specific details such as character encoding and message classes automatically.
Read more in our help center.
API endpoint & authentication¶
All API calls must be made against one of the following domains, depending on your setup:
messaging.gatewayapi.commessaging.gatewayapi.eu
Authentication is performed using a Token Header from your API keys API keys can be generated and managed in the GatewayAPI Dashboard.
Sending a message¶
A minimal example for sending a single message:
1 2 3 4 5 6 7 8 9 10 11 | |
The successful response looks like:
1 2 3 4 5 | |
We provide a full OpenAPI spec, as well as Swagger and Redoc.
Optional fields¶
The following optional fields can be included when sending a message.
label¶
1 2 3 | |
- The label is stored for reporting purposes only
- It is not returned in the send-message response
- It is not included in webhook payloads
- It does not affect message delivery or routing
reference¶
1 2 3 | |
expiration¶
1 2 3 | |
The value can be provided in one of the following formats:
- ISO 8601 duration (recommended). Example:
PT1H(1 hour),PT10M(10 minutes),P1D(1 day) - ISO-8601 date-time (absolute expiration time). Format: YYYY-MM-DD[T]HH:MM:SS[.ffffff][Z or [+ or -]HH[:]MM]. Example:
2026-02-19T18:00:00Z - Unix timestamp (seconds since epoch). Example:
1760896800 - Seconds offset (relative expiration time). Example:
18000(expires in 5 hours)
Webhook callbacks¶
All webhook callbacks use a consistent event envelope format:
1 2 3 4 5 6 7 8 | |
The event_type field indicates the type of event and determines the schema of the event object.
Supported event types:
message.status.smsmessage.status.rcsuser-message.text.rcsuser-message.location.rcsuser-message.file.rcs
SMS status callback example:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
RCS status events are similar to SMS, but the status field can only contain EXPIRED, DELIVERED, ENROUTE and READ:
1 2 3 4 5 6 7 8 9 10 11 12 | |
Incoming RCS message payload:
1 2 3 4 5 6 7 8 9 10 11 | |
RCS allows for more complex payloads for file and location information from the end user, which is reflected in the content field being an object.
RCS location example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Files are hosted on a Google-provided CDN. If you need to retain files, you should download them, as long-term availability is not guaranteed.
Depending on the file type, fields such as thumbnail and category may be null.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
Webhook Signature Verification¶
All webhook events are signed and timestamped to verify their authenticity and integrity as originating from GatewayAPI.
The signature is provided in the Signature header using the format:
v1=<hex-encoded-hmac>
To verify the signature: Calculate an HMAC-SHA-256 value of the raw request body using the secret key configured for the webhook in the GatewayAPI dashboard. Hex-encode the result and compare it with the value provided in the Signature header.
Key length
Longer secret keys increase the cryptographic strength of HMAC signatures. Beyond a certain length, however, the added security benefit becomes negligible, as the effort required to brute-force the key is already impractical.
For this reason, GatewayAPI enforces a maximum length for webhook secret keys to ensure strong security without unnecessary processing overhead.
An example of a function that can check if the request is signed as expected, could be:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
Webhook events include a timestamp, allowing you to safely reject old or replayed requests.
Changelog & compatibility¶
The Mobile Messaging API is designed to be stable and reliable. We do not introduce breaking changes without proper deprecation warnings.
GatewayAPI places a strong emphasis on API stability. Once an integration is in place, existing functionality will not change without advance notice and an appropriate deprecation period.
A breaking change is defined as the removal of existing fields or a fundamental change in their meaning.
The addition of new fields, options, or event types is not considered a breaking change. Integrations should therefore be implemented defensively and tolerate additional fields in API responses and webhook payloads.
As the API evolves, new event types may be introduced to provide additional insight into your messaging traffic
January 2026 - Added label parameter¶
The API now accepts the optional label parameter. This is to be backwards compatible with the existing label feature from the legacy REST API which gives usage statistics by label.