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

# Get Message Status

> Retrieve the delivery status of a specific SMS message

## Get Message Status

Retrieve the delivery status and details of a specific SMS message using its message ID.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://app.notify.ng/api/v2/MessageStatus?ApiKey=YOUR_API_KEY&ClientId=YOUR_CLIENT_ID&MessageId=Smsc1603635" \
    -H "Content-Type: application/json"
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    ApiKey: 'YOUR_API_KEY',
    ClientId: 'YOUR_CLIENT_ID',
    MessageId: 'Smsc1603635'
  });

  const response = await fetch(`https://app.notify.ng/api/v2/MessageStatus?${params}`, {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

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

  url = "https://app.notify.ng/api/v2/MessageStatus"
  params = {
      "ApiKey": "YOUR_API_KEY",
      "ClientId": "YOUR_CLIENT_ID",
      "MessageId": "Smsc1603635"
  }

  response = requests.get(url, params=params)
  data = response.json()
  print(data)
  ```
</CodeGroup>

## Parameters

<ParamField query="ApiKey" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField query="ClientId" type="string" required>
  Your client identifier for authentication
</ParamField>

<ParamField query="MessageId" type="string" required>
  Message ID of the SMS to check (obtained from send response)
</ParamField>

## Response

<ResponseField name="ErrorCode" type="number">
  Error code (0 for success)
</ResponseField>

<ResponseField name="ErrorDescription" type="string">
  Description of the result
</ResponseField>

<ResponseField name="Data" type="object">
  Message status details
</ResponseField>

<ResponseField name="Data.MobileNumber" type="string">
  Mobile number that received the message
</ResponseField>

<ResponseField name="Data.SenderId" type="string">
  Sender ID used for the message
</ResponseField>

<ResponseField name="Data.Message" type="string">
  Original message content
</ResponseField>

<ResponseField name="Data.SubmitDate" type="string">
  Date and time when message was submitted
</ResponseField>

<ResponseField name="Data.MessageId" type="string">
  Unique message identifier
</ResponseField>

<ResponseField name="Data.DoneDate" type="string">
  Date and time when message was processed
</ResponseField>

<ResponseField name="Data.Status" type="string">
  Current delivery status
</ResponseField>

### Success Response

```json theme={null}
{
  "ErrorCode": 0,
  "ErrorDescription": "Success",
  "Data": {
    "MobileNumber": "9638812576",
    "SenderId": "test",
    "Message": "test message",
    "SubmitDate": "16-Mar-2018 05:12:28 PM",
    "MessageId": "Smsc1603635",
    "DoneDate": "16-Mar-2018 05:11:00 PM",
    "Status": "DELIVRD"
  }
}
```

### Error Response

```json theme={null}
{
  "ErrorCode": 022,
  "ErrorDescription": "Invalid jobid"
}
```

## Message Status Values

| Status        | Description                                 |
| ------------- | ------------------------------------------- |
| **DELIVRD**   | Message successfully delivered to recipient |
| **UNDELIV**   | Message failed to deliver                   |
| **EXPIRED**   | Message expired before delivery             |
| **DELETED**   | Message was deleted                         |
| **UNKNOWN**   | Status is unknown                           |
| **ACCEPTD**   | Message accepted by carrier                 |
| **REJECTD**   | Message rejected by carrier                 |
| **BLACKLIST** | Recipient number is blacklisted             |

## Use Cases

* **Delivery confirmation**: Check if a specific message was delivered
* **Customer support**: Help customers track their message status
* **Analytics**: Monitor delivery success rates
* **Debugging**: Troubleshoot delivery issues
* **Compliance**: Maintain delivery logs for regulatory requirements

## Best Practices

1. **Store Message IDs**: Always store message IDs returned from send operations
2. **Polling**: Check status periodically for important messages
3. **Error handling**: Handle different status values appropriately
4. **Timeouts**: Set reasonable timeouts for status checks
