{"openapi":"3.0.0","info":{"title":"ReOTP API","version":"1.0.0","description":"The official API documentation for ReOTP Digital Verification Service."},"servers":[{"url":"https://api.reotp.com","description":"Production Server"},{"url":"http://localhost:3000","description":"Local Development"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API_KEY"}}},"security":[{"bearerAuth":[]}],"paths":{"/api/verify/init":{"post":{"summary":"Initialize Verification","description":"Sends an OTP code via WhatsApp or Telegram to the specified phone number.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"The phone number to verify (with country code, e.g., +2010...)"},"method":{"type":"string","enum":["WHATSAPP","TELEGRAM"],"default":"WHATSAPP","description":"The delivery method"}},"required":["phoneNumber"]}}}},"responses":{"200":{"description":"Verification initiated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"requestId":{"type":"string"},"waLink":{"type":"string","description":"WhatsApp click-to-chat link if applicable"},"tgLink":{"type":"string","description":"Telegram bot link if applicable"},"expectedText":{"type":"string"},"expiresIn":{"type":"string"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized - Invalid API Key"},"429":{"description":"Too Many Requests (Rate Limited)"}}}},"/api/verify/status":{"get":{"summary":"Check Verification Status","description":"Check the status of a previously initiated verification request using the requestId.","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"The requestId returned from /api/verify/init"}],"responses":{"200":{"description":"Status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["PENDING","VERIFIED","EXPIRED"]},"phoneNumber":{"type":"string"}}}}}},"404":{"description":"Request not found"}}}}}}