Skip to main content
POST
Node.js

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer rw_....

Required scope: message:write.

Headers

Idempotency-Key
string

Optional key used to safely retry the same create request without creating duplicates.

Required string length: 1 - 64
Example:

"msg:login-otp:2026-03-20T14:22"

Body

application/json
to
string
required

Destination number that should receive the OTP.

Example:

"+5511999999999"

prefix
string

Short brand prefix included in the OTP SMS.

Required string length: 1 - 32
Example:

"Rewrite"

expiresIn
integer

Minutes until the OTP expires.

Required range: 1 <= x <= 15
Example:

5

Response

200 - application/json

Successful response

ok
boolean
required
data
object
required