---
updatedAt: 2026-08-07T08:07:34.000Z
agentTools:
  projectIndex: https://docs.verihubs.com/llms.txt
---

# Sandbox - Send OTP V2

SMS OTP version change is by introducing a new API version release.<br>

Version changes usually need to be applied immediately to the latest version, in order to get a better API usage experience than the previous version.<br>

The benefits you get if you use a newer version are as follows.
- Decreasing processing time in API Request and Response
- Improve feature in SMS: Blocking Request, Spam Check, Sequential Phone Number, and Blocked Numbers
- Increase RPS in SMS (before 30rps to 50rps)
- Better developer environment to support future developments
- Improve logging and monitoring on our side
- Improved dependencies and improved service stability<br>

This method helps you to generate and send sms containing one-time password to destination number<br>

The following table describes the msisdn option to be used as an input<br>

 Msisdn          | Description          | Response |
---------------- |:---------------------|:-------------------------- |
6282123060001       | Valid Phone number            | 201 "OTP sent successfully" |
6282123060002        | Msisdn invalid            | 400 "Msisdn invalid: msisdn length should between 4-16 characters" |
6282123060003        | Invalid Header            |  401 "Authorization failed" |
6282123060004        | Insufficient Quota            |  403 "OTP testing quota is insufficient" |
6282123060005        | Blocked Msisdn            | 409 "Msisdn invalid: msisdn has been blocked" |
6282123060006        | Too Many Request            | 429 "Too many request in the allowed time frame" |


# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "servers": [
    {
      "url": "https://api.verihubs.com/"
    }
  ],
  "info": {
    "title": "Sandbox - SMS API Documentation",
    "version": "2.0.0"
  },
  "tags": [
    {
      "name": "Sandbox - SMS OTP",
      "description": "Get information about SMS OTP API"
    }
  ],
  "paths": {
    "/v2/otp/send/sandbox": {
      "post": {
        "tags": [
          "Sandbox - SMS OTP"
        ],
        "summary": "Sandbox - Send OTP V2",
        "description": "SMS OTP version change is by introducing a new API version release.<br>\n\nVersion changes usually need to be applied immediately to the latest version, in order to get a better API usage experience than the previous version.<br>\n\nThe benefits you get if you use a newer version are as follows.\n- Decreasing processing time in API Request and Response\n- Improve feature in SMS: Blocking Request, Spam Check, Sequential Phone Number, and Blocked Numbers\n- Increase RPS in SMS (before 30rps to 50rps)\n- Better developer environment to support future developments\n- Improve logging and monitoring on our side\n- Improved dependencies and improved service stability<br>\n\nThis method helps you to generate and send sms containing one-time password to destination number<br>\n\nThe following table describes the msisdn option to be used as an input<br>\n\n Msisdn          | Description          | Response |\n---------------- |:---------------------|:-------------------------- |\n6282123060001       | Valid Phone number            | 201 \"OTP sent successfully\" |\n6282123060002        | Msisdn invalid            | 400 \"Msisdn invalid: msisdn length should between 4-16 characters\" |\n6282123060003        | Invalid Header            |  401 \"Authorization failed\" |\n6282123060004        | Insufficient Quota            |  403 \"OTP testing quota is insufficient\" |\n6282123060005        | Blocked Msisdn            | 409 \"Msisdn invalid: msisdn has been blocked\" |\n6282123060006        | Too Many Request            | 429 \"Too many request in the allowed time frame\" |\n",
        "operationId": "sandbox_send_otp_post_v2",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "App-ID",
              "type": "string"
            },
            "name": "app-id",
            "in": "header"
          },
          {
            "required": true,
            "schema": {
              "title": "API-Key",
              "type": "string"
            },
            "name": "api-key",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendOtp"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseSendOTP"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseSend400"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseSend401"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseSend429"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseSend500"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SendOtp": {
        "title": "SendOtp",
        "required": [
          "msisdn"
        ],
        "type": "object",
        "properties": {
          "msisdn": {
            "description": "Destination Phone Number. You need to include international prefix number.",
            "type": "string",
            "example": "6282123060001"
          },
          "template": {
            "description": "Optional.Template to be send to destination number. Include $OTP in template for generated OTP.",
            "type": "string",
            "example": "This is your Verihubs OTP $OTP."
          },
          "otp": {
            "description": "Optional. Code generated by client.",
            "type": "string",
            "example": "234123"
          },
          "time_limit": {
            "description": "Optional. Expiration time for verify OTP in seconds.",
            "type": "string",
            "example": "300"
          },
          "challenge": {
            "description": "This value is a category. You can verify OTP based on the same challenge.",
            "type": "string",
            "example": "update_account"
          },
          "callback_url": {
            "description": "Optional.  This URL will be called by the server when the desired event will occur.",
            "type": "string",
            "example": "https://your-url-callback.com"
          }
        }
      },
      "ResponseSendOTP": {
        "title": "ResponseSendOTP",
        "required": [
          "message",
          "otp",
          "msisdn",
          "session_id",
          "try_count"
        ],
        "type": "object",
        "properties": {
          "message": {
            "description": "Message",
            "type": "string",
            "example": "OTP sent successfully"
          },
          "otp": {
            "description": "Code received by destination number.",
            "type": "string",
            "example": "234123"
          },
          "msisdn": {
            "description": "destination number with international prefix country code.",
            "type": "string",
            "example": "6282123060001"
          },
          "session_id": {
            "description": "Generated ID which associated with verification request.",
            "type": "string",
            "example": "adwaww-wdwa-fegr-wrwr"
          },
          "try_count": {
            "description": "Shows count of send OTP attempts to destination number in the span of 10 minutes.",
            "type": "integer",
            "example": 2
          },
          "segment_count": {
            "description": "Shows segmentation SMS where SMS with over 160 characters will be split into more than 1 segment.",
            "type": "integer",
            "example": 2
          }
        }
      },
      "ResponseSend400": {
        "title": "Error Validation",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "description": "Message",
            "type": "string",
            "example": "Msisdn is not allowed, please use the custom msisdn"
          }
        }
      },
      "ResponseSend401": {
        "title": "Error Validation",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "description": "Message",
            "type": "string",
            "example": "Authorization failed"
          }
        }
      },
      "ResponseSend429": {
        "title": "Error Validation",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "description": "Message",
            "type": "string",
            "example": "Too many request in the allowed time frame"
          }
        }
      },
      "ResponseSend500": {
        "title": "Error Validation",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "description": "Message",
            "type": "string",
            "example": "Internal Server Error"
          }
        }
      }
    }
  }
}
```