Skip to content

http api

alizeinodin edited this page Sep 11, 2026 · 2 revisions

HTTP API & webhooks

HTTP send API

php artisan smsapi:install api
SMSAPI_API_ENABLED=true
SMSAPI_API_TOKEN=secret
SMSAPI_API_PREFIX=smsapi
POST /smsapi/messages
X-SMSAPI-Token: secret
Content-Type: application/json

{
  "to": "09121234567",
  "message": "Hello"
}

Middleware returns 404 when the API is disabled.

Delivery webhooks

php artisan smsapi:install delivery
SMSAPI_WEBHOOK_ENABLED=true
SMSAPI_WEBHOOK_TOKEN=secret
POST /smsapi/webhooks/delivery

Optional sync:

php artisan smsapi:sync-delivery

Clone this wiki locally