Consultar canal (Parceiro)
curl --request GET \
--url https://api.omni.z-api.io/v1/channels/{channelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/v1/channels/{channelId}"
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/{channelId}', 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/{channelId}",
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/{channelId}"
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/{channelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/v1/channels/{channelId}")
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{
"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,
"webhooks": [
{
"id": "01A08132F180733B83D7B7BDFAF9E574",
"url": "https://parceiro.example.com/hook",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_DELIVERY"
]
}
]
}{
"error": "Authorization invalid"
}{
"error": "Channel not found"
}{
"error": "Channel listing requires ENTERPRISE role"
}Canais
Consultar canal
Consulte os dados de um canal pelo identificador
GET
/
v1
/
channels
/
{channelId}
Consultar canal (Parceiro)
curl --request GET \
--url https://api.omni.z-api.io/v1/channels/{channelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.omni.z-api.io/v1/channels/{channelId}"
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/{channelId}', 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/{channelId}",
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/{channelId}"
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/{channelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omni.z-api.io/v1/channels/{channelId}")
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{
"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,
"webhooks": [
{
"id": "01A08132F180733B83D7B7BDFAF9E574",
"url": "https://parceiro.example.com/hook",
"events": [
"MESSAGE_RECEIVED",
"MESSAGE_DELIVERY"
]
}
]
}{
"error": "Authorization invalid"
}{
"error": "Channel not found"
}{
"error": "Channel listing requires ENTERPRISE role"
}Conceituação
Retorna um canal do workspace da sua Secret Key, com os mesmos campos da listagem e mais os webhooks cadastrados nele — id, URL e eventos de cada endpoint.Canal de outro workspace responde
404, igual a canal inexistente. A resposta não distingue os dois casos de propósito.Webhooks
Diferente da Z-API, onde cada instância tem uma URL fixa por tipo de callback, no Omni um canal pode ter vários endpoints, cada um inscrito nos eventos que você escolher. Para criar, editar ou remover, use as rotas de webhooks do canal.O
channelId é obtido através do endpoint Criar canal ou de Listar canais.Autorizações
Parâmetros de caminho
Resposta
Canal encontrado