Appearance
HTTP endpoints & webhooks
For developers
Admin API
All three require an Admin API token and the sms.manage privilege (in 0.9.0-beta.1 effectively: an Administrator user or an integration with full access — see Known issues).
POST /api/_action/kmh-sms/sms-template/{templateId}/test-message
Sends a saved template to one number, rendered with sample data. Used by the Send test message button.
| Body field | Required | Description |
|---|---|---|
recipient | yes | Phone number; international format recommended |
salesChannelId | no | Which sales channel's provider settings to use |
Response 200:
json
{
"success": true,
"reason": null,
"detail": null,
"messageId": "3017xxxxxxxx",
"renderedBody": "Hi Jane, thanks for your order 10001."
}On failure success is false and reason is one of templateNotFound, templateEmpty, renderFailed, invalidRecipient, noProviderConfigured, providerRejected, providerUnavailable, with a human-readable detail.
GET /api/_action/kmh-sms/provider
Lists providers and whether each is configured.
| Query | Description |
|---|---|
salesChannelId | Optional; evaluate that sales channel's settings |
json
{ "providers": [ { "name": "termii", "label": "Termii", "configured": true }, … ] }POST /api/_action/kmh-sms/provider/{providerName}/verify
Checks a provider's saved credentials against the provider. Used by the Check credentials button. 200 with {"valid": bool, "message": string, "detail": string|null}; 404 (with valid: false) for an unknown provider name. Body: optional salesChannelId.
POST /kmh-sms/webhook/{providerName}
Delivery reports and inbound messages, one URL per provider: termii, twilio, africasTalking. Storefront route, so the host must be a storefront domain. See Architecture for how each provider is verified.
| Status | When |
|---|---|
200 {"status":"ok"} | Verified and dispatched as an event |
200 {"status":"ignored"} | Verified, but not a callback the plugin handles (including a body that cannot be parsed) |
403 | Verification failed, or the provider's webhook secret/token is not configured |
404 | Unknown provider, or a provider without webhooks (Sendexa) |