---
title: "OTP"
method: POST
path: "/v1/send/otp"
tags: ["Envio"]
---

# OTP

`POST /v1/send/otp`

Envia uma senha OTP para um contato no WhatsApp.
OTP = One time password.
O campo Code é opcional; se não informado, será gerado um código de 5 dígitos aleatórios.
O campo SenderId pode ser usado para controle do seu sistema.
O CallbackUrl permite receber webhook quando a mensagem for entregue ou falhar.
Este endpoint tem rate limit individual e permite 1000 requisições a cada 2 minutos.

## Request body

- PublicReqSendOtpMessageV2DTO
  - `code` string, nullable — Código a ser enviado. Caso não seja informado, um código aleatório será gerado.
  - `templateId` string, nullable — ID do modelo de mensagem do tipo Autenticação
  - `from` string, required — Número do canal cadastrado na conta.
  - `to` string, required — Número de telefone do destinatário.
  - `callbackUrl` string, nullable — URL para receber webhook quando a mensagem for entregue ou falhar
  - `senderId` string, nullable — ID de identificação no seu sistema para rastreamento e consulta da mensagem.

## Response `200`

Success

- PublicRespSendOtpMessageDTO
  - `id` string, uuid
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `code` string, nullable
  - `status` 'UNDEFINED' | 'PENDING' | 'SENT' | 'RECEIVED' | 'FAILED'
  - `from` string, nullable
  - `templateId` string, nullable
  - `companyId` string, uuid
  - `senderId` string, nullable
  - `channelId` string, uuid, nullable
  - `sentAt` string, date-time, nullable
  - `receivedAt` string, date-time, nullable
  - `contactPhoneNumber` string, nullable
  - `failedReason` string, nullable
  - `callbackUrl` string, nullable
  - `statusUrl` string, nullable

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `429` — Too Many Requests
- `500` — Server Error

---

[API](https://skmtc.net/helena/apis/core.md) · [All operations](https://skmtc.net/helena/apis/core/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/helena/core/revisions/811b2cdd2ec2/schema)
