The short answer
One way to text
Texting from your own software runs on any API key that can text, a key with Full access or a key limited to Texting. Every key sends the same way. It costs two cents per outgoing message part, and incoming messages are free. A plain text of up to 160 characters is one part, a longer text is billed as its parts, and a picture message counts as one part. Texts sent through the API are paid texting. They never count toward the texting included with your account, and that limit never holds them back. Ordinary texting in Textdock, in the inbox and by email stays included, up to 50 texts an hour and 150 a day on a standard account. The paid paths are this one and text blasts.
How a message is counted
Plain English, numbers and ordinary punctuation fit 160 characters in one message and 153 per part once it splits. One character outside that alphabet, an emoji, a curly quote pasted from Word, or Yiddish text or any other non-Latin alphabet, switches the whole message to the wide alphabet: 70 characters in one message and 67 per part. An emoji costs twice over, because it makes the switch and then takes the room of two characters. Ten characters (^ { } \ [ ~ ] | € and form feed) cost two units each, so the braces on a merge field cost four before any text. A picture message counts as one message whatever its text length. Paste a real message into the sampler on the API Messaging page and it shows the count and the price; Test it does a dry run that validates and sends nothing.
What is billed
A send that never reached a carrier is recorded but not billed. A message a carrier takes and then rejects is billed.
The keys
Keys are made in the portal on the Integrations page, under API keys. One key per integrator, not one per company, up to ten in use. Each carries its own name, its own access, its own usage counter, its own log, and its own on-off switch, and regenerating one leaves the others working. A key that can text also shows under Textdock, API Messaging, with the price, the month's usage, the terms and a tester.
Access is set on each key. Full access reaches everything on the account. A key limited to Texting can send and read text messages, fetch its own attachments, and manage webhooks for the three message events. It cannot reach calls, contacts or faxes. See REST API basics and webhooks.
A fixed address list is optional on every key. Tick Lock this key to fixed IP addresses and list your servers' exact addresses, and the key works only from them and sends up to 5,000 texts a day. Without a list the key works from any address and sends up to 500 texts a day. Every key sends 60 message parts a minute. The minute and the day are counted in different units on purpose, because the carriers count them that way. Anything over the per-minute rate is accepted with a 202, queued and sent in order, so your system does not have to pace itself. GET /v1/messages/queue shows what is waiting, and a DELETE there cancels it. A send past the day's limit is refused, not queued.
When messages are late
Each number's carrier is checked before a text goes out. Delivery is paced per phone carrier, and your text blasts share that room. If one carrier's daily room fills up, messages to that carrier wait for the next day while everything else keeps going, so a full day's batch is not guaranteed to land the same day.
Rules
The API is not a marketing tool. An account agrees to the texting terms once, the first time it makes a key that can text. Text only people who shared their number and agreed to be texted, and run no purchased, rented or scraped lists. The number the messages come from has to be registered; see 10DLC registration. The API Messaging page opens for every Advanced login, and for any login with the Company Details permission or the Textdock feature.
