{"openapi":"3.0.0","servers":[{"url":"https:\/\/api.digitalcore.telkomsel.com"}],"info":{"title":"Send SMS","version":"1.0.0"},"paths":{"\/digihub\/v1\/reguler\/sendsms":{"post":{"summary":"Send SMS","operationId":"sendSMS","description":"This service will send SMS to Telkomsel MSISDN.","parameters":[{"in":"header","name":"api_key","example":"e688u2hgpkzjd244wecywwv8","description":"API Key \/ Package Key from Digihub","required":true,"schema":{"type":"string"}},{"in":"header","name":"x-signature","example":"ff080f3200a5945deeb59ad65e2b33788f5df49066a82afcf8b6d5bf43ff76ea","description":"SHA256 (API Key + Secret Key + timeStamp). [More info](https:\/\/digihub.telkomsel.com\/documentation\/consumer-guide\/api-authentication)","required":true,"schema":{"type":"string"}},{"in":"header","name":"Content-Type","required":true,"schema":{"type":"string","enum":["application\/json"]}}],"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/RequestBody"}}}},"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodySuccess"}}}},"400":{"description":"Empty Mandatory Parameter \/ Invalid MSISDN \/ Invalid Sender ID","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"examples":{"Empty Mandatory Parameter":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"20001","status_desc":"Empty mandatory parameter"}}},"Invalid MSISDN":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"20002","status_desc":"INVALID MSISDN"}}},"Invalid Sender ID":{"value":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"20003","status_desc":"INVALID SENDER ID"}}}}}}},"500":{"description":"Backend Internal Error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"40000","status_desc":"Backend Internal Error"}}}}},"502":{"description":"Backend Internal Error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"30xxx","status_desc":"Backend error: {consumer}-{provider}-{service provider error description}"}}}}},"503":{"description":"Backend Internal Error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"10001","status_desc":"Backend unreachable"}}}}},"504":{"description":"Backend Internal Error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResponseBodyError"},"example":{"transaction":{"transaction_id":"C002190726165745657448250","status_code":"10004","status_desc":"Backend response timeout"}}}}}},"callbacks":{"deliveryReport":{"https:\/\/{$request.body#\/transaction\/callback_domain}\/callback\/digihub\/smsapi":{"post":{"requestBody":{"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CallbackBody"}}}},"responses":{"2XX":{"description":"Your server implementation should return this HTTP status code if the data was received successfully"}}}}}}}}},"components":{"schemas":{"RequestBody":{"type":"object","required":["transaction","sms"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/RequestTransaction"},"sms":{"$ref":"#\/components\/schemas\/RequestSms"}}},"RequestTransaction":{"type":"object","properties":{"transaction_id":{"description":"Transaction ID","type":"string","example":"C002190726165745657448250"},"callback_domain":{"description":"Partner's callback domain","type":"string","example":"yourcompanydomain.com"}}},"RequestSms":{"type":"object","required":["recipient","sms_text"],"properties":{"sender_id":{"description":"ADN\/SMS From","type":"string","maxLength":11,"example":"YOURCOMPANY"},"recipient":{"description":"MSISDN starts with \"62\" for Indonesia calling code","type":"string","example":"62811xxx"},"sms_text":{"description":"Sms text is mandatory if template is not exist.","type":"string","example":"Hello World!"}}},"ResponseBodySuccess":{"type":"object","required":["transaction","sms_information"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/ResponseTransaction"},"sms_information":{"$ref":"#\/components\/schemas\/ResponseSmsInformation"}}},"ResponseBodyError":{"type":"object","required":["transaction"],"properties":{"transaction":{"$ref":"#\/components\/schemas\/ResponseTransaction"}}},"ResponseTransaction":{"type":"object","required":["transaction_id","status_code","status_desc"],"properties":{"transaction_id":{"description":"Transaction ID","type":"string","example":"C002190726165745657448250"},"status_code":{"description":"Status code","type":"string","example":"00000"},"status_desc":{"description":"Status descriptiona","type":"string","example":"Success"}}},"ResponseSmsInformation":{"type":"object","required":["message_id"],"properties":{"message_id":{"description":"SMS Message ID","type":"string","example":"18D10100"}}},"CallbackBody":{"type":"object","required":["transaction_id","message_id","status"],"properties":{"transaction_id":{"description":"Transaction ID","type":"string","example":"C002190726165745657448250"},"message_id":{"description":"SMS Message ID","type":"string","example":"18D10100"},"status":{"description":"SMS Delivery Status","type":"string","example":"DELIVRD"}}}}}}