Listar canales (Socio)
curl --request GET \
--url https://api.omni.z-api.io/v1/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/v1/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/v1/channels', 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.omni.z-api.io/v1/channels",
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.omni.z-api.io/v1/channels"
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.omni.z-api.io/v1/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/v1/channels")
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": 37,
"totalPage": 2,
"pageSize": 20,
"page": 0,
"content": [
{
"id": "AA0C61D24A6549A3BF83239847DE1CC2",
"name": "Suporte",
"token": "F1B29C3D4E5A6B7C8D9E0F1A2B3C4D5E",
"tenant": "01A090B7FB82798CB38AB259C0B65FBE",
"type": "META_WHATSAPP",
"created": "2026-03-11T14:02:00.000Z",
"due": 1774915200000,
"paymentStatus": "PAID",
"phoneConnected": true,
"whatsappConnected": true,
"phoneNumberConnected": "5585999999999",
"businessId": "102938475610293",
"whatsappCoexistence": false,
"webhooksCount": 2
}
]
}Canales
Listar canales
Lista los canales de tu workspace mediante la API
GET
/
v1
/
channels
Listar canales (Socio)
curl --request GET \
--url https://api.omni.z-api.io/v1/channels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/v1/channels"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.omni.z-api.io/v1/channels', 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.omni.z-api.io/v1/channels",
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.omni.z-api.io/v1/channels"
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.omni.z-api.io/v1/channels")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/v1/channels")
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": 37,
"totalPage": 2,
"pageSize": 20,
"page": 0,
"content": [
{
"id": "AA0C61D24A6549A3BF83239847DE1CC2",
"name": "Suporte",
"token": "F1B29C3D4E5A6B7C8D9E0F1A2B3C4D5E",
"tenant": "01A090B7FB82798CB38AB259C0B65FBE",
"type": "META_WHATSAPP",
"created": "2026-03-11T14:02:00.000Z",
"due": 1774915200000,
"paymentStatus": "PAID",
"phoneConnected": true,
"whatsappConnected": true,
"phoneNumberConnected": "5585999999999",
"businessId": "102938475610293",
"whatsappCoexistence": false,
"webhooksCount": 2
}
]
}Conceptos
Devuelve los canales del workspace de tu Secret Key, del más reciente al más antiguo. Los canales eliminados no aparecen, y los de otros workspaces tampoco: el alcance es siempre la cuenta dueña de la clave.Paginación
| Parámetro | Valor por defecto | Límite |
|---|---|---|
page | 0 | — |
pageSize | 20 | 100 |
total (canales que cumplen el filtro), totalPage, pageSize y page, con los canales en content.
Filtros
| Parámetro | Efecto |
|---|---|
query | Parte del nombre del canal, sin distinguir mayúsculas de minúsculas, o el inicio del identificador |
type | Tecnología del canal: META_WHATSAPP, Z_API_WHATSAPP, META_INSTAGRAM, META_MESSENGER, BOT_TELEGRAM |
middleware | Sinónimo de type. Si se envían ambos, prevalece type |
En Z-API,
middleware indica si la instancia corre en web o mobile. En Omni no existe esa distinción: el campo guarda la tecnología del canal, el mismo valor aceptado en Crear canal. El parámetro middleware existe para quien migró desde Z-API y mantiene el nombre antiguo en su código.Webhooks del canal
Cada canal traewebhooksCount, la cantidad de endpoints de webhook registrados en él. Para ver las URLs y los eventos de cada uno, usa Consultar canal o Listar webhooks.Autorizaciones
Secret Key generada en el panel de Seguridad de Omni Z-API
Parámetros de consulta
Pagina deseada, empezando en 0
Rango requerido:
x >= 0Cantidad de canales por pagina (1 a 100)
Rango requerido:
1 <= x <= 100Filtra por parte del nombre del canal o por el inicio del identificador
Ejemplo:
"suporte"
Filtra por la tecnologia del canal
Opciones disponibles:
META_WHATSAPP, Z_API_WHATSAPP, META_INSTAGRAM, META_MESSENGER, BOT_TELEGRAM Sinonimo de type, para quien viene de Z-API. Si se envian ambos, prevalece type
Opciones disponibles:
META_WHATSAPP, Z_API_WHATSAPP, META_INSTAGRAM, META_MESSENGER, BOT_TELEGRAM