Trying to figure out how to program auto texts for my new app

One of the apps I am starting to develop, will send text messages to smartphones and tablet, and I would like them to only remain on the phone for a few days.
Does anyone know of an API or something that would do that?

Note that on the iOS platform, you don't have control over how long actual text messages remain on the receiving device (unless this is all a custom text-messaging platform that you build or use a 3rd-party source to implement).

With the iOS SDK, you can simply send a text message using their available MFMessage classes, or you can build it from scratch; those are basically your two choices.