SMS OTP

Sending OTP message more faster and real-time. All the message will be sent to the user in a secure pipeline.

Request

The request contains JSON body with target phone number and the message that contains OTP code.

Curl Example

                            
                            curl --location --request POST 'https://api.motict.com/v1/sms/otp' \
                            --header 'Authorization: api_key' \
                            --header 'Content-Type: application/json' \
                            --data-raw '{
                                "phone_number":"+6282211111111",
                                "message":"Kode OTP Anda 159781. Silahkan masukkan kode tersebut."
                            }'
                            
                        

Body

                            
                            {
                                "phone_number":"+6282211111111",
                                "message":"Kode OTP Anda 159781. Silahkan masukkan kode tersebut."
                            }
                            
                        

Parameters

Name Type Required Description
api_key String Yes API key credential will be provided by Motict team.
phone_number String Yes Phone numbers are in E.164 format (e.g., +6285123456790)
For now, only allowed Indonesia's country code (+62).
message String Yes Message contains OTP code.

Response

The response contains JSON body with sms id and the full content of SMS message that has been sent to the user.

Body

                            
                            {
                                "message": "success",
                                "data": {
                                    "id": "c086ba75-2e0c-44dc-a252-aed4b6edae58",
                                    "request_id": 7940198,
                                    "full_content": "Kode OTP Anda 159781. Silahkan masukkan kode tersebut."
                                }
                            }
                            
                        

Parameters

Name Type Description
id String SMS ID will be used as call identifier for each request
request_id Number Request ID generated from motict system
full_content String SMS message sent to the user
message String Success or error message. For error response, check Error section for mor details