> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dojah.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Message Status

> Check the delivery status of a message using its message_id with the Dojah Messaging API.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-get`}>GET</span>
  <code>/api/v1/messaging/sms/get\_status</code>
</div>

Check the current delivery status of a message, using the message\_id returned by Send SMS.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |

## Query parameters

| Parameter    | Type   | Required | Description                                  |
| ------------ | ------ | -------- | -------------------------------------------- |
| `message_id` | string | Yes      | The `message_id` from the Send SMS response. |

## Response

Returns an `entity` with the message’s current delivery `status`.

| Field    | Type   | Description                                                        |
| -------- | ------ | ------------------------------------------------------------------ |
| `status` | string | Current delivery status, e.g. `DELIVERED`, `PENDING`, or `FAILED`. |

## Errors

| Code  | Meaning                                                         |
| ----- | --------------------------------------------------------------- |
| `400` | Bad request — `message_id` is missing or malformed.             |
| `401` | Unauthorized — check your key and `AppId` (no `Bearer` prefix). |
| `429` | Too many requests — back off and retry.                         |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    "https://api.dojah.io/api/v1/messaging/sms/get_status?message_id=dj_c8095767-c69f-4bd7-aa52-7cb469effb51" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const params = new URLSearchParams({
    "message_id": "dj_c8095767-c69f-4bd7-aa52-7cb469effb51",
  });

  const url = "https://api.dojah.io/api/v1/messaging/sms/get_status?" + params;
  const res = await fetch(url, {
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
    },
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      "https://api.dojah.io/api/v1/messaging/sms/get_status",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      params={ "message_id": "dj_c8095767-c69f-4bd7-aa52-7cb469effb51" },
  )
  data = res.json()
  ```

  ```php PHP theme={null}
  <?php
  $q = http_build_query([
    "message_id" => "dj_c8095767-c69f-4bd7-aa52-7cb469effb51",
  ]);
  $ch = curl_init("https://api.dojah.io/api/v1/messaging/sms/get_status?" . $q);
  curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
      "Authorization: " . getenv("DOJAH_SECRET_KEY"),
      "AppId: " . getenv("DOJAH_APP_ID"),
    ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/messaging/sms/get_status theme={null}
  {
    "entity": {
      "status": "DELIVERED"
    }
  }
  ```
</ResponseExample>
