{"openapi":"3.0.3","info":{"title":"SMS","version":"1.4.1","summary":"Send text messages and track delivery.","description":"Send transactional SMS from your sender ID. Delivery reports arrive on your callback URL."},"x-lango":{"slug":"sms","auth":"oauth2_client_credentials","changelog":"Messages over 160 characters are now split and billed per part."},"paths":{"/messaging/v1/sms":{"post":{"operationId":"sendSms","summary":"Send a text message","x-lango":{"async":true},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsRequest"},"example":{"senderId":"LANGO","to":"254712345678","message":"Your order 2041 has shipped.","callbackUrl":"https://example.com/hooks/lango"}}}},"responses":{"202":{"description":"Message accepted for delivery.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsAccepted"}}}},"403":{"description":"The sender ID is not registered to you.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-sandbox-scenarios":[{"key":"delivered","title":"Delivered","default":true,"status":202,"delayMs":90,"response":{"messageId":"{{id:msg}}","status":"ACCEPTED","parts":1},"callback":{"delayMs":2500,"body":{"messageId":"{{messageId}}","to":"{{body.to}}","status":"DELIVERED","deliveredAt":"{{now}}"}}},{"key":"handset_off","title":"Handset switched off","match":{"field":"body.to","equals":"254700000001"},"status":202,"delayMs":90,"response":{"messageId":"{{id:msg}}","status":"ACCEPTED","parts":1},"callback":{"delayMs":6000,"body":{"messageId":"{{messageId}}","to":"{{body.to}}","status":"UNDELIVERED","reason":"ABSENT_SUBSCRIBER"}}},{"key":"bad_sender","title":"Unregistered sender ID","match":{"field":"body.senderId","equals":"UNKNOWN"},"status":403,"delayMs":30,"response":{"error":"SENDER_NOT_REGISTERED","message":"That sender ID is not registered to your organization.","requestId":"{{id:req}}"}}]}},"/messaging/v1/sms/{messageId}":{"get":{"operationId":"getSms","summary":"Check a message","parameters":[{"name":"messageId","in":"path","required":true,"schema":{"type":"string"},"example":"msg_7k3p1w6t"}],"responses":{"200":{"description":"Delivery state of the message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SmsStatus"}}}}},"x-sandbox-scenarios":[{"key":"delivered","title":"Delivered","default":true,"status":200,"delayMs":45,"response":{"messageId":"{{path.messageId}}","status":"DELIVERED","parts":1,"deliveredAt":"{{now}}"}}]}}},"components":{"schemas":{"SmsRequest":{"type":"object","required":["senderId","to","message"],"properties":{"senderId":{"type":"string","maxLength":11,"description":"Your registered alphanumeric sender ID."},"to":{"type":"string","description":"Recipient in international format, no plus sign."},"message":{"type":"string","maxLength":918,"x-sensitive":true,"description":"The text to send. Never stored in the request log."},"callbackUrl":{"type":"string","format":"uri"}}},"SmsAccepted":{"type":"object","properties":{"messageId":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED"]},"parts":{"type":"integer"}}},"SmsStatus":{"type":"object","properties":{"messageId":{"type":"string"},"status":{"type":"string","enum":["ACCEPTED","DELIVERED","UNDELIVERED"]},"parts":{"type":"integer"},"deliveredAt":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},"servers":[{"url":"https://devportal.softwaregroup.com/api/sandbox","description":"Sandbox"},{"url":"https://devportal.softwaregroup.com/api/live","description":"Production"}]}