/me· Conferir a chaveDevolve a conta dona da chave. Use para testar a conexão.
curl -X GET https://avansiq.com.br/api/v1/me \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
Crie e consulte contatos e negociações, registre conversões e receba eventos em tempo real (webhooks / REST hooks). Autentique com Authorization: Bearer avq_live_... (Configurações › API e webhooks). Limite: 120 requisições por minuto por chave. Datas em ISO 8601; valores em reais.
Authorization: Bearer avq_live_...https://avansiq.com.br/api/v1curl https://avansiq.com.br/api/v1/me \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
Erros seguem o formato {"error": {"code": "...", "message": "..."}}. Códigos: 400 corpo inválido, 401 chave, 402 limite do plano, 404 não encontrado, 422 validação, 429 limite de requisições.
/me· Conferir a chaveDevolve a conta dona da chave. Use para testar a conexão.
curl -X GET https://avansiq.com.br/api/v1/me \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/contacts· Listar contatos| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| page | consulta | integer | |
| per_page | consulta | integer | |
| consulta | string | Busca exata por e-mail | |
| q | consulta | string | Busca por nome, e-mail ou telefone |
| updated_since | consulta | string (date-time) |
curl -X GET https://avansiq.com.br/api/v1/contacts \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/contacts· Criar ou atualizar contatoDeduplica pelo e-mail: se já existir, completa os campos vazios (ou sobrescreve com overwrite: true). Não registra conversão.
| Campo | Tipo | Descrição |
|---|---|---|
| name | string | |
| string | ||
| phone | string | |
| string | ||
| job_title | string | |
| organization | string | Nome da empresa (criada se não existir) |
| lifecycle_stage | string | |
| owner_email | string | |
| source | string | Nome da origem |
| custom_fields | object | chave do campo personalizado → valor |
| overwrite | boolean |
curl -X POST https://avansiq.com.br/api/v1/contacts \
-H "Authorization: Bearer avq_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"name": "Maria Souza", "email": "maria@empresa.com.br", "organization": "Granja Modelo", "lifecycle_stage": "lead"}'/contacts/{id}· Consultar contato| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| id * | caminho | string (uuid) |
curl -X GET https://avansiq.com.br/api/v1/contacts/ID \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/contacts/{id}· Atualizar contatoAtualiza só os campos enviados; custom_fields é mesclado.
| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| id * | caminho | string (uuid) |
| Campo | Tipo | Descrição |
|---|---|---|
| name | string | |
| string | ||
| phone | string | |
| string | ||
| job_title | string | |
| organization | string | Nome da empresa (criada se não existir) |
| lifecycle_stage | string | |
| owner_email | string | |
| source | string | Nome da origem |
| custom_fields | object | chave do campo personalizado → valor |
| overwrite | boolean |
curl -X PATCH https://avansiq.com.br/api/v1/contacts/ID \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/deals· Listar negociações| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| page | consulta | integer | |
| per_page | consulta | integer | |
| status | consulta | open | won | lost | |
| pipeline_id | consulta | string | |
| contact_id | consulta | string | |
| updated_since | consulta | string (date-time) |
curl -X GET https://avansiq.com.br/api/v1/deals \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/deals· Criar negociação| Campo | Tipo | Descrição |
|---|---|---|
| title * | string | |
| contact_id | string | |
| contact_email | string | |
| pipeline_id | string | |
| stage_id | string | |
| amount | number | |
| recurring_amount | number | |
| expected_close_date | string (date) | |
| owner_email | string | |
| source | string |
curl -X POST https://avansiq.com.br/api/v1/deals \
-H "Authorization: Bearer avq_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"title": "Consultoria anual", "contact_email": "maria@empresa.com.br", "amount": 12000}'/deals/{id}· Consultar negociação| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| id * | caminho | string (uuid) |
curl -X GET https://avansiq.com.br/api/v1/deals/ID \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/events· Registrar conversãoEx.: “Pediu orçamento”, “Baixou e-book”. Cria/atualiza o contato, registra a conversão no histórico, dispara lead.converted (automações e webhooks) e pode criar negociação e tarefa.
| Campo | Tipo | Descrição |
|---|---|---|
| event * | string | Ex.: Pediu orçamento |
| string | ||
| phone | string | |
| name | string | |
| string | ||
| job_title | string | |
| organization | string | |
| custom_fields | object | |
| utm | object | |
| page_url | string | |
| consent | boolean | |
| owner_email | string | |
| source | string | |
| create_deal | boolean | |
| pipeline_id | string | |
| stage_id | string | |
| deal_title | string | |
| create_task | boolean | |
| task_title | string |
curl -X POST https://avansiq.com.br/api/v1/events \
-H "Authorization: Bearer avq_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"event": "Pediu orçamento", "email": "maria@empresa.com.br", "name": "Maria Souza", "phone": "11999998888", "custom_fields": {"segmento": "Postura"}, "create_deal": true}'/pipelines· Funis e etapasIds para criar e mover negociações.
curl -X GET https://avansiq.com.br/api/v1/pipelines \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/forms/{id}/submit· Enviar formulárioEnvia respostas para um formulário do AVANSIQ (mesmas regras de distribuição e consentimento). Os campos usam as chaves do formulário.
| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| id * | caminho | string (uuid) |
Objeto JSON livre.
curl -X POST https://avansiq.com.br/api/v1/forms/ID/submit \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/hooks· Listar assinaturas desta chavecurl -X GET https://avansiq.com.br/api/v1/hooks \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
/hooks· Assinar evento (REST hook)Usado por Zapier, Make e n8n. O AVANSIQ envia um POST JSON para target_url a cada evento, com o cabeçalho X-Avansiq-Signature: t=<unix>,v1=<hmac_sha256(secret, t + "." + corpo)>. Respostas fora de 2xx são reenviadas até 6 vezes.
| Campo | Tipo | Descrição |
|---|---|---|
| target_url * | string (uri) | |
| event * | lead.converted | contact.created | contact.updated | deal.created | deal.stage_changed | deal.won | deal.lost | message.received | email.opened | email.clicked | contact.became_mql | * |
curl -X POST https://avansiq.com.br/api/v1/hooks \
-H "Authorization: Bearer avq_live_SUA_CHAVE" \
-H "Content-Type: application/json" \
-d '{"target_url": "https://hooks.zapier.com/hooks/standard/123/abc", "event": "lead.converted"}'/hooks/{id}· Cancelar assinatura| Parâmetro | Onde | Tipo | Descrição |
|---|---|---|---|
| id * | caminho | string (uuid) |
curl -X DELETE https://avansiq.com.br/api/v1/hooks/ID \ -H "Authorization: Bearer avq_live_SUA_CHAVE"
Cadastre endereços em Configurações › API e webhooks (ou pela API em /hooks). Cada evento chega como POST JSON:
{
"id": "evt_123",
"type": "lead.converted",
"created_at": "2026-10-08T14:00:00.000Z",
"data": { "id": "…", "name": "Maria Souza", "email": "maria@empresa.com.br", … }
}| Evento | Quando |
|---|---|
| lead.converted | Lead convertido (formulário, integração, site ou API) |
| contact.created | Contato criado |
| contact.updated | Contato atualizado |
| deal.created | Negociação criada |
| deal.stage_changed | Negociação mudou de etapa |
| deal.won | Negociação ganha |
| deal.lost | Negociação perdida |
| message.received | Mensagem recebida (WhatsApp, e-mail ou chat) |
| email.opened | E-mail de marketing aberto |
| email.clicked | Link de e-mail de marketing clicado |
| contact.became_mql | Contato virou MQL pela pontuação |
Confira a assinatura do cabeçalho X-Avansiq-Signature com o segredo do webhook (whsec_...):
import crypto from "node:crypto";
function valido(cabecalho, corpoBruto, segredo) {
const { t, v1 } = Object.fromEntries(cabecalho.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false; // 5 minutos
const esperado = crypto.createHmac("sha256", segredo).update(t + "." + corpoBruto).digest("hex");
return crypto.timingSafeEqual(Buffer.from(esperado), Buffer.from(v1));
}Respostas fora de 2xx são reenviadas até 6 vezes (2, 4, 8… minutos).
Procure “AVANSIQ” no Zapier e conecte com a sua chave de API. Gatilhos: novo lead, novo contato, negociação criada, ganha, perdida ou mudou de etapa, contato virou MQL. Ações: criar ou atualizar contato, registrar conversão, criar negociação. Busca: contato por e-mail.