# Send OTP

Sends an OTP code to the holder via SMS or email. Use certIdOtp and deviceCode returned by enroll. See sendOtp.

Endpoint: POST /api/certificate/sendOtp
Version: 26.1.0.3
Security: basicAuth, sslCertificate

## Request fields (application/json):

  - `certIdOtp` (integer, required)
    OTP certificate identifier returned by enroll (certIdOtp).
    Example: 1234567

  - `deviceCode` (string, required)
    Device code returned by enroll (deviceCode).
    Example: "RHIDP0000000000000"

  - `smsOptions` (object)
    Required if otpType=SMS.

  - `smsOptions.templateId` (string)
    Identifier of a pre-configured SMS template. Required if textSMS is omitted.

  - `smsOptions.language` (string)
    ISO 3166-1 alpha-2 language code. Required if templateId is used.

  - `smsOptions.textSMS` (string)
    Custom SMS text. Use $OTP$ as placeholder for the OTP code. If omitted, the OTP is appended at the end.
    Example: "Your OTP code is: $OTP$"

  - `emailOptions` (object)
    Required if otpType=EMAIL.

  - `emailOptions.templateId` (string)
    Identifier of a pre-configured email template.

  - `emailOptions.language` (string)
    ISO 3166-1 alpha-2 language code.

## Response 500 fields (application/json):

  - `code` (integer, required)
    Application error code.
    Example: 242

  - `message` (string, required)
    Human-readable error description. For validation errors (code 242), includes field-level details in the format Input parameter invalid: [{field=..., message=...}].
    Example: "Input parameter invalid: [{field=disposableHolder, message=must not be null}]"


## Response 200 fields
