Skip to content

Status Tracking 📡

The app allows you to track the status of messages using multiple methods.

Tracking Methods 🔍

Message Status UI
Message status indicators in app

Sample Webhook Payload
{
  "event": "sms:failed",
  "payload": {
    "messageId": "zXDYfTmTVf3iMd16zzdBj",
    "reason": "Invalid number",
    "failedAt": "2024-02-20T15:30:00Z"
  }
}
Webhook Setup Guide

Get Status via API
curl -X GET https://api.sms-gate.app/3rdparty/v1/messages/zXDYfTmTVf3iMd16zzdBj \
  -u "user:pass"
API Documentation

Check Status via CLI
smsgate --format=json status zXDYfTmTVf3iMd16zzdBj
{
  "id": "zXDYfTmTVf3iMd16zzdBj",
  "state": "Failed",
  "reason": "Invalid number"
}


Message Lifecycle 🔄

stateDiagram-v2
    direction LR
    [*] --> Pending
    Pending --> Processed
    Processed --> Sent
    Sent --> Delivered
    Delivered --> [*]
    Failed --> [*]
    Pending --> Failed
    Processed --> Failed
    Sent --> Failed
    Delivered --> Failed

Status Definitions 🚦

  • ⌛ Pending
    Message queued, awaiting device processing
  • ⚙ Processed
    Device prepared message, handed to Android SMS API
  • 📤 Sent
    SMSC accepted message (Android API confirmation)
  • 📥 Delivered
    Recipient device confirmed receipt (requires "withDeliveryReport": true)
  • ❌ Failed
    Terminal error at any stage

Message Scenarios 📨

Condition Result Status
All parts sent 📤 Sent
Any part delivered 📥 Delivered
Any part failed ❌ Failed (terminal)
Condition Result Status
Any pending ⌛ Pending
Any processed ⚙ Processed
All delivered 📥 Delivered
All failed ❌ Failed
Otherwise 📤 Sent

Delivery Reports 📋

If the app receives an error code in the delivery report, the action depends on the type of the error:

  • Permanent error: the status changes to Failed
  • Temporary error without retries: the status changes to Failed
  • Temporary error with retries: ignored, the status doesn't change

Temporary Errors

The Android OS may not report the final status of the message after a temporary error. In this case the message remains in the Sent state even if it was successfully delivered.

Error Code Reference

Full SMSC error codes documented in GSM 03.40 Specification