The SMS API from Flowroute is functional for this. To send an SMS, you give it a JSON object with 3 members: "to", "from", and "body". You send this object with a POST to https://api.flowroute.com/v2/messages/ with authorization that you can get (and change) by logging into your account. If the "from" element in your API call is not one of your DID numbers, then you will get a 403 Forbidden error. The message body can be any length. If it is longer than 160 characters, it will be split and automatically reassembled on the phone, if the phone's carrier supports that.
They also handle receiving messages, which will be sent to a callback URL that your specify. You can also use their API to retrieve messages that have been previously received. I don't know how long they store them.
The don't (yet) support MMS.
--
Steve