---
title: "Generate OTP"
method: POST
path: "/otp/generate"
---

# Generate OTP

`POST /otp/generate`

This page provides you with information on generating OTP.

## Request body

- object
  - `entityType` 'mobile' | 'email', required — Specify MOBILE to identify customer by mobile number or EMAIL to identify customer by email id.
  - `entityValue` string, required — Specify the registered mobile number or email id of the customer based on the entityType passed.
  - `action` 'COUPON' | 'POINTS' | 'REGISTRATION' | 'USERGROUP' | 'SUBSCRIPTION' | 'GENERIC' | 'POINTSTRANSFER' | 'CUSTOMER_STATUS_UPDATE' | 'CUSTOMER_IDENTIFIER_CHANGE' | 'CUSTOMER_ISSUE_LINK_CARD.', required — Choose the action for which the OTP has to be issued.
  - `whatsappTemplateName` string — Approved WhatsApp template name
  - `template` string — Message template to send OTP through SMS.
  - `emailTemplate` object — Email template to send OTP on email.
    - `subject` string — Subject line for the email.
    - `body` string — Email template to send OTP on email.
  - `channels` unknown[], required — Details of channel(s) through which you want to issue OTP.
    - unknown
  - `zaloTemplateIdentifier` string — ZALO template identifier

## Response `200`

200

- object
  - `createdId` integer
  - `warnings` unknown[]
    - unknown

## Other responses

- `400` — 400

---

[API](https://skmtc.net/capillarytech/apis/sample-api.md) · [All operations](https://skmtc.net/capillarytech/apis/sample-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/capillarytech/sample-api/revisions/de241f2ed9b3/schema)
