{"swagger":"2.0","info":{"title":"2 Factor Authentication Demo API","description":"used to demo 2FA function","version":"1.0.0","termsOfService":"Please refer to Tata Communications usage policy at developers.tatacommunications.com/tos"},"host":"cloud.restcomm.com","schemes":["https"],"produces":["application/json"],"securityDefinitions":{"UserSecurity":{"type":"apiKey","name":"Authorization","in":"header"}},"definitions":{"Error":{"description":"A generic error message in json format","properties":{"code":{"type":"string","description":"The error message."},"message":{"type":"string","description":"Additional data that was passed in to describe the error."}},"type":"object","required":["code"]},"send2faOtpRequest":{"description":"json payload","properties":{"service":{"type":"string","description":""},"from":{"type":"string","description":""},"to":{"type":"string","description":""},"body":{"type":"string","description":""},"channel":{"type":"string","description":""}},"type":"object","required":["service"]},"verify2faOtpRequest":{"description":"json payload","properties":{"service":{"type":"string","description":""},"number":{"type":"string","description":""},"code":{"type":"string","description":""}},"type":"object","required":["service"]},"Response2faOtp":{"description":"json payload","properties":{"code":{"type":"string","description":"code to check if the 2fa api is triggered"},"message":{"type":"string","description":"message to show if 2fa api is triggered "},"requestID":{"type":"string","description":"id for the 2fa OTP"}}},"Response2faVerify":{"description":"json payload","properties":{"code":{"type":"string","description":"code to check if the 2fa api is triggered"},"message":{"type":"string","description":"message to show if 2fa api is triggered "},"requestID":{"type":"string","description":"id for the 2fa sms"}}}},"paths":{"/2fa/send":{"post":{"description":"send one time password using sms or voice call","summary":"send one time password using sms or voice call","security":[{"UserSecurity":[]}],"parameters":[{"description":"json payload","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/send2faOtpRequest"}}],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Response2faOtp"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"The server has not found anything matching the Request-URI.","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/Error"}}},"tags":["Customer APP- 2 Factor Authentication"]}},"/2fa/verify":{"post":{"summary":"verify the one time password","security":[{"UserSecurity":[]}],"parameters":[{"description":"string","name":"body","in":"body","required":true,"schema":{"$ref":"#/definitions/verify2faOtpRequest"}}],"consumes":["application/json"],"produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Response2faVerify"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/Error"}},"404":{"description":"The server has not found anything matching the Request-URI.","schema":{"$ref":"#/definitions/Error"}},"500":{"description":"The server encountered an unexpected condition which prevented it from fulfilling the request.","schema":{"$ref":"#/definitions/Error"}}},"tags":["Customer APP- 2 Factor Authentication"]}}},"tags":[{"description":"used by customer APP to send and verify the one time password","name":"Customer APP- 2 Factor Authentication"}]}