# Migrating from API v1

Existing v1 JSON routes use X-API-Key, phoneNumber and verificationCodeId. v2 uses to and verificationId and has different response envelopes. These contracts specify no retirement date.

| Operation | Migration notes |
| --- | --- |
| `POST /api/v1/messages/send` | Queue a session message and save the queueId. Reconcile queue status before migrating. |
| `POST /api/v1/send-message` | Direct session send. Select the desired WhatsApp channel and sender explicitly in v2. |
| `POST /api/v1/messages/send-custom` | Legacy channel selection and optional custom code. Set channel, messageType and content for the intended v2 message. |
| `POST /api/v1/password/send` | Queues a password message. For one-time login codes, use the managed verification lifecycle in v2. |
| `POST /api/v1/verification/send` | Send a managed OTP. In v2 use to and store the returned verificationId. |
| `POST /api/v1/verification/send-custom` | Accepts a caller-supplied 4–10 digit code. The v2 managed verification send generates the code. |
| `POST /api/v1/verification/resend` | Use verificationId or to in v2 and honor resendAvailableAt. |
| `POST /api/v1/verification/verify` | An incorrect code in v1 can have an HTTP-success envelope. In v2 a failed verification returns an error status. Require verified=true for login. |

[OpenAPI v2](/api-docs/openapi.json) · [OTP](/api-docs/markdown/guides/otp.md) · [SMS](/api-docs/markdown/guides/sms.md)
