Restart Instance
curl --request POST \
--url https://app.hypersender.com/api/whatsapp/v1/{instance}/restart \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v1/{instance}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.hypersender.com/api/whatsapp/v1/{instance}/restart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v1/{instance}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "WhatsApp instance restarted successfully."
}{
"message": "Resource not found."
}{
"message": "Too many requests. Please try again later."
}{
"message": "Failed to restart WhatsApp instance. Please try restarting the instance from hypersender dashboard."
}Restart Instance
Restart a WhatsApp instance to resolve connection issues or refresh its state.
POST
/
{instance}
/
restart
Restart Instance
curl --request POST \
--url https://app.hypersender.com/api/whatsapp/v1/{instance}/restart \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.hypersender.com/api/whatsapp/v1/{instance}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/whatsapp/v1/{instance}/restart"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.hypersender.com/api/whatsapp/v1/{instance}/restart")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/whatsapp/v1/{instance}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "WhatsApp instance restarted successfully."
}{
"message": "Resource not found."
}{
"message": "Too many requests. Please try again later."
}{
"message": "Failed to restart WhatsApp instance. Please try restarting the instance from hypersender dashboard."
}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
STARTINGorPENDINGstate - 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
- Send restart request
- Instance stops current operations
- Instance begins startup sequence
- Connection is re-established
- Instance returns to
WORKINGstatus
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.Authorizations
Bearer token authentication. Example: Bearer 234|3uB2pBST2H6If8twXIeUaeNu23VJ8XassYoOVJuva48388e1
Headers
application/json
Example:
"application/json"
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Response
Instance restarted successfully
Example:
"WhatsApp instance restarted successfully."