Create an OTP Template

Prev Next

After creating your WhatsApp channel, you can define OTP templates that will be used when sending verification messages. Ensure the template name matches an existing authentication template in your WhatsApp Business Account.

Endpoint and Headers

POST https://verify.useinsider.com/v1/template/create


This API key is sensitive and should never be used on the frontend or mobile SDK; it should only be implemented on the backend.

Visit our Postman collection to test this request.

Headers

HeaderSample ValueDescription
X-INS-AUTH-KEY1a2b3c4d5e6fThis key is required to authorize your request. Refer to API Authentication Tokens to generate your token.
Content-Typeapplication/jsonThis header specifies the media type of the resource.

Body Parameters

ParameterDescriptionData TypeRequiredRules
channelThe channel to which you will send the OTP code. It will be WhatsApp.StringYesoneof:whatsapp
localeDetermines the language/locale in which the OTP code message will be sent.StringYes

oneof:pt af sq ar az bn bg ca zh_CN zh_HK zh_TW hr cs da nl en en_GB en_US et fil fi fr ka de el gu ha he hi hu id ga it ja kn kk rw_RW ko ky_KG lo lv lt mk ms ml mr nb fa pl pt_BR pt_PT pa ro ru sr sk sl es es_AR es_ES es_MX sw sv ta te th tr uk ur uz vi zu


templateNameThe template name that will be insertedStringYesThe template has to exist already.

Sample Request

Every request made to the request endpoint requires a request body formatted in JSON and containing your parameters. 

Your title goes here
Make sure to replace the sample values in the request header(s) and body where required before sending your request.

Below is a sample request to create a new WhatsApp verification template with a specified locale and template name.

curl --location 'https://verify.useinsider.com/v1/template/create' \
--header 'Content-Type: application/json' \
--header 'x-ins-auth-key: 1a2b3c4d5e6f' \
--data '{
  "channel": "whatsapp",
  "locale": "tr",
  "templateName": "otp_template"
}'

Sample Responses

202 Accepted

{
    "status": "success"
}

400 Bad Request: Invalid request payload

{
    "errors": [
        {
            "message": "invalid request payload"
        }
    ]
}

400 Bad Request: Invalid channel value

{
    "errors": [
        {
            "message": "this field must be one of these:whatsapp",
            "field": "text"
        }
    ]
}

401 Unauthorized

{
    "errors": [
        {
            "message": "unauthorized"
        }
    ]
}

409 Conflict

{
    "errors": [
        {
            "message": "no changes detected"
        }
    ]
}

429 Too Many Requests

{
    "errors": [
        {
            "message": "rate limit exceeded"
        }
    ]
}

500 Internal Server Error

{
    "errors": [
        {
            "message": "server error"
        }
    ]
}

Limitations

  • All functions must be executed with a simple HTTPS POST request.
  • The API Key should be provided as the authorization key in the request header. If the key is incorrect, the operation will not be executed and an authorization error will return in the response.
  • For effective usage, create a dedicated template for each language.
  • The service is subject to a rate limit of 100 requests per second to ensure optimal system performance, and clients exceeding this limit will receive an HTTP 429 Too Many Requests response.

The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.