Have you [created your Xoxzo API user](https://blog.xoxzo.com/en/2017/10/13/create-your-first-apiuser/) and have you [sent your first SMS](https://blog.xoxzo.com/2017/10/31/sending-your-first-sms/) using the Xoxzo web API? Follow this tutorial for the next step: checking your SMS status online! If you have managed to send your first SMS, as we explained in the previous article, you'll notice that we get a msgid string in return after we run the CURL command, like this: [{"msgid":"tHi5i5y0urMsGIdt3xT"}]. If we get that, we sent the SMS correctly, otherwise the return message would've been different. But how do we know recipient actually received the SMS message?

SMS checking command

We'll still use CURL to check the SMS status, similar to how we sent an SMS. The difference will be in the parameters we provide and the URL.

To check on the status of your SMS, run this:

curl -u th3ApISiDt3xtTh4tyoUcoPied:Th3aUthT0k3nth4tY0uCopi3D \
https://api.xoxzo.com/sms/messages/tHi5i5y0urMsGIdt3xT/

If everything is OK, you should be getting a JSON response like so:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "status": "DELIVERED",
    "sent_time":"2015-08-27 09:22:32",
    "cost": 10,
    "sender": "your_number",
    "recipient": "your_recipientnumber",
    "url": "https://api.xoxzo.com/sms/messages/tHi5i5y0urMsGIdt3xT/",
    "msgid": "tHi5i5y0urMsGIdt3xT"
}

Of course, the cost will depend on which number you are sending too. You can get the pricing details here: SMS Pricing

The SMS statuses are in this list:

Status Details
QUEUED Message put into queue and will be delivered shortly
DELIVERED Message successfully delivered
DELIVERING Sending message in progress
FAIL Failed to send message

What if I didn't put in my msgid?

Sending something like this:

curl -u th3ApISiDt3xtTh4tyoUcoPied:Th3aUthT0k3nth4tY0uCopi3D \
https://api.xoxzo.com/sms/messages/

Would give you the status of all the SMS that you sent within 90 days.

There's a lot of stuff on my screen! Can I get statuses by date?

Sure! You can include a date parameter to get your SMS statuses on the day (date format is year-month-day), something like this:

curl -u th3ApISiDt3xtTh4tyoUcoPied:Th3aUthT0k3nth4tY0uCopi3D \
https://api.xoxzo.com/sms/messages/?sent_date=2017-10-31

If you didn't send an SMS message during that period, it will still return a 200 OK response, but it'll be empty:

HTTP/1.0 200 OK
Content-Type: application/json

[]

You only can get statuses within 90 days of the current date. Otherwise, you will get this response:

HTTP/1.0 400 Bad Request
Content-Type: application/json

{
    "sent_date": [
        "Invalid sent_date"
    ]
}

You'll also get a 400 Bad Request response if your parameters are incorrect.

And that's it! There are more details in our SMS documentation which you can check out as well!

Check out our docs to see what cool things you can do with our Xoxzo web API.

Here you can find all the Xoxzo tutorials:

Xoxzo web API tutorials by Miko:

Other Xoxzo tutorials:

Are you looking for an even simpler option to send SMS messages from your PC to customers and do you want to get started right away without coding? Check out our other service: EZSMS! With EZSMS you can start sending bulk SMS messages from the web right away. There are no initial or monthly fees: you only pay for what you use. You can also send customized messages to cater to each customer. EZSMS supports SMS sending to 170 countries and it supports simultaneous sending to multiple destinations and delivery using CSV files that can be customized and mass-delivered. You can send SMS anytime, anywhere. Complete it all online-Dial SMS to make your business or event a huge success! See you next time!