Documentação da API

API REST v1 para mensagens, chats, grupos e webhooks na sua instância WhatsApp.

URL base da API

https://app.tizapi.link/api/v1

Inclua o path de cada endpoint após esta URL (ex.: /messages/text).

Introdução

Cada instância possui um token Bearer exclusivo, gerado no painel em Configurações. Use esse token em todas as requisições.

Respostas em JSON ({"data": ...} quando aplicável). Erros: {"error": "codigo"} com HTTP 4xx/5xx.

Autenticação

Envie em todas as requisições:

Headers
Authorization: Bearer SEU_TOKEN
Content-Type: application/json
Accept: application/json

Substitua SEU_TOKEN pelo token da instância (painel → Configurações). Regenerar o token invalida o anterior.

Erros e limites

HTTPCódigoSignificado
401unauthorizedToken ausente ou inválido
403plan_inactivePlano expirado ou bloqueado
422validation_errorBody inválido
429rate_limitLimite do plano (req/min por instância)
501driver_not_supportedRecurso não disponível no momento
503server_unavailableServiço temporariamente indisponível

Instância

GET /instance

Status da conexão WhatsApp

Retorna Connected, LoggedIn, JID e nome.

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/instance' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/instance', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/instance",
    headers=headers,
)

print(response.json())
GET /instance/qrcode

QR Code

Base64 do QR para pareamento (instância aguardando conexão).

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/instance/qrcode' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/instance/qrcode', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/qrcode', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/instance/qrcode",
    headers=headers,
)

print(response.json())
POST /instance/restart

Reiniciar sessão

Reinicia a sessão WhatsApp da instância.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/instance/restart' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/instance/restart', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/restart', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.post(
    "https://app.tizapi.link/api/v1/instance/restart",
    headers=headers,
)

print(response.json())
POST /instance/reconnect

Reconectar

Reabre a conexão com o WhatsApp.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/instance/reconnect' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/instance/reconnect', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/reconnect', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.post(
    "https://app.tizapi.link/api/v1/instance/reconnect",
    headers=headers,
)

print(response.json())
POST /instance/disconnect

Desconectar

Desconecta a sessão sem apagar a instância.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/instance/disconnect' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/instance/disconnect', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/disconnect', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.post(
    "https://app.tizapi.link/api/v1/instance/disconnect",
    headers=headers,
)

print(response.json())
POST /instance/logout

Logout WhatsApp

Encerra sessão; será necessário novo QR.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/instance/logout' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/instance/logout', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/logout', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.post(
    "https://app.tizapi.link/api/v1/instance/logout",
    headers=headers,
)

print(response.json())
POST /instance/pair

Código de pareamento

Alternativa ao QR via número.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/instance/pair' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"phone":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/instance/pair', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"phone\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/pair', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "phone": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "phone": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/instance/pair",
    headers=headers,
    json=payload,
)

print(response.json())
GET /instance/settings

Comportamento (ler)

alwaysOnline, rejectCall, msgRejectCall, readMessages, ignoreGroups, ignoreStatus.

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/instance/settings' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/instance/settings', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/settings', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/instance/settings",
    headers=headers,
)

print(response.json())
PUT /instance/settings

Comportamento (salvar)

Campos: alwaysOnline, rejectCall, msgRejectCall, readMessages, ignoreGroups, ignoreStatus.

Exemplo

curl --request PUT \
  --url 'https://app.tizapi.link/api/v1/instance/settings' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"alwaysOnline":true,"rejectCall":false,"msgRejectCall":"","readMessages":false,"ignoreGroups":false,"ignoreStatus":false}'
$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.tizapi.link/api/v1/instance/settings', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"alwaysOnline\":true,\"rejectCall\":false,\"msgRejectCall\":\"\",\"readMessages\":false,\"ignoreGroups\":false,\"ignoreStatus\":false}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/settings', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "alwaysOnline": true,
      "rejectCall": false,
      "msgRejectCall": "",
      "readMessages": false,
      "ignoreGroups": false,
      "ignoreStatus": false
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "alwaysOnline": true,
    "rejectCall": false,
    "msgRejectCall": "",
    "readMessages": false,
    "ignoreGroups": false,
    "ignoreStatus": false
}''')

response = requests.put(
    "https://app.tizapi.link/api/v1/instance/settings",
    headers=headers,
    json=payload,
)

print(response.json())
PUT /instance/webhook

Webhook do cliente

URL HTTPS para eventos (validada anti-SSRF).

Exemplo

curl --request PUT \
  --url 'https://app.tizapi.link/api/v1/instance/webhook' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"url":"https://seu-app.com/webhooks/whatsapp"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.tizapi.link/api/v1/instance/webhook', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"url\":\"https://seu-app.com/webhooks/whatsapp\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/instance/webhook', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "url": "https://seu-app.com/webhooks/whatsapp"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "url": "https://seu-app.com/webhooks/whatsapp"
}''')

response = requests.put(
    "https://app.tizapi.link/api/v1/instance/webhook",
    headers=headers,
    json=payload,
)

print(response.json())

Envio de mensagens

POST /messages/text

Texto

Campos opcionais em todos: delay, id, mentionAll, mentionedJid, quoted {messageId, participant}.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/text' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","text":"Olá!"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/text', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"text\":\"Olá!\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/text', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "text": "Olá!"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "text": "Olá!"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/text",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/media

Mídia

type: image|video|audio|document

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/media' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","type":"image","url":"https://example.com/foto.jpg","caption":"Legenda"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/media', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"type\":\"image\",\"url\":\"https://example.com/foto.jpg\",\"caption\":\"Legenda\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/media', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "type": "image",
      "url": "https://example.com/foto.jpg",
      "caption": "Legenda"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "type": "image",
    "url": "https://example.com/foto.jpg",
    "caption": "Legenda"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/media",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/audio

Áudio

Atalho para type=audio.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/audio' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","url":"https://example.com/audio.ogg"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/audio', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"url\":\"https://example.com/audio.ogg\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/audio', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "url": "https://example.com/audio.ogg"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "url": "https://example.com/audio.ogg"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/audio",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/contact

Contato

vcard

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/contact' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","vcard":{"fullName":"João","organization":"Empresa","phone":"5511888888888"}}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/contact', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"vcard\":{\"fullName\":\"João\",\"organization\":\"Empresa\",\"phone\":\"5511888888888\"}}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/contact', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "vcard": {
          "fullName": "João",
          "organization": "Empresa",
          "phone": "5511888888888"
      }
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "vcard": {
        "fullName": "João",
        "organization": "Empresa",
        "phone": "5511888888888"
    }
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/contact",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/location

Localização

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/location' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","latitude":-23.55,"longitude":-46.63,"name":"São Paulo"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/location', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"latitude\":-23.55,\"longitude\":-46.63,\"name\":\"São Paulo\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/location', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "latitude": -23.55,
      "longitude": -46.63,
      "name": "São Paulo"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "latitude": -23.55,
    "longitude": -46.63,
    "name": "São Paulo"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/location",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/link

Link com preview

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/link' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","url":"https://example.com","text":"Veja o site"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/link', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"url\":\"https://example.com\",\"text\":\"Veja o site\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/link', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "url": "https://example.com",
      "text": "Veja o site"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "url": "https://example.com",
    "text": "Veja o site"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/link",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/poll

Enquete

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/poll' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","question":"Vamos?","options":["Sim","Não"],"maxAnswer":1}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/poll', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"question\":\"Vamos?\",\"options\":[\"Sim\",\"Não\"],\"maxAnswer\":1}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/poll', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "question": "Vamos?",
      "options": [
          "Sim",
          "Não"
      ],
      "maxAnswer": 1
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "question": "Vamos?",
    "options": [
        "Sim",
        "Não"
    ],
    "maxAnswer": 1
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/poll",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/sticker

Figurinha

url ou base64

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/sticker' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","sticker":"https://example.com/sticker.webp"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/sticker', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"sticker\":\"https://example.com/sticker.webp\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/sticker', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "sticker": "https://example.com/sticker.webp"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "sticker": "https://example.com/sticker.webp"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/sticker",
    headers=headers,
    json=payload,
)

print(response.json())

Ações em mensagens

POST /messages/delete

Apagar para todos

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/delete' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"chat":"[email protected]","messageId":"ABCD1234"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/delete', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"chat\":\"[email protected]\",\"messageId\":\"ABCD1234\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/delete', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "chat": "[email protected]",
      "messageId": "ABCD1234"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "chat": "[email protected]",
    "messageId": "ABCD1234"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/delete",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/edit

Editar mensagem

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/edit' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"chat":"[email protected]","messageId":"ABCD1234","message":"Texto corrigido"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/edit', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"chat\":\"[email protected]\",\"messageId\":\"ABCD1234\",\"message\":\"Texto corrigido\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/edit', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "chat": "[email protected]",
      "messageId": "ABCD1234",
      "message": "Texto corrigido"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "chat": "[email protected]",
    "messageId": "ABCD1234",
    "message": "Texto corrigido"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/edit",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/mark-read

Marcar como lida

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/mark-read' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","id":["MSG_ID_1"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/mark-read', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"id\":[\"MSG_ID_1\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/mark-read', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "id": [
          "MSG_ID_1"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "id": [
        "MSG_ID_1"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/mark-read",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/react

Reação

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/react' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","id":"MSG_ID","reaction":"👍"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/react', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"id\":\"MSG_ID\",\"reaction\":\"👍\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/react', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "id": "MSG_ID",
      "reaction": "👍"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "id": "MSG_ID",
    "reaction": "👍"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/react",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/presence

Digitando / gravando

state: composing|recording

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/presence' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","state":"composing","isAudio":false}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/presence', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"state\":\"composing\",\"isAudio\":false}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/presence', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "state": "composing",
      "isAudio": false
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "state": "composing",
    "isAudio": false
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/presence",
    headers=headers,
    json=payload,
)

print(response.json())
POST /messages/delivery-status

Status de entrega

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/messages/delivery-status' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"id":"MSG_ID"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/messages/delivery-status', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"id\":\"MSG_ID\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/messages/delivery-status', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "id": "MSG_ID"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "id": "MSG_ID"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/messages/delivery-status",
    headers=headers,
    json=payload,
)

print(response.json())

Chats

POST /chats/archive

Arquivar chat

Body: {number}

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/chats/archive' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/chats/archive', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/chats/archive', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/chats/archive",
    headers=headers,
    json=payload,
)

print(response.json())
POST /chats/mute

Silenciar

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/chats/mute' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/chats/mute', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/chats/mute', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/chats/mute",
    headers=headers,
    json=payload,
)

print(response.json())
POST /chats/pin

Fixar

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/chats/pin' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/chats/pin', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/chats/pin', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/chats/pin",
    headers=headers,
    json=payload,
)

print(response.json())
POST /chats/unpin

Desafixar

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/chats/unpin' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/chats/unpin', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/chats/unpin', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/chats/unpin",
    headers=headers,
    json=payload,
)

print(response.json())

Grupos

POST /groups/create

Criar grupo

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/create' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupName":"Meu grupo","participants":["5511999999999"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/create', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupName\":\"Meu grupo\",\"participants\":[\"5511999999999\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/create', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupName": "Meu grupo",
      "participants": [
          "5511999999999"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupName": "Meu grupo",
    "participants": [
        "5511999999999"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/create",
    headers=headers,
    json=payload,
)

print(response.json())
POST /groups/info

Informações

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/info' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupJid":"[email protected]"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/info', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupJid\":\"[email protected]\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/info', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupJid": "[email protected]"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupJid": "[email protected]"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/info",
    headers=headers,
    json=payload,
)

print(response.json())
GET /groups/list

Listar grupos

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/groups/list' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/groups/list', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/list', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/groups/list",
    headers=headers,
)

print(response.json())
GET /groups/mine

Meus grupos

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/groups/mine' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/groups/mine', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/mine', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/groups/mine",
    headers=headers,
)

print(response.json())
POST /groups/invite-link

Link de convite

reset opcional

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/invite-link' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupJid":"[email protected]","reset":false}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/invite-link', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupJid\":\"[email protected]\",\"reset\":false}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/invite-link', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupJid": "[email protected]",
      "reset": false
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupJid": "[email protected]",
    "reset": false
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/invite-link",
    headers=headers,
    json=payload,
)

print(response.json())
POST /groups/join

Entrar via código

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/join' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"code":"https://chat.whatsapp.com/..."}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/join', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"code\":\"https://chat.whatsapp.com/...\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/join', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "code": "https://chat.whatsapp.com/..."
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "code": "https://chat.whatsapp.com/..."
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/join",
    headers=headers,
    json=payload,
)

print(response.json())
POST /groups/name

Alterar nome

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/name' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupJid":"[email protected]","name":"Novo nome"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/name', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupJid\":\"[email protected]\",\"name\":\"Novo nome\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/name', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupJid": "[email protected]",
      "name": "Novo nome"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupJid": "[email protected]",
    "name": "Novo nome"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/name",
    headers=headers,
    json=payload,
)

print(response.json())
POST /groups/photo

Alterar foto

image url ou base64

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/photo' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupJid":"[email protected]","image":"https://..."}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/photo', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupJid\":\"[email protected]\",\"image\":\"https://...\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/photo', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupJid": "[email protected]",
      "image": "https://..."
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupJid": "[email protected]",
    "image": "https://..."
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/photo",
    headers=headers,
    json=payload,
)

print(response.json())
POST /groups/participants

Participantes

action: add|remove|promote|demote

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/groups/participants' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"groupJid":"[email protected]","participants":["5511999999999"],"action":"add"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/groups/participants', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"groupJid\":\"[email protected]\",\"participants\":[\"5511999999999\"],\"action\":\"add\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/groups/participants', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "groupJid": "[email protected]",
      "participants": [
          "5511999999999"
      ],
      "action": "add"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "groupJid": "[email protected]",
    "participants": [
        "5511999999999"
    ],
    "action": "add"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/groups/participants",
    headers=headers,
    json=payload,
)

print(response.json())

Usuários e contatos

POST /contacts/check

Verificar WhatsApp

Até 50 números.

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/contacts/check' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"numbers":["5511999999999","5511888888888"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/contacts/check', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"numbers\":[\"5511999999999\",\"5511888888888\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/contacts/check', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "numbers": [
          "5511999999999",
          "5511888888888"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "numbers": [
        "5511999999999",
        "5511888888888"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/contacts/check",
    headers=headers,
    json=payload,
)

print(response.json())
POST /users/info

Perfil do número

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/users/info' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":["5511999999999"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/users/info', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":[\"5511999999999\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/info', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": [
          "5511999999999"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": [
        "5511999999999"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/users/info",
    headers=headers,
    json=payload,
)

print(response.json())
GET /users/contacts

Agenda WhatsApp

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/users/contacts' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/users/contacts', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/contacts', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/users/contacts",
    headers=headers,
)

print(response.json())
POST /users/avatar

Baixar avatar

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/users/avatar' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999","preview":true}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/users/avatar', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\",\"preview\":true}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/avatar', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999",
      "preview": true
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999",
    "preview": true
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/users/avatar",
    headers=headers,
    json=payload,
)

print(response.json())
POST /users/profile

Foto do perfil

URL da imagem

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/users/profile' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"image":"https://example.com/avatar.jpg"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/users/profile', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"image\":\"https://example.com/avatar.jpg\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/profile', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "image": "https://example.com/avatar.jpg"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "image": "https://example.com/avatar.jpg"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/users/profile",
    headers=headers,
    json=payload,
)

print(response.json())
GET /users/blocklist

Lista de bloqueados

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/users/blocklist' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/users/blocklist', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/blocklist', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/users/blocklist",
    headers=headers,
)

print(response.json())
POST /users/block

Bloquear

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/users/block' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/users/block', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/block', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/users/block",
    headers=headers,
    json=payload,
)

print(response.json())
POST /users/unblock

Desbloquear

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/users/unblock' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"number":"5511999999999"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/users/unblock', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"number\":\"5511999999999\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/unblock', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "number": "5511999999999"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "number": "5511999999999"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/users/unblock",
    headers=headers,
    json=payload,
)

print(response.json())
GET /users/privacy

Privacidade

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/users/privacy' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/users/privacy', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/users/privacy', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/users/privacy",
    headers=headers,
)

print(response.json())

Etiquetas

POST /labels/chat

Etiqueta no chat

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/labels/chat' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"[email protected]","labelId":"1"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/labels/chat', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"[email protected]\",\"labelId\":\"1\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/labels/chat', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "[email protected]",
      "labelId": "1"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "[email protected]",
    "labelId": "1"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/labels/chat",
    headers=headers,
    json=payload,
)

print(response.json())
POST /labels/chat/remove

Remover do chat

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/labels/chat/remove' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"[email protected]","labelId":"1"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/labels/chat/remove', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"[email protected]\",\"labelId\":\"1\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/labels/chat/remove', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "[email protected]",
      "labelId": "1"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "[email protected]",
    "labelId": "1"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/labels/chat/remove",
    headers=headers,
    json=payload,
)

print(response.json())
POST /labels/message

Etiqueta na mensagem

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/labels/message' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"[email protected]","labelId":"1","messageId":"MSG_ID"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/labels/message', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"[email protected]\",\"labelId\":\"1\",\"messageId\":\"MSG_ID\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/labels/message', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "[email protected]",
      "labelId": "1",
      "messageId": "MSG_ID"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "[email protected]",
    "labelId": "1",
    "messageId": "MSG_ID"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/labels/message",
    headers=headers,
    json=payload,
)

print(response.json())
POST /labels/message/remove

Remover da mensagem

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/labels/message/remove' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"[email protected]","labelId":"1","messageId":"MSG_ID"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/labels/message/remove', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"[email protected]\",\"labelId\":\"1\",\"messageId\":\"MSG_ID\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/labels/message/remove', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "[email protected]",
      "labelId": "1",
      "messageId": "MSG_ID"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "[email protected]",
    "labelId": "1",
    "messageId": "MSG_ID"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/labels/message/remove",
    headers=headers,
    json=payload,
)

print(response.json())
POST /labels/edit

Editar etiqueta

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/labels/edit' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"labelId":"1","name":"VIP","color":2}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/labels/edit', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"labelId\":\"1\",\"name\":\"VIP\",\"color\":2}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/labels/edit', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "labelId": "1",
      "name": "VIP",
      "color": 2
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "labelId": "1",
    "name": "VIP",
    "color": 2
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/labels/edit",
    headers=headers,
    json=payload,
)

print(response.json())

Canais (Newsletter)

POST /newsletters/create

Criar canal

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/newsletters/create' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"name":"Meu canal","description":"Descrição"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/newsletters/create', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"name\":\"Meu canal\",\"description\":\"Descrição\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/create', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "name": "Meu canal",
      "description": "Descrição"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "name": "Meu canal",
    "description": "Descrição"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/newsletters/create",
    headers=headers,
    json=payload,
)

print(response.json())
POST /newsletters/info

Info do canal

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/newsletters/info' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":{"user":"123","server":"newsletter"}}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/newsletters/info', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":{\"user\":\"123\",\"server\":\"newsletter\"}}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/info', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": {
          "user": "123",
          "server": "newsletter"
      }
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": {
        "user": "123",
        "server": "newsletter"
    }
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/newsletters/info",
    headers=headers,
    json=payload,
)

print(response.json())
POST /newsletters/link

Link de convite

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/newsletters/link' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"key":"invite-key"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/newsletters/link', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"key\":\"invite-key\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/link', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "key": "invite-key"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "key": "invite-key"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/newsletters/link",
    headers=headers,
    json=payload,
)

print(response.json())
GET /newsletters/list

Listar canais

Exemplo

curl --request GET \
  --url 'https://app.tizapi.link/api/v1/newsletters/list' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json'
$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.tizapi.link/api/v1/newsletters/list', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
    ],
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/list', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
  },
});

const data = await response.json();
console.log(data);
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
}

response = requests.get(
    "https://app.tizapi.link/api/v1/newsletters/list",
    headers=headers,
)

print(response.json())
POST /newsletters/messages

Mensagens do canal

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/newsletters/messages' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"...","count":10}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/newsletters/messages', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"...\",\"count\":10}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/messages', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "...",
      "count": 10
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "...",
    "count": 10
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/newsletters/messages",
    headers=headers,
    json=payload,
)

print(response.json())
POST /newsletters/subscribe

Inscrever-se

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/newsletters/subscribe' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"jid":"..."}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/newsletters/subscribe', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"jid\":\"...\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/newsletters/subscribe', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "jid": "..."
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "jid": "..."
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/newsletters/subscribe",
    headers=headers,
    json=payload,
)

print(response.json())

Comunidades

POST /communities/create

Criar comunidade

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/communities/create' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"communityName":"Comunidade"}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/communities/create', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"communityName\":\"Comunidade\"}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/communities/create', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "communityName": "Comunidade"
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "communityName": "Comunidade"
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/communities/create",
    headers=headers,
    json=payload,
)

print(response.json())
POST /communities/add-group

Adicionar grupo

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/communities/add-group' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"communityJid":"...","groupJid":["[email protected]"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/communities/add-group', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"communityJid\":\"...\",\"groupJid\":[\"[email protected]\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/communities/add-group', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "communityJid": "...",
      "groupJid": [
          "[email protected]"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "communityJid": "...",
    "groupJid": [
        "[email protected]"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/communities/add-group",
    headers=headers,
    json=payload,
)

print(response.json())
POST /communities/remove-group

Remover grupo

Exemplo

curl --request POST \
  --url 'https://app.tizapi.link/api/v1/communities/remove-group' \
  --header 'Authorization: Bearer SEU_TOKEN' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"communityJid":"...","groupJid":["[email protected]"]}'
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://app.tizapi.link/api/v1/communities/remove-group', [
    'headers' => [
        'Authorization' => 'Bearer '.env('TIZAPI_TOKEN'),
        'Accept' => 'application/json',
        'Content-Type' => 'application/json',
    ],
    'body' => '{\"communityJid\":\"...\",\"groupJid\":[\"[email protected]\"]}',
]);

echo $response->getBody();
const response = await fetch('https://app.tizapi.link/api/v1/communities/remove-group', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer SEU_TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(
  {
      "communityJid": "...",
      "groupJid": [
          "[email protected]"
      ]
  }
  ),
});

const data = await response.json();
console.log(data);
import json
import requests

headers = {
    "Authorization": "Bearer SEU_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json",
}

payload = json.loads(r'''{
    "communityJid": "...",
    "groupJid": [
        "[email protected]"
    ]
}''')

response = requests.post(
    "https://app.tizapi.link/api/v1/communities/remove-group",
    headers=headers,
    json=payload,
)

print(response.json())

Webhooks

Configure a URL em PUT /instance/webhook ou no painel (Configurações). O TizAPI reenvia eventos ao seu endpoint com header X-Signature (HMAC-SHA256 do body com segredo da instância).

Eventos comuns: Message, SendMessage, Connection, Connected, LoggedOut, QRCODE, Receipt, Presence, GroupInfo, CallOffer, entre outros.

Payload típico: {"event":"Message","instanceId":"...","data":{...}}. Mídias podem vir em base64 conforme as opções da instância.

Retenção de tentativas de entrega no painel: 7 dias. Responda 2xx em até 30 segundos.