POST /open-api/customer/v1/send-otp to deliver an OTP it generated itself to a user over the DCS SMS or email channel.
This endpoint neither generates nor verifies the OTP. Generating and checking the OTP are the partner’s job; DCS only delivers it.
📄 Guide
Whether you already run your own SMS gateway or would rather reuse the DCS delivery channels, this endpoint sends a verification code to the user’s mobile number or email address: you generate the OTP and hand the delivery to us. The endpoint is for Partner-Managed partners and is typically used at the points in your own flows where you need to reach a user by SMS or email.this endpoint does not generate or verify OTPs. You generate the OTP, keep it and check it yourself; DCS only sends the OTP content out over the
channel you specify.End-to-end flow (who does what)
Endpoint
POST /open-api/customer/v1/send-otp
The request headers (authentication and signature) are the same as for every other /open-api/ endpoint: send X-DAPI-API-KEY, X-DAPI-TIMESTAMP, X-DAPI-NONCE and X-DAPI-SIGN, with Content-Type: application/json. See Authentication and signing for the details.
Request body fields
Required combinations per channel:
Plaintext and ciphertext
The recipient fields (mobile / email) and the OTP itself (otp) can each be sent in plaintext or as ciphertext. For data this sensitive we strongly recommend ciphertext:
- Ciphertext: fill in
mobileEncryption/emailEncryption/otpEncryptionusing AES-GCM, with your SecretKey as the key and the IV passed inencryptionIV. As soon as any ciphertext field is populated,encryptionIVbecomes mandatory. - Plaintext: fill in
mobile/email/otpand send the values as they are. - If you supply both the plaintext and the ciphertext of the same item, the ciphertext wins.
Minimum request example (SMS, plaintext)
Minimum request example (EMAIL, ciphertext)
Response example
Common response envelope: every/open-api/endpoint returns{ code, message, messageDetail, data }.codeis the business code (SYS_SUCCESSon success), andmessageDetailcarries human-readable copy (includingtitle/type/action/linkUrland so on) when there is something to show the end user, otherwise it may be empty. Decide success or failure fromcode, never from the HTTP status code or the wording ofmessagealone.
Response fields (data)
status=SUCCESSonly means that DCS handed the OTP to the downstream SMS or email gateway successfully; it is no guarantee that the user will receive it (the carrier or the mailbox provider may still get in the way). Whenstatus=FAILED, the responsecodetells you why the downstream delivery failed.
Rate limits
To keep the SMS and email channels from being abused, DCS rate-limits sends to the same recipient under the same Enterprise:
Exceeding the limit returns
OTP_SEND_TOO_FREQUENT. Ask the user to try again shortly rather than resending immediately.
Idempotency
otpSendRef is your own business idempotency key, and the same otpSendRef cannot be sent twice:
- First request: the OTP goes out and that
otpSendRefis recorded. - Repeat request (same
otpSendRef): returnsOTP_SEND_REF_NOT_UNIQUE.
otpSendRef (deriving it from your business reference plus a timestamp works well).
Common error codes
For the full set of business and error codes, see Authorization declines and error codes.
Prerequisites
- You hold the Enterprise ApiKey / SecretKey and have completed the signing and whitelist setup (see First steps and Authentication and signing).
- If you send ciphertext, your system needs AES-GCM support, with the Enterprise SecretKey as the key.

