Update instance presence status
curl --request POST \
--url https://api.wppfy.com/instance/presence \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"presence": "available"
}
'import requests
url = "https://api.wppfy.com/instance/presence"
payload = { "presence": "available" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({presence: 'available'})
};
fetch('https://api.wppfy.com/instance/presence', 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://api.wppfy.com/instance/presence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'presence' => 'available'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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://api.wppfy.com/instance/presence"
payload := strings.NewReader("{\n \"presence\": \"available\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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.post("https://api.wppfy.com/instance/presence")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"presence\": \"available\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/presence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"presence\": \"available\"\n}"
response = http.request(request)
puts response.read_body{
"response": "Presence updated successfully"
}{
"error": "Invalid payload"
}{
"error": "client not found"
}{
"error": "No session"
}Instance
Update instance presence status
Updates the global presence status of the currently connected WhatsApp account. This endpoint allows you to:
- Set whether the account appears as available (“online”) or unavailable
- Control the presence status for all contacts
- Save the current presence state for the connected account
Supported presence types:
- available: Marks the account as available/online
- unavailable: Marks the account as unavailable/offline
Attention:
- The presence status may be temporarily changed to “available” (online) in some internal API situations, and as a result the last seen may also be updated.
- If this is a problem, consider changing your WhatsApp privacy settings to not show last seen and/or who can see your “online” status.
⚠️ Important - “unavailable” Presence Limitation:
- When the API is the only active device: Delivery/read receipts (gray/blue ticks) are neither sent nor received
- Impact:
message_updateevents with delivery status may not be received - Solution: If you need the receipts, keep WhatsApp Web or the mobile app active, or use presence “available”
Request example:
{
"presence": "available"
}
Response example:
{
"response": "Presence updated successfully"
}
Common errors:
- 401: Invalid or expired token
- 400: Invalid presence value
- 500: Error updating presence
POST
/
instance
/
presence
Update instance presence status
curl --request POST \
--url https://api.wppfy.com/instance/presence \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"presence": "available"
}
'import requests
url = "https://api.wppfy.com/instance/presence"
payload = { "presence": "available" }
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({presence: 'available'})
};
fetch('https://api.wppfy.com/instance/presence', 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://api.wppfy.com/instance/presence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'presence' => 'available'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <api-key>"
],
]);
$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://api.wppfy.com/instance/presence"
payload := strings.NewReader("{\n \"presence\": \"available\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<api-key>")
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.post("https://api.wppfy.com/instance/presence")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"presence\": \"available\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wppfy.com/instance/presence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"presence\": \"available\"\n}"
response = http.request(request)
puts response.read_body{
"response": "Presence updated successfully"
}{
"error": "Invalid payload"
}{
"error": "client not found"
}{
"error": "No session"
}Authorizations
Body
application/json
Presence status of the currently connected account
Available options:
available, unavailable Example:
"available"
Response
Presence updated successfully
Confirmation message
Example:
"Presence updated successfully"
