HTTP API
Last update: 6 hours ago by Irais Aguirre
The External SMS HTTP API lets you integrate SMS sending into your system using a standard OAuth2 (client_credentials) authentication flow against Keycloak, followed by a REST call to the messaging endpoint.
Your system always performs two operations: first it obtains a temporary token with your API key, then it uses that token to send the SMS. The token is valid for approximately 10 minutes, so you can reuse it for multiple sends.
General flow
| Step | Source | Target | Action |
|---|---|---|---|
| 1 | Your system | Keycloak | POST /token (client_id + client_secret) |
| 2 | Keycloak | Your system | Returns access_token (valid ~10 min) |
| 3 | Your system | Messaging API | POST /services/messaging (Bearer access_token) |
| 4 | Messaging API | Your system | Returns code, mailingId, result |
Cache the token in memory and request a new one when it is about to expire. Do not request it again for every send — it slows down your integration unnecessarily.
Before you start, you need an API key (Client ID + Secret). If you do not have one yet, ask your account administrator to generate it from the portal.
