{"components":{"schemas":{"APIKey":{"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"last_used_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"prefix":{"type":"string"}},"type":"object"},"CheckResult":{"properties":{"business":{"type":"boolean"},"from_cache":{"type":"boolean"},"input":{"type":"string"},"jid":{"type":"string"},"number":{"description":"normalizado (E.164 sem +)","type":"string"},"reason":{"description":"por que é inválido","type":"string"},"status":{"enum":["tem_whatsapp","nao_tem_whatsapp","invalido","erro"],"type":"string"},"type":{"description":"celular, fixo...","type":"string"},"uf":{"type":"string"},"verified_name":{"type":"string"},"wa_number":{"description":"como o WhatsApp reconhece (com ou sem o nono dígito)","type":"string"}},"type":"object"},"Connection":{"properties":{"id":{"format":"uuid","type":"string"},"jid":{"type":"string"},"name":{"type":"string"},"push_name":{"type":"string"},"speed":{"properties":{"cooldown_until":{"format":"date-time","type":"string"},"cooling":{"type":"boolean"},"day_used":{"type":"integer"},"hour_used":{"type":"integer"},"inherited":{"type":"boolean"},"params":{"$ref":"#/components/schemas/SpeedParams"},"preset":{"type":"string"},"rate_factor":{"type":"number"},"warming":{"type":"boolean"},"warmup_day":{"type":"integer"}},"type":"object"},"status":{"enum":["disconnected","connecting","qr","online","logged_out","banned"],"type":"string"},"status_detail":{"type":"string"},"total_checked":{"type":"integer"}},"type":"object"},"CreditEntry":{"properties":{"amount":{"type":"integer"},"balance_after":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"job_id":{"type":"string"},"note":{"type":"string"},"reason":{"enum":["signup","manual","check","reserve","refund"],"type":"string"}},"type":"object"},"Delivery":{"properties":{"attempts":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"delivered_at":{"format":"date-time","type":"string"},"duration_ms":{"type":"integer"},"event":{"type":"string"},"id":{"format":"uuid","type":"string"},"last_error":{"type":"string"},"last_status":{"type":"integer"},"next_attempt_at":{"format":"date-time","type":"string"},"payload":{"type":"object"},"status":{"enum":["pending","delivered","failed"],"type":"string"}},"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"},"Job":{"properties":{"cached_numbers":{"type":"integer"},"created_at":{"format":"date-time","type":"string"},"credits_balance":{"type":"integer"},"credits_needed":{"type":"integer"},"credits_reserved":{"type":"integer"},"duplicate_rows":{"type":"integer"},"errors":{"description":"sem resposta: não cobra","type":"integer"},"estimate_hours":{"type":"number"},"file_name":{"type":"string"},"finished_at":{"format":"date-time","type":"string"},"id":{"format":"uuid","type":"string"},"in_flight":{"type":"integer"},"invalid_reasons":{"additionalProperties":{"properties":{"count":{"type":"integer"},"examples":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"object"},"invalid_rows":{"type":"integer"},"name":{"type":"string"},"online_connections":{"type":"integer"},"processed":{"type":"integer"},"purged_at":{"description":"a retenção apagou o arquivo e o resultado por número (o resumo fica)","format":"date-time","type":"string"},"source":{"enum":["file","list"],"type":"string"},"started_at":{"format":"date-time","type":"string"},"status":{"enum":["draft","running","paused","waiting_credits","done","canceled"],"type":"string"},"status_detail":{"type":"string"},"to_check":{"type":"integer"},"total_rows":{"type":"integer"},"unique_numbers":{"description":"é o que se cobra","type":"integer"},"with_whatsapp":{"type":"integer"},"without_whatsapp":{"type":"integer"}},"type":"object"},"JobItem":{"properties":{"business":{"type":"boolean"},"checked_at":{"format":"date-time","type":"string"},"e164":{"type":"string"},"from_cache":{"type":"boolean"},"has_whatsapp":{"type":"boolean"},"status":{"enum":["pending","done","error"],"type":"string"},"type":{"type":"string"},"uf":{"type":"string"},"verified_name":{"type":"string"},"wa_number":{"type":"string"}},"type":"object"},"Preview":{"properties":{"columns":{"type":"integer"},"delimiter":{"type":"string"},"encoding":{"type":"string"},"format":{"type":"string"},"has_header":{"type":"boolean"},"header":{"items":{"type":"string"},"type":"array"},"rows":{"items":{"items":{"type":"string"},"type":"array"},"type":"array"},"sheet":{"type":"string"},"sheets":{"items":{"type":"string"},"type":"array"},"suggested_column":{"type":"integer"},"total_rows":{"type":"integer"},"valid_ratio":{"items":{"type":"number"},"type":"array"}},"type":"object"},"Session":{"properties":{"csrf_token":{"description":"mande no cabeçalho X-CSRF-Token em POST/PUT/PATCH/DELETE com sessão","type":"string"},"tenant":{"$ref":"#/components/schemas/Tenant"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"SpeedParams":{"properties":{"batch":{"type":"integer"},"max_interval":{"type":"number"},"min_interval":{"description":"segundos","type":"number"},"pause_every":{"description":"lotes","type":"integer"},"pause_max":{"type":"number"},"pause_min":{"type":"number"},"per_day":{"type":"integer"},"per_hour":{"type":"integer"}},"type":"object"},"Tenant":{"properties":{"created_at":{"format":"date-time","type":"string"},"credits":{"type":"integer"},"id":{"format":"uuid","type":"string"},"name":{"type":"string"},"speed_preset":{"type":"string"},"status":{"enum":["active","suspended"],"type":"string"}},"type":"object"},"Upload":{"properties":{"expires_at":{"format":"date-time","type":"string"},"file_name":{"type":"string"},"format":{"enum":["csv","txt","xlsx"],"type":"string"},"id":{"format":"uuid","type":"string"},"size":{"type":"integer"}},"type":"object"},"Usage":{"properties":{"credits_used_month":{"description":"números verificados no mês (cache incluso)","type":"integer"},"jobs_active":{"type":"integer"},"jobs_month":{"type":"integer"},"quick_checks_month":{"type":"integer"},"since":{"format":"date-time","type":"string"},"whatsapp_rate_month":{"description":"0 a 1","type":"number"},"with_whatsapp_month":{"type":"integer"},"without_whatsapp_month":{"type":"integer"}},"type":"object"},"User":{"properties":{"email":{"type":"string"},"id":{"format":"uuid","type":"string"},"last_login_at":{"format":"date-time","type":"string"},"name":{"type":"string"},"pending":{"description":"convite não aceito","type":"boolean"},"role":{"enum":["owner","admin","operator","superadmin"],"type":"string"}},"type":"object"},"WebhookConfig":{"properties":{"available_events":{"items":{"type":"string"},"type":"array"},"configured":{"type":"boolean"},"webhook":{"properties":{"created_at":{"format":"date-time","type":"string"},"enabled":{"type":"boolean"},"events":{"items":{"type":"string"},"type":"array"},"secret":{"description":"whsec_...","type":"string"},"updated_at":{"format":"date-time","type":"string"},"url":{"type":"string"}},"type":"object"}},"type":"object"},"WebhookEnvelope":{"description":"Corpo de cada POST que o seu sistema recebe.","properties":{"created_at":{"format":"date-time","type":"string"},"data":{"type":"object"},"event":{"type":"string"},"id":{"description":"igual ao cabeçalho X-CheckNum-Delivery: use para ignorar repetidos","type":"string"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"bearerFormat":"ck_...","description":"Chave de API da empresa","scheme":"bearer","type":"http"},"cookieAuth":{"description":"Sessão do painel (+ X-CSRF-Token)","in":"cookie","name":"checknum_session","type":"apiKey"}}},"info":{"description":"API da plataforma para verificar em massa quais números têm WhatsApp.\n\n## Autenticação\nIntegrações usam uma **chave de API** da empresa (criada no painel, em *API*): `Authorization: Bearer ck_...`.\nA chave opera conexões e verificações; webhook, equipe e chaves de API são configurados só pelo painel, por um dono ou admin.\nO painel usa cookie de sessão + `X-CSRF-Token`.\n\n## Créditos\n1 crédito = 1 número único com formato válido (cache incluso). Repetidos e inválidos não cobram. Ao iniciar uma\nverificação, os créditos ficam reservados; o que não for usado volta.\n\n## Erros\nSempre `{\"error\": {\"code\": \"...\", \"message\": \"...\"}}`. Recursos de outra empresa respondem 404.\n\n## Webhook\nCada evento chega como `POST` JSON (`WebhookEnvelope`) com `X-CheckNum-Signature: sha256=\u003chex\u003e`, o HMAC-SHA256 de\n`\"\u003cX-CheckNum-Timestamp\u003e.\u003ccorpo\u003e\"` com o segredo do webhook. Sem resposta 2xx, tentamos de novo em 30 s, 2 min, 10 min, 1 h e 6 h.\n","title":"CheckNum API","version":"1.0"},"openapi":"3.0.3","paths":{"/v1/admin/branding/assets":{"post":{"description":"multipart/form-data: `kind` (logo, logo_dark, favicon, og_image, font) e `file`. Devolve o caminho para usar no campo da Central.","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"kind":{"type":"string"}},"required":["kind","file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"kind":{"type":"string"},"path":{"type":"string"},"size":{"type":"integer"}},"type":"object"}}},"description":"Guardado"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Arquivo grande demais"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Enviar logo, favicon, imagem ou fonte","tags":["Administração da plataforma"]}},"/v1/admin/overview":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Visão da plataforma, saúde do servidor e auditoria","tags":["Administração da plataforma"]}},"/v1/admin/settings/branding":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Central de Branding","tags":["Administração da plataforma"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Central de Branding: salvar","tags":["Administração da plataforma"]}},"/v1/admin/settings/limits":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Limites da plataforma","tags":["Administração da plataforma"]},"put":{"description":"`max_connections_per_tenant` (0 = sem limite), `max_rows_per_job`, `cache_days` (0 = sem cache) e `retention_days`: por quantos dias uma verificação encerrada guarda o arquivo e o resultado por número (0 = para sempre; padrão 30).","requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Limites da plataforma: salvar","tags":["Administração da plataforma"]}},"/v1/admin/settings/signup":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Cadastro de empresas","tags":["Administração da plataforma"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Cadastro de empresas: salvar","tags":["Administração da plataforma"]}},"/v1/admin/settings/smtp":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Servidor de e-mail (SMTP)","tags":["Administração da plataforma"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Servidor de e-mail (SMTP): salvar","tags":["Administração da plataforma"]}},"/v1/admin/settings/smtp/test":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"to":{"format":"email","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"O WhatsApp não respondeu"}},"security":[{"cookieAuth":[]}],"summary":"Enviar e-mail de teste","tags":["Administração da plataforma"]}},"/v1/admin/settings/speed":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Velocidade máxima e aquecimento","tags":["Administração da plataforma"]},"put":{"requestBody":{"content":{"application/json":{"schema":{"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Velocidade máxima e aquecimento: salvar","tags":["Administração da plataforma"]}},"/v1/admin/tenants":{"get":{"parameters":[{"in":"query","name":"q","schema":{"description":"busca por nome","type":"string"}}],"responses":{"200":{"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Empresas","tags":["Administração da plataforma"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"initial_credits":{"type":"integer"},"name":{"type":"string"},"owner_email":{"format":"email","type":"string"},"owner_name":{"type":"string"}},"required":["name","owner_name","owner_email"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Criada"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Criar empresa e convidar o dono","tags":["Administração da plataforma"]}},"/v1/admin/tenants/{id}":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Detalhe da empresa","tags":["Administração da plataforma"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Renomear empresa","tags":["Administração da plataforma"]}},"/v1/admin/tenants/{id}/activate":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Reativar","tags":["Administração da plataforma"]}},"/v1/admin/tenants/{id}/credits":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Extrato da empresa","tags":["Administração da plataforma"]},"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"amount":{"type":"integer"},"note":{"type":"string"}},"required":["amount"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Lançar créditos (+ ou −)","tags":["Administração da plataforma"]}},"/v1/admin/tenants/{id}/suspend":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Suspender (derruba as sessões do WhatsApp)","tags":["Administração da plataforma"]}},"/v1/api-keys":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/APIKey"},"type":"array"}},"type":"object"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"}},"security":[{"cookieAuth":[]}],"summary":"Chaves de API","tags":["Equipe e chaves"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"api_key":{"$ref":"#/components/schemas/APIKey"},"key":{"description":"ck_...","type":"string"}},"type":"object"}}},"description":"Criada"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Criar chave (aparece só agora)","tags":["Equipe e chaves"]}},"/v1/api-keys/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Revogada"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Revogar chave","tags":["Equipe e chaves"]}},"/v1/auth/invite":{"get":{"parameters":[{"in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[],"summary":"Dados de um convite","tags":["Conta e login"]}},"/v1/auth/invite/accept":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"password":{"minLength":8,"type":"string"},"token":{"type":"string"}},"required":["token","password"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON inválido"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[],"summary":"Aceitar convite e definir senha","tags":["Conta e login"]}},"/v1/auth/login":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"},"password":{"type":"string"}},"required":["email","password"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Sem autenticação"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Tentativas demais: aguarde"}},"security":[],"summary":"Entrar (cria o cookie de sessão)","tags":["Conta e login"]}},"/v1/auth/logout":{"post":{"responses":{"200":{"description":"Sessão encerrada"}},"security":[{"cookieAuth":[]}],"summary":"Sair","tags":["Conta e login"]}},"/v1/auth/me":{"get":{"description":"Funciona com sessão ou chave de API.","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"}},"summary":"Quem sou eu","tags":["Conta e login"]},"patch":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"OK"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Mudar meu nome","tags":["Conta e login"]}},"/v1/auth/password":{"post":{"description":"Encerra as outras sessões.","requestBody":{"content":{"application/json":{"schema":{"properties":{"current_password":{"type":"string"},"new_password":{"minLength":8,"type":"string"}},"required":["current_password","new_password"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Sem autenticação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Trocar minha senha","tags":["Conta e login"]}},"/v1/auth/password/forgot":{"post":{"description":"Responde igual exista ou não a conta.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Tentativas demais: aguarde"}},"security":[],"summary":"Pedir link de nova senha","tags":["Conta e login"]}},"/v1/auth/password/reset":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"password":{"minLength":8,"type":"string"},"token":{"type":"string"}},"required":["token","password"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON inválido"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[],"summary":"Definir nova senha com o token do e-mail","tags":["Conta e login"]}},"/v1/auth/signup":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"enabled":{"type":"boolean"},"initial_credits":{"type":"integer"},"require_email_confirm":{"type":"boolean"}},"type":"object"}}},"description":"OK"}},"security":[],"summary":"Cadastro está aberto?","tags":["Conta e login"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"company":{"type":"string"},"email":{"format":"email","type":"string"},"name":{"type":"string"},"password":{"minLength":8,"type":"string"}},"required":["company","name","email","password"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}},"description":"Criada (e logada, salvo quando exige confirmar e-mail)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Tentativas demais: aguarde"}},"security":[],"summary":"Cadastrar empresa e dono","tags":["Conta e login"]}},"/v1/auth/verify-email":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"token":{"type":"string"}},"required":["token"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"JSON inválido"}},"security":[],"summary":"Confirmar e-mail com o token","tags":["Conta e login"]}},"/v1/auth/verify-email/resend":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Tentativas demais: aguarde"}},"security":[],"summary":"Reenviar confirmação de e-mail","tags":["Conta e login"]}},"/v1/check":{"post":{"description":"Normaliza, junta repetidos, usa o cache global e consulta o WhatsApp. Cobra 1 crédito por número único válido; o que o WhatsApp não responder é estornado.","requestBody":{"content":{"application/json":{"schema":{"properties":{"connection_id":{"description":"usar esta conexão (opcional)","type":"string"},"country":{"description":"país padrão (ISO), ex.: BR","type":"string"},"numbers":{"description":"1 a 50 números em qualquer formato","items":{"type":"string"},"type":"array"}},"required":["numbers"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"credits_used":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/CheckResult"},"type":"array"}},"type":"object"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Créditos insuficientes"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"O WhatsApp não respondeu"}},"summary":"Verificar até 50 números agora","tags":["Verificação rápida"]}},"/v1/connections":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Connection"},"type":"array"}},"type":"object"}}},"description":"OK"}},"summary":"Listar conexões","tags":["Conexões"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"maxLength":80,"type":"string"},"proxy_url":{"description":"socks5:// ou http:// (opcional)","type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"Criada"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Criar conexão","tags":["Conexões"]}},"/v1/connections/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Excluída"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Excluir (desvincula o número)","tags":["Conexões"]},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Detalhes, status, uso e ritmo","tags":["Conexões"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"proxy_url":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Renomear ou trocar o proxy","tags":["Conexões"]}},"/v1/connections/{id}/connect":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Conectar (ou gerar QR Code)","tags":["Conexões"]}},"/v1/connections/{id}/disconnect":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Desconectar sem desvincular","tags":["Conexões"]}},"/v1/connections/{id}/limits":{"put":{"description":"Preset (`conservador`, `equilibrado`, `rapido`, `custom` ou vazio = padrão da empresa), parâmetros personalizados, janela de horário e pular o aquecimento. Os máximos da plataforma sempre valem.","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"custom":{"$ref":"#/components/schemas/SpeedParams"},"preset":{"type":"string"},"skip_warmup":{"type":"boolean"},"window":{"properties":{"end":{"description":"HH:MM","type":"string"},"start":{"description":"HH:MM","type":"string"}},"type":"object"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Ritmo da conexão","tags":["Conexões"]}},"/v1/connections/{id}/logout":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Desvincular o número","tags":["Conexões"]}},"/v1/connections/{id}/pair-code":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"phone":{"description":"DDI + número, ex.: 5511987654321","type":"string"}},"required":["phone"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"code":{"description":"ex.: WX7K-9PLQ","type":"string"}},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Parear por código (sem câmera)","tags":["Conexões"]}},"/v1/connections/{id}/qr":{"get":{"description":"Imagem PNG em data URI e o texto do QR. Expira em segundos: busque de novo.","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"image":{"description":"data:image/png;base64,...","type":"string"},"text":{"type":"string"}},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"QR Code para parear","tags":["Conexões"]}},"/v1/connections/{id}/resume-now":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Tirar do descanso do freio automático","tags":["Conexões"]}},"/v1/credits":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"balance":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/CreditEntry"},"type":"array"}},"type":"object"}}},"description":"OK"}},"summary":"Saldo e extrato","tags":["Empresa e créditos"]}},"/v1/events":{"get":{"description":"Stream `text/event-stream` com os eventos `connection`, `connection.usage`, `connection.deleted`, `job` e `branding`.","responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"OK"}},"summary":"Eventos ao vivo da empresa (SSE)","tags":["Conta e login"]}},"/v1/jobs":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Job"},"type":"array"}},"type":"object"}}},"description":"OK"}},"summary":"Listar verificações","tags":["Verificações em lote"]},"post":{"description":"Envie `upload_id` + `phone_column` (arquivo) **ou** `numbers` (lista de até 100 mil). A resposta traz inválidos, repetidos, cache, créditos necessários e a estimativa de tempo.","requestBody":{"content":{"application/json":{"schema":{"properties":{"country":{"type":"string"},"has_header":{"type":"boolean"},"name":{"type":"string"},"numbers":{"items":{"type":"string"},"type":"array"},"phone_column":{"description":"índice da coluna, a partir de 0","type":"integer"},"sheet":{"type":"string"},"upload_id":{"format":"uuid","type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"Analisada (status draft)"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Criar verificação (análise, sem gastar créditos)","tags":["Verificações em lote"]}},"/v1/jobs/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Excluída"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Excluir (com o arquivo)","tags":["Verificações em lote"]},"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Progresso, contadores e estimativa","tags":["Verificações em lote"]}},"/v1/jobs/{id}/cancel":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Cancelar (estorna o que não foi usado)","tags":["Verificações em lote"]}},"/v1/jobs/{id}/download":{"get":{"description":"O arquivo original, com todas as colunas na mesma ordem, mais `checknum_status`, `checknum_numero`, `checknum_jid`, `checknum_business`, `checknum_nome_verificado`, `checknum_tipo`, `checknum_uf`, `checknum_verificado_em` e `checknum_motivo`. Em andamento, sai o parcial (o que falta como `pendente`).","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"format","schema":{"enum":["csv","xlsx"],"type":"string"}},{"in":"query","name":"filter","schema":{"enum":["all","tem_whatsapp","nao_tem_whatsapp","invalido","erro","pendente"],"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Apagado pelo prazo de retenção (ou o arquivo original sumiu do servidor)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Arquivo final","tags":["Verificações em lote"]}},"/v1/jobs/{id}/events":{"get":{"description":"Começa com o estado atual (evento `job`) e fecha quando a verificação termina.","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"text/event-stream":{"schema":{"type":"string"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Progresso desta verificação ao vivo (SSE)","tags":["Verificações em lote"]}},"/v1/jobs/{id}/items":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","schema":{"enum":["tem_whatsapp","nao_tem_whatsapp","erro","pendente"],"type":"string"}},{"in":"query","name":"after","schema":{"description":"valor de next_after da página anterior","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":1000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/JobItem"},"type":"array"},"next_after":{"type":"string"}},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Igual a /results (nome antigo)","tags":["Verificações em lote"]}},"/v1/jobs/{id}/pause":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Pausar","tags":["Verificações em lote"]}},"/v1/jobs/{id}/results":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"status","schema":{"enum":["tem_whatsapp","nao_tem_whatsapp","erro","pendente"],"type":"string"}},{"in":"query","name":"after","schema":{"description":"valor de next_after da página anterior","type":"string"}},{"in":"query","name":"limit","schema":{"maximum":1000,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/JobItem"},"type":"array"},"next_after":{"description":"vazio na última página","type":"string"}},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Apagado pelo prazo de retenção (ou o arquivo original sumiu do servidor)"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Resultados em JSON (números únicos)","tags":["Verificações em lote"]}},"/v1/jobs/{id}/resume":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Retomar","tags":["Verificações em lote"]}},"/v1/jobs/{id}/start":{"post":{"description":"Sem saldo para tudo, responde 402 com `need`, `balance` e `minimum`. Com `partial: true`, processa até o saldo e fica em `waiting_credits` até entrarem créditos.","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"partial":{"type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}},"description":"OK"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Créditos insuficientes"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"summary":"Iniciar (reserva os créditos)","tags":["Verificações em lote"]}},"/v1/speed":{"get":{"responses":{"200":{"description":"OK"}},"summary":"Presets de ritmo, máximos da plataforma e padrão da empresa","tags":["Empresa e créditos"]}},"/v1/team":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/User"},"type":"array"}},"type":"object"}}},"description":"OK"}},"security":[{"cookieAuth":[]}],"summary":"Membros da empresa","tags":["Equipe e chaves"]},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"},"name":{"type":"string"},"role":{"enum":["owner","admin","operator"],"type":"string"}},"required":["email","name","role"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"invite_url":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"Convite enviado"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Convidar membro","tags":["Equipe e chaves"]}},"/v1/team/{id}":{"delete":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Removido"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"security":[{"cookieAuth":[]}],"summary":"Remover membro","tags":["Equipe e chaves"]},"patch":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"role":{"enum":["owner","admin","operator"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Mudar nome ou papel","tags":["Equipe e chaves"]}},"/v1/team/{id}/invite":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"invite_url":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"security":[{"cookieAuth":[]}],"summary":"Reenviar convite","tags":["Equipe e chaves"]}},"/v1/tenant":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}},"description":"OK"}},"summary":"Dados da empresa","tags":["Empresa e créditos"]},"patch":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tenant"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Renomear a empresa","tags":["Empresa e créditos"]}},"/v1/tenant/speed":{"put":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"preset":{"description":"conservador, equilibrado, rapido ou vazio (padrão da plataforma)","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Ritmo padrão das conexões da empresa","tags":["Empresa e créditos"]}},"/v1/uploads":{"post":{"description":"multipart/form-data com o campo `file` (e `country` opcional). Devolve a prévia com a coluna do telefone sugerida. O upload vale 24 h.","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"country":{"type":"string"},"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"preview":{"$ref":"#/components/schemas/Preview"},"upload":{"$ref":"#/components/schemas/Upload"}},"type":"object"}}},"description":"Recebido, com a prévia"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Arquivo grande demais"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"summary":"Enviar arquivo (CSV, TXT, XLSX)","tags":["Verificações em lote"]}},"/v1/uploads/{id}/preview":{"get":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}},{"in":"query","name":"sheet","schema":{"type":"string"}},{"in":"query","name":"has_header","schema":{"type":"boolean"}},{"in":"query","name":"country","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"preview":{"$ref":"#/components/schemas/Preview"},"upload":{"$ref":"#/components/schemas/Upload"}},"type":"object"}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"summary":"Prévia de novo com outras opções","tags":["Verificações em lote"]}},"/v1/usage":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}},"description":"OK"}},"summary":"Consumo do mês","tags":["Empresa e créditos"]}},"/v1/webhook":{"delete":{"responses":{"204":{"description":"Removido"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Remover","tags":["Webhook"]},"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfig"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"}},"security":[{"cookieAuth":[]}],"summary":"Configuração do webhook","tags":["Webhook"]},"put":{"description":"O segredo de assinatura é gerado no primeiro cadastro. Sem `events`, assina todos.","requestBody":{"content":{"application/json":{"schema":{"properties":{"enabled":{"type":"boolean"},"events":{"items":{"enum":["job.completed","job.canceled","job.waiting_credits","connection.disconnected","connection.banned"],"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfig"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Dados inválidos"}},"security":[{"cookieAuth":[]}],"summary":"Cadastrar ou alterar","tags":["Webhook"]}},"/v1/webhook/deliveries":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Delivery"},"type":"array"}},"type":"object"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"}},"security":[{"cookieAuth":[]}],"summary":"Últimas 50 entregas","tags":["Webhook"]}},"/v1/webhook/deliveries/{id}/retry":{"post":{"parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Estado não permite a operação"}},"security":[{"cookieAuth":[]}],"summary":"Reenviar uma entrega","tags":["Webhook"]}},"/v1/webhook/secret":{"post":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfig"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Gerar novo segredo (o antigo para de valer)","tags":["Webhook"]}},"/v1/webhook/test":{"post":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}},"description":"OK"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Papel sem permissão"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Não encontrado (inclusive recurso de outra empresa)"}},"security":[{"cookieAuth":[]}],"summary":"Enviar um ping agora","tags":["Webhook"]}}},"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"servers":[{"url":"/"}],"tags":[{"name":"Verificação rápida"},{"name":"Verificações em lote"},{"name":"Conexões"},{"name":"Webhook"},{"name":"Empresa e créditos"},{"name":"Conta e login"},{"name":"Equipe e chaves"},{"name":"Administração da plataforma"}]}
