An SMS API lets your own system (an online store, an ERP, an app) send text messages without anyone typing them. It is used for confirmations, reminders, verification codes and alerts.
What you need to get started
- An API key allowed to send SMS.
- A sender number enabled for SMS in the country you are sending to.
- A message bundle or balance for usage.
- Consent from the people you are going to message.
What a send looks like
- Your system makes an HTTPS request to the send endpoint with your key, the destination number in international format and the text.
- The provider validates the key, the allowed IP, the sender number and the limits.
- It returns a message ID and hands the message to the network.
- Status changes (sent, delivered, failed) reach you by webhook or can be queried through the API.
Delivery statuses and replies
"Sent" is not the same as "delivered". A mistyped number, a phone switched off for days or a carrier filter can make a message fail. Store the ID of every send and update your system with the final status.
Customers also reply. If your use case needs it (confirming an appointment with "YES", for example), have replies delivered to you by webhook or routed to an inbox where someone handles them.
Limits and security
- Least-privilege keys: if a key only sends SMS, it should not be able to do anything else.
- Allowed IPs: the key only works from your servers.
- Per-minute limits and quotas: they protect your balance if a bug in your system fires thousands of messages.
- Usage log: every request is recorded for auditing.
Rules by country
SMS is not the same everywhere:
- United States: sending from 10-digit local numbers requires 10DLC registration, and toll-free numbers require verification.
- Costa Rica and the rest of the Americas: rates and sender rules vary by country and carrier; confirm them before a campaign.
Consent best practices
- Only message people who opted in, and keep evidence of that permission.
- Identify your company in the message.
- Honor opt-out keywords such as STOP and stop sending immediately.
- Avoid late-night hours for non-urgent messages.
SMS or WhatsApp via API
SMS reaches any phone without an app and is ideal for codes and short alerts. WhatsApp supports buttons, images and conversation, but requires approved templates outside the 24-hour window. Many companies use both: WhatsApp to converse and SMS as a fallback.
With the TelHarbor API you send SMS, WhatsApp and email from your system, with keys, allowed IPs, limits and webhooks included. Bundle prices are in plans.
Frequently asked questions
Can I send SMS to Costa Rica and the United States with the same key?
Yes, as long as you have enabled sender numbers and balance for each destination.
How many characters does an SMS have?
Up to 160 characters without accents or emojis; with them the limit drops to 70 and long texts are billed as several messages.
Can I send verification codes?
Yes. TelHarbor also offers a verification service that generates and checks the code for you.
How do I know the message arrived?
Through the delivery status, which reaches you by webhook or can be queried through the API.