Lista de Instâncias
curl --request GET \
--url https://api.zapsterapi.com/v1/wa/instances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zapsterapi.com/v1/wa/instances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zapsterapi.com/v1/wa/instances', 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.zapsterapi.com/v1/wa/instances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.zapsterapi.com/v1/wa/instances"
req, _ := http.NewRequest("GET", 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.get("https://api.zapsterapi.com/v1/wa/instances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapsterapi.com/v1/wa/instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 123,
"instances": [
{
"created_at": "2024-10-03T21:56:22.620Z",
"id": "xy9rexnkwobmgg3tehgvs",
"metadata": {
"customer_id": "123456",
"customer_name": "Joãozinho",
"phone_number": "+5587989075555"
},
"name": "MyNewInstance2",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": null
},
"settings": {
"delay_per_word": true,
"delete_chat_after_sent": true,
"message_delay": {
"enabled": true,
"max": 10,
"min": 1
}
},
"status": "disconnected",
"webhooks": [
{
"enabled": true,
"events": [
"message.received"
],
"id": "2nenz69l0xbf0m3uu9tfo",
"name": "Webhook Name",
"test_mode": false,
"url": "https://webhook.mydomain.com",
"test_url": null
}
],
"connection_type": "unofficial",
"qrcode": null,
"lookup_key": "ins_8j7wlxmpjlixx9mux5"
}
]
}Instâncias
Listando Instâncias
GET
/
wa
/
instances
Lista de Instâncias
curl --request GET \
--url https://api.zapsterapi.com/v1/wa/instances \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zapsterapi.com/v1/wa/instances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zapsterapi.com/v1/wa/instances', 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.zapsterapi.com/v1/wa/instances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.zapsterapi.com/v1/wa/instances"
req, _ := http.NewRequest("GET", 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.get("https://api.zapsterapi.com/v1/wa/instances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zapsterapi.com/v1/wa/instances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"total": 123,
"instances": [
{
"created_at": "2024-10-03T21:56:22.620Z",
"id": "xy9rexnkwobmgg3tehgvs",
"metadata": {
"customer_id": "123456",
"customer_name": "Joãozinho",
"phone_number": "+5587989075555"
},
"name": "MyNewInstance2",
"owner": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"display_name": null
},
"settings": {
"delay_per_word": true,
"delete_chat_after_sent": true,
"message_delay": {
"enabled": true,
"max": 10,
"min": 1
}
},
"status": "disconnected",
"webhooks": [
{
"enabled": true,
"events": [
"message.received"
],
"id": "2nenz69l0xbf0m3uu9tfo",
"name": "Webhook Name",
"test_mode": false,
"url": "https://webhook.mydomain.com",
"test_url": null
}
],
"connection_type": "unofficial",
"qrcode": null,
"lookup_key": "ins_8j7wlxmpjlixx9mux5"
}
]
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parâmetros de consulta
Filtrar por identificador de pesquisa
Para registros páginados, define qual página quer buscar.
Limita o número de registros por página.
Filtrar por status
Opções disponíveis:
disconnected, connected, offline ⌘I