A plain REST API for enviando SMS
POST your sender, recipient and content with a Token header. Get a message ID straight back, and delivery reports pushed to your server.
One request, one message
Authenticate with your access key, POST the message, and read the msgid from the response. Press the button to see it run.
1curl -X POST https://secure.smslocal.com/api/service/enterprise-service/external/sms \
2 -H "Token: $SMSLOCAL_TOKEN" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "from": "SMSLOCAL",
6 "to": "14155550123",
7 "content": "Your code is 481920."
8 }'
/external/smsRun the request to see the response.
Nothing exotic to learn
Three ideas cover the whole API, which follows plain REST conventions.
- Authentication
Token authentication
Send your access key in a Token header on every request, with JSON in and JSON out.
- No SDK required
- Works from any language
- Keep the key in an environment variable
- Resposta
Know it was accepted
Every send returns a msgid and an errorcode immediately.
- Store the msgid against your own record
- errorcode 0 means accepted
- Use the msgid to match reports later
- Replies
Two-way by default
Replies arrive on the same callback, marked as mobile originated.
- Same message shape as reports
- Tell directions apart with mt / mo
- Route replies to your support tools
See what happened to every message
A status report is posted to your callback URL when a message reaches its final state.
- 1Match by msgidEvery report carries the ID you were given at send time.
- 2Final states onlyYou hear about a message when it is delivered or has failed.
- 3One callback URLThe same endpoint receives reports and replies.
9f2a7c10+1 415 ••• 0123Entreguejust now9f2a7c11+91 98••• 43210Entregue3 s ago9f2a7c12+44 7••• 123456Pendente5 s ago9f2a7c13+91 99••• 00012Failed9 s ago
See how a message is counted
Longer text and non-Latin characters change how many parts a message is billed as. Try your own wording, and look up a number before you send.
- Papel 146 / 160
Uma parte contém 160 caracteres em GSM7 ou 70 em Unicode. Um caractere não GSM, como um emoji ou uma letra em hindi, muda toda a mensagem para Unicode.
Pare de colar mensagens manualmente
Arraste o divisor para comparar.
- Mensagens enviadas do seu próprio código
- Um relatório para cada mensagem
- Respostas enviadas para o seu sistema
- Exportações e uploads manuais
- Não faço ideia se chegou uma mensagem
- As respostas chegam à caixa de entrada de alguém
Uma breve lista de verificação de pré-lançamento
Marque os itens conforme você avança. Nada aqui é salvo.
API SMS — perguntas frequentes
Passe sua chave de acesso em um cabeçalho Token em cada solicitação, junto com Content-Type: application/json.
Cada envio retorna uma msgid. Aponte-nos para um URL de retorno de chamada e publicaremos um relatório de status quando a mensagem atingir seu estado final.
160 caracteres na codificação GSM7 ou 70 em Unicode. Mensagens mais longas são unidas por diversas partes, cada uma cobrada separadamente.
Sim. As respostas de entrada são entregues no mesmo URL de retorno de chamada e marcadas como originadas em dispositivos móveis.
Sim. SMS para números indianos devem usar uma entidade, cabeçalho de remetente e modelo aprovados. Nossa equipe ajuda você a registrá-los durante a integração.
Envie seu primeiro SMS em minutos
Crie uma conta, pegue sua chave de acesso e faça sua primeira solicitação.