POST/api/v1/auth/initiateAuth: ApiKey
Initiate Authentication
Initiate an authentication flow for any supported channel (passkeys, whatsapp, telegram, discord, qr, push, totp, email, or sms). Generates an ephemeral session ID.
Request Headers
| Header | Value | Description |
|---|---|---|
| X-Publishable-Key | pk_live_... | Tenant publishable client key |
| Content-Type | application/json | JSON payload |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| provider | string | Required | One of: "passkeys", "whatsapp", "whatsapp_meta", "telegram", "discord", "qr", "push", "totp", "email", "sms". e.g. "whatsapp" |
| targetIdentifier | string | Required | User identifier: phone number (+91...), email, username, or Telegram handle. e.g. "+919876543210" |
| sessionId | string | Optional | Optional custom session ID. If omitted, a cryptographic 24-byte hex ID is generated. e.g. "sess_9f8b2c4e1a" |
| redirectUrl | string | Optional | Destination URL for deep-links or OAuth redirects. e.g. "https://yourapp.com/dashboard" |
Client Implementation
Terminal Command
curl -X POST https://auth.zorviktech.com/api/v1/auth/initiate \
-H "X-Publishable-Key: pk_live_9f8b2c" \
-H "Content-Type: application/json" \
-d '{
"provider": "whatsapp",
"targetIdentifier": "+919876543210"
}'Response Schemas
200Session initiated successfully
{
"success": true,
"sessionId": "sess_3f8b912a7e",
"provider": "whatsapp",
"actionUrl": "https://wa.me/918001234567?text=VERIFY%203F8B91",
"expiresIn": 300
}400Validation failure or channel unconfigured
{
"success": false,
"error": "Target identifier is required."
}