OTP API
Send a code generated by your application using an approved Authentication template. Your application generates, expires, and verifies the code; Watification provides the message status.
OTP API guideOTP delivery, order confirmations, and refusal checks for WhatsApp. Connect your backend and receive outcomes through signed webhooks.
Create a workspace API key, find your Sender ID, and choose an approved authentication template. Send a code your application generated.
The sample values are fictional. Keep the API key on your server and use a recipient you control. There is no sandbox or test-mode key; requests can send real messages.
Open the API referenceconst response = await fetch(
'https://api.watification.com/api/v1/otp/messages',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.WATIFICATION_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': 'login-example-001',
},
body: JSON.stringify({
to: '+15555550123',
senderId: '11111111-1111-4111-8111-111111111111',
template: { name: 'login_code', language: 'en' },
code: '483920',
reference: 'login-example-001',
}),
},
);
const result = await response.json();
if (!response.ok) throw new Error(JSON.stringify(result));An accepted request returns 202 with status queued. Acceptance does not confirm delivery or verify the code.
Send a code generated by your application using an approved Authentication template. Your application generates, expires, and verifies the code; Watification provides the message status.
OTP API guideRequest confirmation of a cash-on-delivery order. Customers can confirm, cancel, or change the delivery time on WhatsApp. Read the status or receive the outcome through webhooks.
COD API guideAsk whether a delivery was refused and collect the reason. Refusal checks have their own API operation and monthly allowance, separate from order confirmations.
Refusal-check requirementsReceive signed HTTPS callbacks for message and COD outcomes. Verify signatures before accepting events. Send a test event, inspect delivery logs, and replay a delivery from the dashboard.
Webhook handlingCreate keys under Developers > API keys. The complete key is shown once; store it on your server. Revoke a key when you need to remove access.
Authentication guideAPI keys have a request limit of 20 requests per second. Read the stable code in Problem Details, honor Retry-After for request-rate limits, and distinguish quota errors from short rate limits.
Rate limits and errorsOTP templates require Authentication approval. COD templates require Utility approval and the required quick-reply buttons. Plan allowances and separate Meta message fees apply.
Read the developer quickstart