# Check Instance Health Source: https://docs.hypersender.com/v2/api-reference/enterprise/instance-management/check-health v2/api-reference/enterprise/enterprise-collection.json GET /{instance}/health Check the current health status of a WhatsApp instance by its UUID to monitor connectivity and readiness. Check the current health status and connection state of your WhatsApp instance using its UUID. ## Rate Limit This endpoint is limited to **10 requests per minute** to prevent abuse and ensure system stability. ## Response Fields * `instance_id` - The UUID of your WhatsApp instance * `connected_at` - Timestamp when the instance was connected * `status` - Current status of the instance ## Instance Status Values * `STOPPED`: Instance is stopped * `STARTING`: Instance is starting up * `WORKING`: Instance is running and ready to use * `SCAN_QR_CODE`: Waiting for QR code to be scanned * `FAILED`: Instance failed to start * `PENDING`: Awaiting server assignment ## Use Cases * Monitor instance health in your dashboard * Verify instance is ready before sending messages * Troubleshoot connection issues * Automated health checks in monitoring systems Check the instance health before attempting to send messages to ensure the instance is in `WORKING` status. # Create Instance Source: https://docs.hypersender.com/v2/api-reference/enterprise/instance-management/create-instance v2/api-reference/enterprise/enterprise-collection.json POST /create-instance Create a new WhatsApp instance with a phone number, name, and optional webhook URL for receiving events. Create a new WhatsApp instance associated with a phone number and a user-defined name. Upon creation, you'll receive a QR code to scan with your WhatsApp mobile app. ## Rate Limit This endpoint is limited to **5 requests per minute** to prevent abuse. ## Request Body * `phone` (required) - Phone number in E.164 format (e.g., +201234567890) * `name` (required) - Instance name (max 50 characters, must be unique per user per service) * `webhook_url` (optional) - HTTPS webhook URL to receive WhatsApp events ## Response Upon successful creation, you'll receive: * Instance details (id, name, phone, service\_type, status) * `qr_code` - Base64-encoded PNG QR code for WhatsApp authentication * `access_token` - Bearer token for authenticating API requests * `created_at` - Creation timestamp ## QR Code Display The QR code is returned as a base64-encoded PNG **without** the data URI prefix. To display it in HTML: ```html theme={null} WhatsApp QR Code ``` ## Next Steps After creating the instance: 1. Display the QR code to the user 2. Open WhatsApp on the mobile device 3. Go to Settings > Linked Devices 4. Scan the QR code 5. Wait for the instance status to change to `WORKING` The QR code expires after a certain time. If it expires, use the [Request New QR Code](/api-reference/enterprise/instance-management/request-new-qr-code) endpoint to generate a fresh one. Set up a webhook URL to receive real-time events from your WhatsApp instance, including incoming messages and connection status updates. ## Validation Errors Common validation errors (422 status): * Missing `phone` or `name` field * Invalid phone number format * Instance name already exists * Invalid webhook URL (must be HTTPS) * Name exceeds 50 characters # List Instances Source: https://docs.hypersender.com/v2/api-reference/enterprise/instance-management/list-instances v2/api-reference/enterprise/enterprise-collection.json GET /instances Retrieve all WhatsApp instances associated with your account with powerful filtering options. List all WhatsApp instances associated with your authenticated account. Use filters to narrow down results by UUID, name, phone number, or status. ## Filtering Options You can filter the list of instances using the following query parameters: * `filter[uuid]` - Filter by instance UUID (exact match) * `filter[name]` - Filter by instance name (partial match) * `filter[phone]` - Filter by phone number (exact match) * `filter[status]` - Filter by instance status ## Response Fields Each instance in the response includes: * `id` - Instance UUID * `name` - Instance name * `phone` - Phone number in E.164 format * `service_type` - Service type (whatsapp) * `status` - Current instance status * `access_token` - Access token for the instance (null if not yet connected) * `created_at` - Creation timestamp ## Example Use Cases * Display all instances in your application dashboard * Filter instances by status to show only active ones * Search for a specific instance by name or phone number * Monitor all instances created at a specific time Use the `filter[status]` parameter with value `WORKING` to get only active and ready instances. ## Instance Status Values * `STOPPED`: Instance is stopped * `STARTING`: Instance is starting up * `WORKING`: Instance is running and ready * `SCAN_QR_CODE`: Waiting for QR code scan * `FAILED`: Instance failed to start * `PENDING`: Awaiting server assignment # Request New QR Code Source: https://docs.hypersender.com/v2/api-reference/enterprise/instance-management/request-new-qr-code v2/api-reference/enterprise/enterprise-collection.json POST /{instance}/request-new-qr-code Generate a new QR code for instance authentication after an expired or failed scan. Force the instance to generate a new QR code when the previous one has expired or the scan failed. This is useful when users take too long to scan the QR code or encounter connection issues. ## Rate Limit This endpoint is limited to **1 request per minute** to prevent abuse and protect against rapid QR code generation attempts. ## When to Use Use this endpoint when: * The QR code has expired (typically after 60 seconds) * The initial QR code scan failed * The user closed the scanning interface without completing authentication * You need to refresh the authentication flow ## Response The response includes: * Updated instance details * `qr_code` - New base64-encoded PNG QR code * Current instance status (should be `SCAN_QR_CODE`) * `access_token` - Your instance access token ## QR Code Display The QR code is returned as a base64-encoded PNG **without** the data URI prefix. To display it in HTML: ```html theme={null} WhatsApp QR Code ``` ## Authentication Flow 1. Request a new QR code 2. Display it to the user 3. User scans with WhatsApp mobile app (Settings > Linked Devices) 4. Monitor instance status until it changes to `WORKING` Due to the rate limit of 1 request per minute, avoid calling this endpoint repeatedly. Implement proper error handling and inform users about the cooldown period. Consider implementing a timer in your UI to show when users can request a new QR code after hitting the rate limit. ## Error Responses * **404**: Instance not found - Check if the instance UUID is correct * **429**: Rate limit exceeded - Wait at least 60 seconds before requesting again # Restart Instance Source: https://docs.hypersender.com/v2/api-reference/enterprise/instance-management/restart-instance v2/api-reference/enterprise/enterprise-collection.json POST /{instance}/restart Restart a WhatsApp instance to resolve connection issues or refresh its state. Restart a WhatsApp instance when it's stuck, not responding properly, or experiencing connection issues. This endpoint performs a clean restart of the instance. ## Rate Limit This endpoint is limited to **5 requests per minute** to prevent abuse and ensure system stability. ## When to Use Restart your instance when: * The instance is stuck in a `STARTING` or `PENDING` state * Messages are not being sent or received * The instance is not responding to health checks * After extended periods of inactivity * When experiencing unexplained connection issues ## Response Upon successful restart: * **200 OK**: Instance restarted successfully * The instance will go through the startup sequence * Status will transition: `STOPPED` → `STARTING` → `WORKING` ## Important Notes Restarting an instance will temporarily interrupt message sending and receiving. Plan restarts during low-activity periods if possible. ## Restart Process 1. Send restart request 2. Instance stops current operations 3. Instance begins startup sequence 4. Connection is re-established 5. Instance returns to `WORKING` status ## Monitoring After Restart After restarting an instance, monitor its status: ``` 1. Call restart endpoint 2. Wait 5-10 seconds 3. Use Check Instance Health endpoint 4. Verify status is WORKING ``` If the restart fails with a 500 error, try restarting the instance manually from the Hypersender dashboard or contact support if the issue persists. ## Error Responses * **404**: Instance not found - Verify the instance UUID is correct * **429**: Rate limit exceeded - Wait before attempting another restart * **500**: Failed to restart instance - Try manual restart from dashboard or contact support ## Alternative **If the API restart fails, you can always restart the instance manually from the Hypersender dashboard as a fallback option.** # Introduction Source: https://docs.hypersender.com/v2/api-reference/enterprise/introduction Hypersender Enterprise WhatsApp API Documentation - Premium Access & Advanced Features Welcome to the **Hypersender Enterprise WhatsApp API** documentation! We're delighted to have you as one of our valued enterprise partners. This documentation is designed specifically for organizations like yours that demand powerful, scalable WhatsApp messaging solutions with advanced capabilities. ## What Makes Enterprise Special As an enterprise client, you're at the heart of what we do. We've built Hypersender to scale with your business needs, and your enterprise subscription unlocks a premium experience: Access to all standard API endpoints for WhatsApp messaging Exclusive access to enterprise-grade features and advanced endpoints Dedicated support team to ensure your success Higher rate limits and throughput for mission-critical operations Easily generate, revoke, and manage API tokens for your applications ## Your Complete API Toolkit As an enterprise customer, you have access to: 1. **All Standard WhatsApp Endpoints** - Every feature available in our standard WhatsApp API, including sending and receiving messages, managing chats, handling media, and monitoring message status 2. **Enterprise-Exclusive Endpoints** - Advanced features designed for complex business workflows and large-scale WhatsApp operations 3. **Enhanced Performance** - Optimized infrastructure to handle your high-volume WhatsApp messaging needs 4. **Easily Manage API Tokens** - Generate, Revoke, and manage API tokens directly from the dashboard for secure access to your applications This documentation focuses on the enterprise-specific features. You can also refer to our [standard WhatsApp API documentation](/v1/api-reference/whatsapp/introduction) for core functionality that's available across all plans. ## How it works Hypersender provides a powerful API that enables you to send and receive WhatsApp messages using your Android devices. The system works seamlessly: your API requests are processed through our infrastructure and delivered to your connected devices, which then send messages to recipients through WhatsApp. The API provides comprehensive message receiving capabilities, media handling, and real-time message status monitoring. ## Enterprise-Specific Features Your enterprise subscription includes access to advanced capabilities that streamline complex operations: ### Multi-Device Management Efficiently manage multiple Android devices across your organization with centralized control and monitoring. ### Advanced Analytics Gain deeper insights into your messaging operations with comprehensive analytics and reporting tools. ### Custom Webhooks Configure sophisticated webhook routing and event handling for seamless integration with your systems. ### Instance Management API Programmatically manage your WhatsApp instances with our powerful Instance Management API: * **Check Instance Health** - Monitor connection status and readiness (10 req/min) * **List Instances** - Retrieve and filter all your instances * **Create Instance** - Provision new WhatsApp instances automatically (5 req/min) * **Request New QR Code** - Generate fresh QR codes for authentication (1 req/min) * **Restart Instance** - Resolve connection issues programmatically (5 req/min) ### Generate and Revoke API Tokens Easily generate and revoke API tokens for secure access to your applications: * **Generate Token** - Create new API tokens with customizable permissions (5 req/min) Generate Token * **Revoke Token** - Invalidate existing tokens to maintain security (5 req/min) Revoke Token **Getting Started:** If you're new to Hypersender, we recommend starting with our [standard WhatsApp API documentation](/v1/api-reference/enterprise/introduction.mdx) to understand the core concepts, then explore the enterprise-specific features documented here. ## Getting Started To help you get up and running quickly, here are some key resources and links: Explore all standard WhatsApp API endpoints Manage WhatsApp instances programmatically Try sending your first WhatsApp message with Postman Set up WhatsApp webhook integrations Learn how to avoid getting blocked on WhatsApp ## Postman Collection We've prepared a comprehensive Postman Collection to help you quickly explore and test our API endpoints. Download the complete Enterprise API Postman Collection with all endpoints. ## Authentication All API endpoints use secure Bearer token authentication. Your enterprise API keys provide access to both standard and enterprise-exclusive endpoints. ```json theme={null} "security": [ { "bearerAuth": [] } ] ``` **Security Best Practice:** Treat your API keys like passwords. Never expose them in client-side code or public repositories. Use environment variables and secure key management systems for production deployments. ## Support & Resources As an enterprise customer, you have access to priority support: * **Dedicated Account Manager:** Your primary point of contact for strategic discussions * **Technical Support:** Priority access to our engineering team for technical issues * **Documentation:** This comprehensive documentation, regularly updated with new features **Need Help?** Your account manager is here to ensure your success. Don't hesitate to reach out with questions, feature requests, or integration challenges. We're invested in your success! *** Thank you for choosing Hypersender Enterprise. We're excited to be part of your messaging infrastructure and look forward to supporting your growth. Let's build something amazing together! 🚀 # How to generate OTP link in Postman Source: https://docs.hypersender.com/v2/api-reference/otp/generate-whatsapp-otp-link-with-hypersender-api Generate a WhatsApp OTP magic link for passwordless authentication. In this guide, we will show you how to create an OTP link using Postman.