Delete Message
curl --request DELETE \
--url https://app.hypersender.com/api/sms/v1/{instance}/delete-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "action performed successfully",
"status": "success"
}
'import requests
url = "https://app.hypersender.com/api/sms/v1/{instance}/delete-message"
payload = {
"message": "action performed successfully",
"status": "success"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'action performed successfully', status: 'success'})
};
fetch('https://app.hypersender.com/api/sms/v1/{instance}/delete-message', 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/sms/v1/{instance}/delete-message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'action performed successfully',
'status' => 'success'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/sms/v1/{instance}/delete-message"
payload := strings.NewReader("{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.hypersender.com/api/sms/v1/{instance}/delete-message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/sms/v1/{instance}/delete-message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_body{}{
"errors": {},
"message": "The given data was invalid.",
"status": "400"
}{
"message": "Not Found"
}{
"message": "Internal Server Error"
}Delete a message from the chat.
DELETE
/
{instance}
/
delete-message
Delete Message
curl --request DELETE \
--url https://app.hypersender.com/api/sms/v1/{instance}/delete-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "action performed successfully",
"status": "success"
}
'import requests
url = "https://app.hypersender.com/api/sms/v1/{instance}/delete-message"
payload = {
"message": "action performed successfully",
"status": "success"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'action performed successfully', status: 'success'})
};
fetch('https://app.hypersender.com/api/sms/v1/{instance}/delete-message', 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/sms/v1/{instance}/delete-message",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'action performed successfully',
'status' => 'success'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hypersender.com/api/sms/v1/{instance}/delete-message"
payload := strings.NewReader("{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.hypersender.com/api/sms/v1/{instance}/delete-message")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hypersender.com/api/sms/v1/{instance}/delete-message")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"action performed successfully\",\n \"status\": \"success\"\n}"
response = http.request(request)
puts response.read_body{}{
"errors": {},
"message": "The given data was invalid.",
"status": "400"
}{
"message": "Not Found"
}{
"message": "Internal Server Error"
}Delete a message from the database and removes the message content from the list of threads.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Path Parameters
Instance UUID copied from hypersender dashboard
Example:
"{{ instance_id }}"
Query Parameters
Body
application/json
The body is of type object.
Response
No Content
The response is of type object.
⌘I