logo
enes

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

StepSourceTargetAction
1Your systemKeycloakPOST /token (client_id + client_secret)
2KeycloakYour systemReturns access_token (valid ~10 min)
3Your systemMessaging APIPOST /services/messaging (Bearer access_token)
4Messaging APIYour systemReturns 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.

External API — Previous
SMS
Next — External API
Step 1 - Get the Token