{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"https://sandbox-api.tapsign.com.br","description":"Generated server url"}],"tags":[{"name":"API Authentication","description":"Autenticacao da API: troca de e-mail/senha por um par de tokens JWT (access + refresh). Alternativa a API key."},{"name":"API Keys","description":"Emissao e gestao de chaves de API (tsk_...). Autentique a integracao com `Authorization: Bearer tsk_...`. A primeira chave exige um JWT de usuario (bootstrap)."},{"name":"Models","description":"Descoberta de modelos (templates): liste e detalhe para obter o templateId, as variaveis ({{campo}}) e os signatarios antes de criar um documento."},{"name":"Integration API","description":"Superficie nativa de integracao: cria documentos e pacotes (bundles) a partir de modelos e cancela por token."},{"name":"Compatibility API","description":"Formato compativel para migracao simples de integracoes existentes (criar documento / cancelar). E o caminho usado por integradores atuais. Mesma auth `Bearer tsk_...`."},{"name":"Webhooks","description":"Registre um endpoint HTTPS com segredo HMAC para receber eventos de assinatura — a unica forma de saber o status (doc_signed, doc_refused, doc_completed, doc_canceled, doc_expired, signer_email_bounced)."},{"name":"Webhook Logs","description":"Diagnostico (opcional): historico de entregas, estatisticas e reenvio de webhooks."}],"paths":{"/v1/webhooks/{id}":{"put":{"tags":["Webhooks"],"summary":"Atualizar um webhook","description":"Atualiza um webhook existente. Todos os campos do corpo sao opcionais - envie apenas os que deseja alterar.\n\n- Para ativar/desativar sem deletar, envie `active`.\n- Omita o `secret` para manter o segredo atual; envie um novo para rotaciona-lo.\n- A `url` (se enviada) deve ser HTTPS publica (mesma validacao do registro).\n- Retorna 200 com o webhook atualizado.\n","operationId":"update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookConfigRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Webhook inexistente ou de outro usuario","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Webhook atualizado","content":{"*/*":{"example":{"id":7,"name":"Integracao Sistema X (prod)","url":"https://seu-sistema.com/webhooks/tapsign","hasSecret":true,"events":["doc_signed","doc_completed"],"active":true,"createdAt":"2026-06-01T09:00:00","updatedAt":"2026-06-29T15:10:00"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Remover um webhook","description":"Remove permanentemente um webhook; o TapSign para de enviar entregas para aquela URL.\n\n- Operacao irreversivel. Para apenas suspender, prefira atualizar com `active: false`.\n- Retorna 204 sem corpo.\n","operationId":"delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Webhook inexistente ou de outro usuario","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"204":{"description":"Webhook removido"}}}},"/v1/webhooks":{"get":{"tags":["Webhooks"],"summary":"Listar os webhooks da conta","description":"Lista todos os webhooks registrados pelo usuario autenticado.\n\n- Nunca retorna o segredo; `hasSecret: true` apenas indica que ha um configurado.\n- Inclui webhooks ativos e inativos (veja o campo `active`).\n","operationId":"list","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Lista de webhooks","content":{"*/*":{"example":[{"id":7,"name":"Integracao Sistema X","url":"https://seu-sistema.com/webhooks/tapsign","hasSecret":true,"events":["*"],"active":true,"createdAt":"2026-06-29T14:00:00","updatedAt":"2026-06-29T14:00:00"}]}}}}},"post":{"tags":["Webhooks"],"summary":"Registrar um webhook","description":"Registra um endpoint que recebera POSTs do TapSign quando eventos de documento acontecerem.\n\n- Use para ser notificado de doc_viewed, doc_signed, doc_refused, doc_completed, doc_canceled, doc_expired, signer_email_bounced (ou [\"*\"] para todos).\n- A `url` precisa ser HTTPS publica; e revalidada no envio (anti DNS-rebinding) - enderecos internos/privados sao rejeitados.\n- O `secret` assina cada entrega (HMAC-SHA256, header X-Webhook-Signature). Guarde-o: nao e devolvido nas leituras.\n- O payload dos webhooks segue o formato compativel; o `doc_completed` traz `signed_file` (URL S3 valida por 24h).\n- `signer_email_bounced`: o e-mail mandado a um signatario voltou (bounce da SES, permanente ou transitorio). Mesmo formato dos demais + blocos `signer` {id, name, email, phone} e `bounce` {type: permanent|transient, subtype, at, template}; em pacote, tambem `bundle` {id, title}.\n- Retorna 201 com o webhook criado (`hasSecret: true` indica que ha segredo).\n","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookConfigRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (url nao publica, campos faltando, etc)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"201":{"description":"Webhook registrado","content":{"*/*":{"example":{"id":7,"name":"Integracao Sistema X","url":"https://seu-sistema.com/webhooks/tapsign","hasSecret":true,"events":["*"],"active":true,"createdAt":"2026-06-29T14:00:00","updatedAt":"2026-06-29T14:00:00"}}}}}}},"/v1/webhooks/{webhookId}/logs/{logId}/retry":{"post":{"tags":["Webhook Logs"],"operationId":"retry","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"logId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookLogResponseDTO"}}}}}}},"/v1/integration/documents/preview-from-template":{"post":{"tags":["Integration API"],"summary":"Pre-visualizar o documento de um template (sem criar nada)","description":"Devolve o PDF exatamente como o POST /documents/create-from-template o geraria com o mesmo\n`templateId` e as mesmas `templateVariables` - mesma rotina de preenchimento e conversao.\n\n- NAO cria documento nem envelope, NAO notifica ninguem e NAO conta na cota.\n- Serve para conferir o documento antes do envio (ex.: revisao juridica).\n- Retorna 200 `application/pdf` (inline).\n","operationId":"previewFromTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewDocFromTemplateRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (templateId faltando, template inexistente ou inativo)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Rate limit excedido","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"PDF preenchido","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/integration/documents/create-from-template":{"post":{"tags":["Integration API"],"summary":"Criar documento a partir de um template","description":"Gera um documento (envelope) a partir de um template existente e o envia para um signatario assinar.\n\n- Endpoint NATIVO (preferido em integracoes novas). Para 1 signatario e 1 documento.\n- Pre-condicoes: ter o `templateId` (via GET /v1/models) e o template ativo.\n- `templateVariables` preenche os placeholders {{chave}}; chaves nao informadas ficam vazias.\n- Use `externalId` para idempotencia: retries com o mesmo valor retornam o documento ja criado.\n- Retorna 201 com o `token` do envelope (use nos webhooks/cancelamento) e o `signUrl` do signatario.\n- Os campos `sendAutomaticEmail` e `folderPath` sao aceitos no schema mas NAO aplicados aqui;\n  para controla-los, use o endpoint compativel POST /api/v1/models/create-doc/.\n","operationId":"createFromTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocFromTemplateRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (templateId/signerName faltando, template inexistente, etc)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Rate limit excedido","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"201":{"description":"Documento criado (ou ja existente em caso de idempotencia)","content":{"*/*":{"example":{"token":"9f1c2d3e-4a5b-6c7d-8e9f-envelope","externalId":"pedido-42","status":"sent","signers":[{"token":"a2b3c4d5-signer","name":"Maria Silva","email":"maria@exemplo.com","status":"notified","signUrl":"https://app.tapsign.com.br/sign/a2b3c4d5"}]}}}}}}},"/v1/integration/bundles/create-from-templates":{"post":{"tags":["Integration API"],"summary":"Criar bundle de assinaturas a partir de templates","description":"Cria um pacote (bundle) de N documentos prontos para assinatura a partir de templates existentes.\nTodos os signatarios recebem UM unico link para assinar todos os documentos do bundle em sequencia.\n\n- Use `externalId` para idempotencia: retries com o mesmo valor retornam o bundle ja criado em vez de duplicar.\n- A ordem dos documentos apresentados ao signatario segue a ordem do array `templates`.\n- Se `sendImmediately=false`, o bundle fica em DRAFT para envio posterior.\n- Retorna 201 com bundleId, signUrl e tokens de cada envelope (para correlacao com webhooks).\n","operationId":"createBundleFromTemplates","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBundleFromTemplatesRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (campos obrigatorios, template inexistente, etc)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Rate limit excedido","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"201":{"description":"Bundle criado (ou ja existente em caso de idempotencia)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/IntegrationBundleResponseDTO"}}}}}}},"/v1/auth/api/token":{"post":{"tags":["API Authentication"],"summary":"Autenticar por email/senha e obter tokens JWT","description":"Troca email + senha por um par de tokens JWT (access + refresh).\n\n- Use quando preferir autenticar com credenciais de usuario em vez de API key.\n- O `access` retornado vai no header `Authorization: Bearer <access>` das chamadas seguintes.\n- O `access` expira (ver `expiresIn`, em segundos); renove com POST /v1/auth/api/token-refresh.\n- Para integracao servidor-a-servidor, prefira API key (nao expira).\n","operationId":"token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiAuthRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (email/senha faltando ou mal formados)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Credenciais invalidas","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Autenticado com sucesso","content":{"*/*":{"example":{"access":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refresh":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresIn":3600}}}}}}},"/v1/auth/api/token-refresh":{"post":{"tags":["API Authentication"],"summary":"Renovar o token de acesso via refresh token","description":"Gera um novo `access` token a partir de um `refresh` token valido, sem reenviar email/senha.\n\n- Use quando o `access` expirou (ou esta perto de expirar) e voce ainda tem o `refresh`.\n- Retorna um novo `access`, seu `expiresIn` e um novo `refresh`.\n- O `refresh` rotaciona: guarde o novo e use-o na proxima renovacao. O anterior so' e' aceito\n  por alguns segundos (chamadas concorrentes); reapresentado depois disso, e' tratado como\n  roubo e a sessao inteira cai (401).\n- Se o `refresh` estiver expirado/invalido, faca login novamente em POST /v1/auth/api/token.\n- Se o plano da conta deixou de incluir API, responde 402 sem consumir o `refresh`.\n","operationId":"tokenRefresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRefreshRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (refresh faltando)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Refresh token invalido, expirado ou reutilizado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Plano atual da conta nao inclui acesso a API","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Token renovado com sucesso","content":{"*/*":{"example":{"access":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refresh":"Xk3v9QeR...","expiresIn":3600}}}}}}},"/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"Listar as API keys da conta","description":"Lista todas as API keys do usuario autenticado.\n\n- Nunca retorna o segredo (`rawKey`) - apenas o `keyPrefix` para voce reconhecer cada chave.\n- Inclui chaves ativas e desativadas (veja o campo `active`).\n","operationId":"list_1","responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Lista de chaves","content":{"*/*":{"example":[{"id":12,"name":"Integracao Sistema X","keyPrefix":"tsk_AbCd","active":true,"lastUsedAt":"2026-06-29T14:32:00","createdAt":"2026-06-01T09:00:00"}]}}}}},"post":{"tags":["API Keys"],"summary":"Criar uma nova API key","description":"Gera uma API key (prefixo `tsk_`) para autenticar integracoes servidor-a-servidor.\n\n- Requer estar autenticado (JWT do usuario dono da conta).\n- O `rawKey` retornado e exibido UMA UNICA VEZ - guarde com seguranca, nao e recuperavel depois.\n- Use a chave como `Authorization: Bearer tsk_...`; ela nao expira (desative/delete para revogar).\n","operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequestDTO"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (nome faltando ou com mais de 100 caracteres)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"201":{"description":"Chave criada (rawKey exibido apenas aqui)","content":{"*/*":{"example":{"id":12,"name":"Integracao Sistema X","keyPrefix":"tsk_AbCd","rawKey":"tsk_AbCdEf0123456789abcdef0123456789"}}}}}}},"/api/v1/models/create-doc/":{"post":{"tags":["Compatibility API"],"summary":"Criar documento a partir de template (formato compativel)","description":"Cria um documento a partir de um template usando o formato da Compatibility API.\n\n- Use quando esta MIGRANDO de outra plataforma: a request/response segue o formato compativel,\n  bastando trocar a base URL e a chave (`tsk_...`).\n- Diferenca-chave vs. o endpoint nativo: as variaveis vao no array `data[]` no formato\n  `{ \"de\": \"<placeholder>\", \"para\": \"<valor>\" }`, e ha `send_automatic_whatsapp` e `disable_signer_emails`.\n- Em integracoes NOVAS, prefira o endpoint nativo POST /v1/integration/documents/create-from-template.\n- Retorna 201 com `token` (envelope), `open_id`, `status` e os signatarios com `sign_url`.\n","operationId":"createDocFromTemplate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatCreateDocRequest"}}},"required":true},"responses":{"400":{"description":"Requisicao invalida (template_id/signer_name faltando, template inexistente, etc)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Rate limit excedido","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"201":{"description":"Documento criado","content":{"*/*":{"example":{"token":"9f1c2d3e-4a5b-6c7d-8e9f-envelope","open_id":12345,"name":"Contrato de Servicos","status":"sent","external_id":"pedido-42","signers":[{"token":"a2b3c4d5-signer","name":"Maria Silva","email":"maria@exemplo.com","status":"notified","sign_url":"https://app.tapsign.com.br/sign/a2b3c4d5"}]}}}}}}},"/v1/api-keys/{id}/deactivate":{"patch":{"tags":["API Keys"],"summary":"Desativar uma API key","description":"Desativa uma API key sem deleta-la.\n\n- Chamadas autenticadas com a chave passam a retornar 401, mas o registro permanece (auditavel).\n- Use quando quiser suspender uma integracao temporariamente; para remover de vez, use DELETE.\n","operationId":"deactivate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Chave inexistente ou de outro usuario","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Chave desativada","content":{"*/*":{"example":{"message":"API key desativada com sucesso"}}}}}}},"/v1/webhooks/{webhookId}/logs":{"get":{"tags":["Webhook Logs"],"operationId":"list_2","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"eventType","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20,"maximum":100}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PageWebhookLogResponseDTO"}}}}}}},"/v1/webhooks/{webhookId}/logs/{logId}":{"get":{"tags":["Webhook Logs"],"operationId":"detail","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"logId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookLogResponseDTO"}}}}}}},"/v1/webhooks/{webhookId}/logs/stats":{"get":{"tags":["Webhook Logs"],"operationId":"stats","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Unauthorized","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WebhookStatsResponseDTO"}}}}}}},"/v1/models":{"get":{"tags":["Models"],"summary":"Listar templates (descoberta)","description":"Lista paginada dos seus templates - ponto de partida para integrar.\n\n- Use para descobrir o `id` (= templateId) que voce passa ao criar documentos, alem de `fields[]` (variaveis) e `signers[]`.\n- So crie documentos a partir de templates com `status: active`.\n- Filtre por nome com `search` e por pasta com `folderId`. Paginacao via `page` (default 0) e `size` (default 10).\n- Retorna um Page do Spring (`content[]`, `totalElements`, `totalPages`, ...).\n","operationId":"list_3","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"folderId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"filterByOrg","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"organizationId","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Not Found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Pagina de templates","content":{"*/*":{"example":{"content":[{"id":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f","name":"Contrato de Servicos","status":"active","fields":[{"name":"cliente_nome","fieldType":"text","required":true}],"signers":[{"name":"Maria Silva","isDynamic":true}]}],"totalElements":1,"totalPages":1}}}}},"security":[{"bearerAuth":[]}]}},"/v1/models/{id}":{"get":{"tags":["Models"],"summary":"Detalhar um template (descoberta)","description":"Retorna o detalhe completo de um template pelo seu UUID.\n\n- Use para inspecionar as variaveis (`fields[].name`) e os signatarios (`signers[]`, com `isDynamic`) antes de criar documentos.\n- O `id` aqui e o mesmo `templateId` usado em create-from-template / create-doc.\n","operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Template inexistente ou de outro usuario","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Template encontrado","content":{"*/*":{"example":{"id":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f","name":"Contrato de Servicos","status":"active","fields":[{"name":"cliente_nome","fieldType":"text","required":true}],"signers":[{"name":"Maria Silva","isDynamic":true}]}}}}},"security":[{"bearerAuth":[]}]}},"/v1/integration/documents/{token}":{"delete":{"tags":["Integration API"],"summary":"Cancelar um documento","description":"Cancela um documento (envelope) ja criado, impedindo novas assinaturas.\n\n- Use o `token` do envelope retornado na criacao (ou recebido nos webhooks).\n- Pre-condicao: o documento deve pertencer ao dono autenticado e ainda nao estar concluido.\n- Dispara o evento de webhook `doc_canceled` para os webhooks inscritos.\n- Retorna 200 com uma mensagem de confirmacao.\n","operationId":"cancelDocument","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Documento (token) inexistente ou de outro dono","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Documento cancelado","content":{"*/*":{"example":{"message":"Documento cancelado com sucesso"}}}}}}},"/v1/integration/bundles/by-envelope/{token}":{"delete":{"tags":["Integration API"],"summary":"Cancelar um PACOTE inteiro pelo token de qualquer envelope dele","description":"Cancela o bundle (pacote) INTEIRO a partir do token de qualquer um dos envelopes.\n\n- Bundle e tudo-ou-nada: cancelar so um documento deixaria o pacote pela metade.\n- Cancela todos os envelopes (dispara `doc_canceled` para cada um) e marca o bundle como CANCELED.\n- O link unico de assinatura passa a mostrar \"pacote cancelado\".\n- Idempotente: cancelar um bundle ja cancelado retorna 200.\n- Pre-condicao: bundle nao concluido e pertencente ao dono autenticado.\n","operationId":"cancelBundleByEnvelope","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Documento nao pertence a um pacote, ou pacote ja concluido","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Token inexistente ou de outro dono","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Pacote cancelado","content":{"*/*":{"example":{"message":"Pacote cancelado com sucesso"}}}}}}},"/v1/api-keys/{id}":{"delete":{"tags":["API Keys"],"summary":"Deletar uma API key","description":"Remove permanentemente uma API key da conta.\n\n- Use para revogar uma chave em definitivo (chamadas com ela passam a retornar 401).\n- Diferente de desativar, esta operacao e irreversivel.\n- Retorna 204 sem corpo.\n","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Chave inexistente ou de outro usuario","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"Nao autenticado","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"204":{"description":"Chave removida"}}}},"/api/v1/docs/{docToken}/":{"delete":{"tags":["Compatibility API"],"summary":"Cancelar um documento (formato compativel)","description":"Cancela um documento ja criado, usando o caminho da Compatibility API.\n\n- Use o `docToken` (token do envelope) retornado na criacao ou recebido nos webhooks.\n- Pre-condicao: o documento deve pertencer ao dono autenticado e ainda nao estar concluido.\n- Equivale ao DELETE /v1/integration/documents/{token} do endpoint nativo.\n- Retorna 200 com uma mensagem de confirmacao.\n","operationId":"deleteDocument","parameters":[{"name":"docToken","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"404":{"description":"Documento (token) inexistente ou de outro dono","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"409":{"description":"Conflict","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"401":{"description":"API key ausente ou invalida","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"423":{"description":"Locked","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"402":{"description":"Payment Required","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"422":{"description":"Unprocessable Content","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"429":{"description":"Too Many Requests","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"502":{"description":"Bad Gateway","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"413":{"description":"Content Too Large","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExceptionFilters"}}}},"200":{"description":"Documento cancelado","content":{"*/*":{"example":{"message":"Documento cancelado com sucesso"}}}}}}}},"components":{"schemas":{"ExceptionFilters":{"type":"object","properties":{"title":{"type":"string"},"status":{"type":"integer","format":"int32"},"details":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"devMsg":{"type":"string"},"fields":{"type":"object","additionalProperties":{"type":"string"}}}},"UpdateWebhookConfigRequestDTO":{"type":"object","description":"Payload para atualizar um webhook existente. Todos os campos sao opcionais - envie apenas os que deseja alterar. Omita o `secret` para manter o segredo atual.","properties":{"name":{"type":"string","description":"Novo nome/rotulo (ate 100 chars).","example":"Integracao Sistema X (prod)","maxLength":100,"minLength":0},"url":{"type":"string","description":"Nova URL de destino (HTTPS publica).","example":"https://seu-sistema.com/webhooks/tapsign","maxLength":2048,"minLength":0},"secret":{"type":"string","description":"Novo segredo HMAC. Omita para manter o atual; vazio e recusado com 400.","example":"novo-segredo-forte","maxLength":512,"minLength":0},"events":{"type":"array","description":"Nova lista de eventos assinados (1 a 20). Use [\"*\"] para todos. Omita para manter a atual; lista vazia e recusada com 400.","example":["doc_signed","doc_completed"],"items":{"type":"string","minLength":1},"maxItems":20,"minItems":0},"active":{"type":"boolean","description":"Liga (true) ou desliga (false) o webhook sem precisar deleta-lo.","example":true}}},"UserPutRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":2},"imgUrl":{"type":"string"},"locale":{"type":"string"},"currency":{"type":"string"},"loginNotificationsEnabled":{"type":"boolean"},"phone":{"type":"string","maxLength":32,"minLength":0}}},"UserMetadataResponseDTO":{"type":"object","properties":{"accessMode":{"type":"string","enum":["READ_WRITE","READ_ONLY","DISABLED"]},"planType":{"type":"string","enum":["FREE","PRO","PRO_80","PRO_160","PRO_UNLIMITED","TEAM_80","TEAM_160","TEAM_400","ENTERPRISE"]},"planExpirationDate":{"type":"string","format":"date-time"},"proSource":{"type":"string","enum":["TRIAL","SUBSCRIPTION","ADMIN_GRANTED"]},"maxResources":{"type":"integer","format":"int32"},"maxRequestsPerMonth":{"type":"integer","format":"int32"},"maxSignatures":{"type":"integer","format":"int32"},"signaturesUsed":{"type":"integer","format":"int32"},"maxEnvelopes":{"type":"integer","format":"int32"},"envelopesUsed":{"type":"integer","format":"int32"},"quotaRenewsOn":{"type":"string","format":"date"},"planEndsOn":{"type":"string","format":"date"},"maxTemplates":{"type":"integer","format":"int32"},"canUseApi":{"type":"boolean"},"canExportData":{"type":"boolean"},"canUseReports":{"type":"boolean"},"canUseAdvancedFeatures":{"type":"boolean"},"emailVerified":{"type":"boolean"},"reputationStatus":{"type":"string","enum":["GOOD","SUSPICIOUS","BLOCKED"]},"isLifetimePro":{"type":"boolean"},"locale":{"type":"string"},"currency":{"type":"string"},"onboardingCompleted":{"type":"boolean"},"onboardingPostponed":{"type":"boolean"},"testDocumentWhatsAppUsed":{"type":"boolean"},"loginNotificationsEnabled":{"type":"boolean"}}},"UserResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"admin":{"type":"boolean"},"active":{"type":"boolean"},"source":{"type":"string","enum":["LOCAL","GOOGLE"]},"imgUrl":{"type":"string"},"phone":{"type":"string"},"emailVerified":{"type":"boolean"},"hasLocalPassword":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/UserMetadataResponseDTO"},"createdAt":{"type":"string","format":"date-time"},"lastAccess":{"type":"string","format":"date-time"}}},"EntryRequest":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"minLength":0},"content":{"type":"string","minLength":1},"keywords":{"type":"string","maxLength":500,"minLength":0},"active":{"type":"boolean"}},"required":["active","content","title"]},"EntryResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"content":{"type":"string"},"keywords":{"type":"string"},"source":{"type":"string","enum":["MANUAL","HELP_CENTER","SUGGESTED"]},"active":{"type":"boolean"},"hasEmbedding":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}}},"ToggleRequest":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"]},"BusinessHoursDayDTO":{"type":"object","properties":{"dayOfWeek":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"open":{"type":"boolean"},"openTime":{"type":"string"},"closeTime":{"type":"string"}},"required":["dayOfWeek","open"]},"BotStatusRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["OFF","SHADOW","ON"]},"outboundEnabled":{"type":"boolean"}},"required":["enabled","mode","outboundEnabled"]},"UpdateSupportAvailabilityRequestDTO":{"type":"object","properties":{"accepting":{"type":"boolean"},"autoReplyEnabled":{"type":"boolean"},"autoReplyMessage":{"type":"string","maxLength":1000,"minLength":0}},"required":["accepting"]},"SupportAvailabilityDTO":{"type":"object","properties":{"accepting":{"type":"boolean"},"pausedAt":{"type":"string","format":"date-time"},"pausedByName":{"type":"string"},"autoReplyEnabled":{"type":"boolean"},"autoReplyMessage":{"type":"string"}}},"UpdateOrganizationRequestDTO":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"logoUrl":{"type":"string"},"requireTwoFactor":{"type":"boolean"}}},"OrganizationResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"logoUrl":{"type":"string"},"ownerId":{"type":"integer","format":"int64"},"maxMembers":{"type":"integer","format":"int32"},"currentMembers":{"type":"integer","format":"int32"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"requireTwoFactor":{"type":"boolean"}}},"UpdateCustomRoleRequestDTO":{"type":"object","properties":{"name":{"type":"string"},"permissionIds":{"type":"array","items":{"type":"integer","format":"int64"}}}},"CustomRoleResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"baseRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponseDTO"}},"createdAt":{"type":"string","format":"date-time"}}},"PermissionResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"resource":{"type":"string"},"action":{"type":"string"}}},"UpdateMemberRoleRequestDTO":{"type":"object","properties":{"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]}},"required":["role"]},"OrganizationMemberResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"userName":{"type":"string"},"userEmail":{"type":"string"},"userImgUrl":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]},"active":{"type":"boolean"},"joinedAt":{"type":"string","format":"date-time"},"twoFactorEnabled":{"type":"boolean"}}},"SetMemberPermissionsRequestDTO":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}}},"required":["permissions"]},"MemberPermissionsResponseDTO":{"type":"object","properties":{"memberId":{"type":"integer","format":"int64"},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"UpdateFolderRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0}},"required":["name"]},"FolderResponseDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"integer","format":"int64"},"ownerId":{"type":"integer","format":"int64"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpdateContactRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"email":{"type":"string","format":"email","maxLength":180,"minLength":0},"phone":{"type":"string","maxLength":30,"minLength":0},"cpf":{"type":"string","maxLength":20,"minLength":0},"rg":{"type":"string","maxLength":20,"minLength":0}},"required":["name"]},"ContactResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"integer","format":"int64"},"ownerId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"cpf":{"type":"string"},"rg":{"type":"string"},"favorite":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"UpdateContactGroupRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0}},"required":["name"]},"ContactGroupResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organizationId":{"type":"integer","format":"int64"},"name":{"type":"string"},"memberCount":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"NotificationPreferenceRequestDTO":{"type":"object","properties":{"category":{"type":"string","enum":["DOCUMENT","BILLING","ORGANIZATION","SUPPORT","SYSTEM"]},"channel":{"type":"string","enum":["IN_APP","EMAIL","WHATSAPP"]},"enabled":{"type":"boolean"}},"required":["category","channel","enabled"]},"UpdatePreferencesRequestDTO":{"type":"object","properties":{"preferences":{"type":"array","items":{"$ref":"#/components/schemas/NotificationPreferenceRequestDTO"},"minItems":1}},"required":["preferences"]},"ConfigureSignersRequestDTO":{"type":"object","properties":{"signers":{"type":"array","items":{"$ref":"#/components/schemas/SignerDTO"},"maxItems":2147483647,"minItems":1}},"required":["signers"]},"SignerDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"email":{"type":"string","maxLength":255,"minLength":0},"phone":{"type":"string","maxLength":50,"minLength":0},"role":{"type":"string"},"signOrder":{"type":"integer","format":"int32","minimum":1},"isDynamic":{"type":"boolean"},"authMethods":{"type":"array","items":{"type":"string"}},"customRoleName":{"type":"string","maxLength":255,"minLength":0},"signatureImage":{"type":"string","maxLength":500000,"minLength":0},"signatureType":{"type":"string","maxLength":20,"minLength":0}},"required":["role"]},"FieldPositionDTO":{"type":"object","description":"Caixa onde o valor de um campo e escrito no modelo PDF, em pontos do PDF, origem no topo esquerdo da pagina como o leitor a mostra.","properties":{"page":{"type":"integer","format":"int32","description":"Pagina, a partir de 1.","example":1},"posX":{"type":"number","format":"float","example":72.0},"posY":{"type":"number","format":"float","example":640.0},"width":{"type":"number","format":"float","example":200.0},"height":{"type":"number","format":"float","example":13.2},"fontSize":{"type":"number","format":"float","description":"Tamanho da fonte do valor.","example":11},"fromPlaceholder":{"type":"boolean","description":"true quando a caixa veio de um {{campo}} do arquivo: fixa, apaga o marcador ao preencher.","example":true}}},"ModelFieldResponseDTO":{"type":"object","description":"Campo (variavel) do template. `name` e a chave usada em templateVariables.","properties":{"name":{"type":"string","description":"Nome da variavel. Aparece no documento como {{name}} e e a chave que voce envia em templateVariables.","example":"cliente_nome"},"fieldType":{"type":"string","description":"Tipo do campo.","example":"text"},"loopGroup":{"type":"string","description":"Grupo de repeticao (loop), se o campo pertence a um.","example":"itens"},"displayOrder":{"type":"integer","format":"int32","description":"Ordem de exibicao no formulario.","example":0},"label":{"type":"string","description":"Rotulo amigavel do campo.","example":"Nome do cliente"},"helpText":{"type":"string","description":"Texto de ajuda exibido ao preencher.","example":"Informe o nome completo"},"inputType":{"type":"string","description":"Tipo de input no formulario.","example":"text"},"required":{"type":"boolean","description":"Se o campo e obrigatorio no preenchimento.","example":true},"hidden":{"type":"boolean","description":"Se o campo fica oculto no formulario.","example":false},"contextText":{"type":"string","description":"Paragrafo do .docx onde a variavel aparece, para a tela de configuracao mostrar a clausula em vez de so o nome da variavel. Nulo em modelos criados antes desta funcionalidade.","example":"FORO: comarca de {{cidade_foro}}."},"positions":{"type":"array","description":"Modelo PDF: onde o valor e escrito (vazio no DOCX, em que o valor entra no texto).","items":{"$ref":"#/components/schemas/FieldPositionDTO"}}}},"ModelResponseDTO":{"type":"object","description":"Template (model) cadastrado. Para integrar: use `id` como templateId, `fields[].name` como chaves de templateVariables e `signers[]` (isDynamic) para saber quem informar na hora de criar o documento.","properties":{"id":{"type":"string","format":"uuid","description":"UUID do template. E o `templateId` que voce passa para criar documentos.","example":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f"},"name":{"type":"string","description":"Nome do template.","example":"Contrato de Servicos"},"type":{"type":"string","description":"Tipo do template.","example":"docx"},"status":{"type":"string","description":"Status do template (active/inactive). Use apenas templates ativos.","example":"active"},"folderId":{"type":"string","format":"uuid","description":"UUID da pasta onde o template esta, se houver.","example":"1a2b3c4d-folder"},"organizationId":{"type":"integer","format":"int64","description":"ID da organizacao dona do template, se for de organizacao (null se pessoal).","example":10},"fields":{"type":"array","description":"Variaveis do template. Cada fields[].name e uma chave aceita em templateVariables / data[].de.","items":{"$ref":"#/components/schemas/ModelFieldResponseDTO"}},"signers":{"type":"array","description":"Signatarios configurados no template. isDynamic=true => voce fornece nome/email/telefone ao criar o documento.","items":{"$ref":"#/components/schemas/ModelSignerResponseDTO"}},"ownerSign":{"type":"boolean","description":"Se o dono da conta tambem assina os documentos gerados.","example":false},"publicToken":{"type":"string","description":"Token publico para o link de preenchimento publico do template, se habilitado.","example":"pub_abc123"},"documentsCount":{"type":"integer","format":"int32","description":"Quantidade de documentos ja gerados a partir deste template.","example":42},"createdBy":{"type":"string","description":"Email de quem criou o template.","example":"operador@empresa.com"},"createdAt":{"type":"string","format":"date-time","description":"Data de criacao.","example":"2026-06-01T09:00:00"},"updatedAt":{"type":"string","format":"date-time","description":"Data da ultima atualizacao.","example":"2026-06-29T14:00:00"},"whatsappNotification":{"type":"boolean","description":"Se documentos gerados notificam signatarios por WhatsApp.","example":true},"signerAttachments":{"type":"string","description":"Configuracao de anexos exigidos do signatario (JSON serializado), se houver."},"externalEmails":{"type":"string","description":"Emails externos adicionais que recebem copia, se configurado."},"redirectUrl":{"type":"string","description":"URL de redirecionamento apos a assinatura, se configurada.","example":"https://seu-sistema.com/obrigado"},"formLanguage":{"type":"string","description":"Idioma do formulario/documento.","example":"pt-BR"}}},"ModelSignerResponseDTO":{"type":"object","description":"Signatario configurado no template.","properties":{"id":{"type":"string","format":"uuid","description":"UUID do signatario configurado.","example":"5e6f7a8b-signer"},"name":{"type":"string","description":"Nome do signatario (fixo no template, ou vazio se dinamico).","example":"Maria Silva"},"email":{"type":"string","description":"Email do signatario (fixo, ou vazio se dinamico).","example":"maria@exemplo.com"},"phone":{"type":"string","description":"Telefone do signatario.","example":"5511987654321"},"role":{"type":"string","description":"Papel do signatario.","example":"signer"},"signOrder":{"type":"integer","format":"int32","description":"Ordem de assinatura (assinatura em sequencia).","example":0},"isDynamic":{"type":"boolean","description":"Se true, os dados deste signatario (nome/email/telefone) sao fornecidos na hora de criar o documento.","example":true},"authMethods":{"type":"array","description":"Metodos de autenticacao exigidos para assinar.","example":["email"],"items":{"type":"string"}},"customRoleName":{"type":"string","description":"Nome de papel customizado, se houver.","example":"Testemunha"},"signatureImage":{"type":"string","description":"Imagem de assinatura associada (base64/URL), se houver."},"signatureType":{"type":"string","description":"Tipo de assinatura.","example":"draw"},"signaturePage":{"type":"integer","format":"int32","description":"Pagina onde a assinatura e posicionada.","example":1},"signaturePosX":{"type":"number","format":"float","description":"Posicao X da assinatura na pagina.","example":100.0},"signaturePosY":{"type":"number","format":"float","description":"Posicao Y da assinatura na pagina.","example":200.0},"signatureWidth":{"type":"number","format":"float","description":"Largura da assinatura.","example":150.0},"signatureHeight":{"type":"number","format":"float","description":"Altura da assinatura.","example":50.0},"positions":{"type":"array","description":"Posicoes adicionais da assinatura (multiplas paginas).","items":{"$ref":"#/components/schemas/SignerPositionDTO"}}}},"SignerPositionDTO":{"type":"object","description":"Posicao de uma assinatura numa pagina do documento.","properties":{"id":{"type":"string","format":"uuid","description":"UUID da posicao.","example":"7a8b9c0d-pos"},"page":{"type":"integer","format":"int32","description":"Pagina da assinatura.","example":1},"posX":{"type":"number","format":"float","description":"Posicao X.","example":100.0},"posY":{"type":"number","format":"float","description":"Posicao Y.","example":200.0},"width":{"type":"number","format":"float","description":"Largura.","example":150.0},"height":{"type":"number","format":"float","description":"Altura.","example":50.0}}},"ConfigureSignerPositionsRequestDTO":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/PositionDTO"},"maxItems":2147483647,"minItems":1}},"required":["positions"]},"PositionDTO":{"type":"object","properties":{"signerId":{"type":"string","format":"uuid"},"signaturePage":{"type":"integer","format":"int32","minimum":1},"signaturePosX":{"type":"number","format":"float","minimum":0},"signaturePosY":{"type":"number","format":"float","minimum":0},"signatureWidth":{"type":"number","format":"float","minimum":1.0},"signatureHeight":{"type":"number","format":"float","minimum":1.0},"refPageWidth":{"type":"number","format":"float"},"refPageHeight":{"type":"number","format":"float"}},"required":["signerId"]},"ConfigureFieldsRequestDTO":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldConfigDTO"},"maxItems":2147483647,"minItems":1}},"required":["fields"]},"FieldConfigDTO":{"type":"object","properties":{"name":{"type":"string","minLength":1},"displayOrder":{"type":"integer","format":"int32"},"label":{"type":"string","maxLength":255,"minLength":0},"helpText":{"type":"string","maxLength":500,"minLength":0},"inputType":{"type":"string"},"required":{"type":"boolean"},"hidden":{"type":"boolean"}},"required":["name"]},"ConfigureFieldPositionsRequestDTO":{"type":"object","description":"Posições manuais dos campos de um modelo PDF (a lista inteira). As posições que vieram de um {{campo}} do arquivo são mantidas e não vão aqui.","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/PositionDTO"},"maxItems":500,"minItems":0}},"required":["positions"]},"ConfigureAdvancedOptionsRequestDTO":{"type":"object","properties":{"whatsappNotification":{"type":"boolean"},"signerAttachments":{"type":"array","items":{"type":"string"},"maxItems":10,"minItems":0},"externalEmails":{"type":"array","items":{"type":"string"},"maxItems":6,"minItems":0},"redirectUrl":{"type":"string","maxLength":510,"minLength":0},"formLanguage":{"type":"string"}}},"UpdateSignerRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":2},"email":{"type":"string","format":"email"},"phone":{"type":"string","pattern":"^\\+?[1-9]\\d{1,14}$"},"role":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"signOrder":{"type":"integer","format":"int32","minimum":1},"authMethods":{"type":"array","items":{"type":"string","enum":["SCREEN_SIGNATURE","EMAIL_CODE","SMS_CODE","WHATSAPP_CODE","DIGITAL_CERTIFICATE","FACIAL_RECOGNITION","IDENTITY_VALIDATION","ICP_CERTIFICATE","CPF","RG","SELFIE_PHOTO","DOCUMENT_PHOTO"]}},"lockedFields":{"type":"array","items":{"type":"string","enum":["NAME","EMAIL","PHONE"]}},"locale":{"type":"string","pattern":"pt-BR|en-US"}}},"EmailDeliveryResponseDTO":{"type":"object","description":"Problema de entrega do ultimo e-mail mandado ao signatario neste documento/pacote. null quando nao ha' o que avisar. Some ao corrigir o e-mail (e' outro endereco).","properties":{"status":{"type":"string","description":"BOUNCED_PERMANENT = endereco nao existe; BOUNCED_TRANSIENT = caixa cheia/servidor fora, pode chegar depois","enum":["BOUNCED_PERMANENT","BOUNCED_TRANSIENT"]},"subtype":{"type":"string","description":"Subtipo da SES: General, NoEmail, MailboxFull, OnAccountSuppressionList...","example":"General"},"at":{"type":"string","format":"date-time","description":"Quando a SES avisou"}}},"SignerResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"envelopeId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"role":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"signOrder":{"type":"integer","format":"int32"},"status":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"signedAt":{"type":"string","format":"date-time"},"declinedAt":{"type":"string","format":"date-time"},"declineReason":{"type":"string"},"accessToken":{"type":"string"},"whatsappLastStatus":{"type":"string"},"whatsappLastStatusAt":{"type":"string","format":"date-time"},"whatsappLastErrorCode":{"type":"integer","format":"int32"},"whatsappOwnerMessage":{"type":"string"},"signaturePage":{"type":"integer","format":"int32"},"signaturePosX":{"type":"number","format":"float"},"signaturePosY":{"type":"number","format":"float"},"signatureWidth":{"type":"number","format":"float"},"signatureHeight":{"type":"number","format":"float"},"authMethods":{"type":"array","items":{"type":"string","enum":["SCREEN_SIGNATURE","EMAIL_CODE","SMS_CODE","WHATSAPP_CODE","DIGITAL_CERTIFICATE","FACIAL_RECOGNITION","IDENTITY_VALIDATION","ICP_CERTIFICATE","CPF","RG","SELFIE_PHOTO","DOCUMENT_PHOTO"]}},"lockedFields":{"type":"array","items":{"type":"string"}},"locale":{"type":"string"},"emailDelivery":{"$ref":"#/components/schemas/EmailDeliveryResponseDTO"}}},"ConfigureEnvelopeSignerPositionsRequestDTO":{"type":"object","properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/PositionDTO"}}},"required":["positions"]},"UpdateEnvelopeOptionsRequestDTO":{"type":"object","properties":{"signOrder":{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},"allowRefuse":{"type":"boolean"},"reminderIntervalDays":{"type":"integer","format":"int32","maximum":30,"minimum":1},"sendSignedViaWhatsapp":{"type":"boolean"},"expiresAt":{"type":"string","format":"date-time"}}},"EnvelopeResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"ownerId":{"type":"integer","format":"int64"},"documentId":{"type":"integer","format":"int64"},"organizationId":{"type":"integer","format":"int64"},"title":{"type":"string"},"message":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"expiresAt":{"type":"string","format":"date-time"},"signOrder":{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"sentAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"createdByEmail":{"type":"string"},"folderId":{"type":"string","format":"uuid"},"allowRefuse":{"type":"boolean"},"reminderIntervalDays":{"type":"integer","format":"int32"},"lastReminderAt":{"type":"string","format":"date-time"},"sendSignedViaWhatsapp":{"type":"boolean"},"underReview":{"type":"boolean"},"signerCount":{"type":"integer","format":"int32"},"signedCount":{"type":"integer","format":"int32"}}},"SetEnvelopeObserversRequestDTO":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string","format":"email","maxLength":255,"minLength":0},"maxItems":10,"minItems":0},"notifyMode":{"type":"string","enum":["COMPLETION_ONLY","EACH_SIGNATURE"]}},"required":["emails"]},"EnvelopeObserversResponseDTO":{"type":"object","properties":{"notifyMode":{"type":"string","enum":["COMPLETION_ONLY","EACH_SIGNATURE"]},"observers":{"type":"array","items":{"$ref":"#/components/schemas/ObserverResponseDTO"}}}},"ObserverResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"}}},"UpdateFieldRequestDTO":{"type":"object","properties":{"signerId":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["SIGNATURE","INITIALS","TEXT","DATE","CHECKBOX"]},"page":{"type":"integer","format":"int32","minimum":1},"posX":{"type":"number","format":"double","minimum":0},"posY":{"type":"number","format":"double","minimum":0},"width":{"type":"number","format":"double","minimum":1},"height":{"type":"number","format":"double","minimum":1},"required":{"type":"boolean"},"placeholder":{"type":"string","maxLength":255,"minLength":0},"refPageWidth":{"type":"number","format":"double"},"refPageHeight":{"type":"number","format":"double"}},"required":["height","page","posX","posY","type","width"]},"FieldResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"envelopeId":{"type":"integer","format":"int64"},"signerId":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["SIGNATURE","INITIALS","TEXT","DATE","CHECKBOX"]},"page":{"type":"integer","format":"int32"},"posX":{"type":"number","format":"double"},"posY":{"type":"number","format":"double"},"width":{"type":"number","format":"double"},"height":{"type":"number","format":"double"},"required":{"type":"boolean"},"placeholder":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"refPageWidth":{"type":"number","format":"double"},"refPageHeight":{"type":"number","format":"double"},"value":{"type":"string"},"filledAt":{"type":"string","format":"date-time"}}},"CorrectBundleSignerEmailRequestDTO":{"type":"object","description":"E-mail corrigido do signatario do pacote. O pedido de assinatura e' reenviado por e-mail para ele.","properties":{"email":{"type":"string","format":"email","example":"ana@gmail.com","maxLength":320,"minLength":0}},"required":["email"]},"BundleSignerDetailDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"accessToken":{"type":"string"},"status":{"type":"string","enum":["PENDING","NOTIFIED","IN_PROGRESS","COMPLETED"]},"emailDelivery":{"$ref":"#/components/schemas/EmailDeliveryResponseDTO"}}},"SetNotificationTypeEnabledRequestDTO":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]},"SaveTemplateRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0},"subject":{"type":"string","maxLength":255,"minLength":0,"pattern":"[^\\r\\n]*"},"bodyHtml":{"type":"string","maxLength":200000,"minLength":0}},"required":["bodyHtml","name","subject"]},"TemplateResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"subject":{"type":"string"},"bodyHtml":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}}},"SaveSignatureRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0},"html":{"type":"string"},"personName":{"type":"string","maxLength":100,"minLength":0},"roleTitle":{"type":"string","maxLength":100,"minLength":0},"phone":{"type":"string","maxLength":30,"minLength":0},"showPersonName":{"type":"boolean"},"showRoleTitle":{"type":"boolean"},"showPhone":{"type":"boolean"}},"required":["name"]},"TaskBindingRequest":{"type":"object","properties":{"providerCode":{"type":"string","minLength":1},"model":{"type":"string","maxLength":80,"minLength":0},"temperature":{"type":"number","format":"double"},"maxTokens":{"type":"integer","format":"int32"},"fallbackProviderCode":{"type":"string"},"fallbackModel":{"type":"string","maxLength":80,"minLength":0}},"required":["model","providerCode"]},"PromptRequest":{"type":"object","properties":{"content":{"type":"string","minLength":1}},"required":["content"]},"CreateWebhookConfigRequestDTO":{"type":"object","description":"Payload para registrar um webhook. O TapSign fara POST na `url` informada quando os `events` acontecerem, assinando cada entrega com HMAC-SHA256 usando o `secret`.","properties":{"name":{"type":"string","description":"Nome/rotulo do webhook (ate 100 chars).","example":"Integracao Sistema X","maxLength":100,"minLength":0},"url":{"type":"string","description":"Seu endpoint publico HTTPS que recebera os POSTs. E revalidada no momento do envio (anti DNS-rebinding) - enderecos internos/privados sao rejeitados.","example":"https://seu-sistema.com/webhooks/tapsign","maxLength":2048,"minLength":0},"secret":{"type":"string","description":"Segredo usado para assinar cada entrega (HMAC-SHA256, hex minusculo, no header X-Webhook-Signature). Guarde-o; nao e devolvido nas leituras.","example":"um-segredo-forte-aleatorio","maxLength":512,"minLength":0},"events":{"type":"array","description":"Eventos assinados (1 a 20). Use [\"*\"] para todos, ou liste: doc_viewed, doc_signed, doc_refused, doc_completed, doc_canceled, doc_expired, signer_email_bounced.","example":["*"],"items":{"type":"string","minLength":1},"maxItems":20,"minItems":1}},"required":["events","name","secret","url"]},"WebhookLogResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"eventType":{"type":"string"},"envelopeId":{"type":"integer","format":"int64"},"status":{"type":"string"},"attempt":{"type":"integer","format":"int32"},"responseStatus":{"type":"integer","format":"int32"},"responseBody":{"type":"string"},"errorMessage":{"type":"string"},"payload":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"nextRetryAt":{"type":"string","format":"date-time"}}},"UserPostRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":2},"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","maxLength":100,"minLength":8}},"required":["email","name","password"]},"VerifySignupOtpRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"otp":{"type":"string","minLength":1,"pattern":"^\\d{6}$"}},"required":["email","otp"]},"SignupOtpResponse":{"type":"object","properties":{"verificationToken":{"type":"string"}}},"SignupEmailRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1}},"required":["email"]},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"AttributionRequestDTO":{"type":"object","properties":{"utmSource":{"type":"string"},"utmMedium":{"type":"string"},"utmCampaign":{"type":"string"},"utmTerm":{"type":"string"},"utmContent":{"type":"string"},"utmId":{"type":"string"},"clickId":{"type":"string"},"referrer":{"type":"string"},"landingPage":{"type":"string"}}},"CompleteSignupRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","maxLength":100,"minLength":8},"verificationToken":{"type":"string","minLength":1},"attribution":{"$ref":"#/components/schemas/AttributionRequestDTO"}},"required":["email","password","verificationToken"]},"TestDocumentWhatsAppRequestDTO":{"type":"object","properties":{"envelopeId":{"type":"integer","format":"int64"}},"required":["envelopeId"]},"SetPasswordRequestDTO":{"type":"object","properties":{"password":{"type":"string","maxLength":100,"minLength":8},"otp":{"type":"string","minLength":1,"pattern":"^\\d{6}$"}},"required":["otp","password"]},"OnboardingRequestDTO":{"type":"object","properties":{"purpose":{"type":"string","maxLength":50,"minLength":0},"activitySector":{"type":"string","maxLength":100,"minLength":0},"monthlyVolume":{"type":"string","maxLength":50,"minLength":0},"discoverySource":{"type":"string","maxLength":100,"minLength":0}},"required":["purpose"]},"TwoFactorSetupRequestDTO":{"type":"object","properties":{"currentPassword":{"type":"string","maxLength":128,"minLength":0}}},"TwoFactorSetupResponseDTO":{"type":"object","properties":{"secret":{"type":"string"},"otpauthUri":{"type":"string"},"qrCodeDataUri":{"type":"string"}}},"TwoFactorCodeRequestDTO":{"type":"object","properties":{"code":{"type":"string","maxLength":32,"minLength":0}},"required":["code"]},"RecoveryCodesResponseDTO":{"type":"object","properties":{"recoveryCodes":{"type":"array","items":{"type":"string"}}}},"CreateUserSignatureRequestDTO":{"type":"object","properties":{"signatureImage":{"type":"string","minLength":1},"signatureType":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["signatureImage","signatureType"]},"UserSignatureResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"signatureType":{"type":"string","enum":["DRAWN","TYPED","UPLOADED"]},"name":{"type":"string"},"signatureImageUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"UploadImageRequestDTO":{"type":"object","properties":{"fileName":{"type":"string","minLength":1},"contentType":{"type":"string","minLength":1},"contentLength":{"type":"integer","format":"int64"}},"required":["contentLength","contentType","fileName"]},"UploadResponseDTO":{"type":"object","properties":{"uploadSignedUrl":{"type":"string"},"finalUrl":{"type":"string"}}},"BackfillResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int32"},"embedded":{"type":"integer","format":"int32"},"failed":{"type":"integer","format":"int32"}}},"ReplyAsAgentRequestDTO":{"type":"object","properties":{"text":{"type":"string","maxLength":4096,"minLength":0},"quotedMessageId":{"type":"integer","format":"int64"}},"required":["text"]},"ConversationMessageResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"direction":{"type":"string","enum":["INBOUND","OUTBOUND"]},"author":{"type":"string"},"sentByUserId":{"type":"integer","format":"int64"},"agentName":{"type":"string"},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["TEXT","MEDIA","CONTACTS","LOCATION","INTERACTIVE","UNSUPPORTED","SYSTEM_NOTICE","TEMPLATE"]},"providerMessageId":{"type":"string"},"deliveryStatus":{"type":"string","enum":["PENDING","SENT","DELIVERED","READ","FAILED"]},"deliveryUpdatedAt":{"type":"string","format":"date-time"},"deliveryError":{"type":"string"},"media":{"$ref":"#/components/schemas/MediaDTO"},"mediaTranscript":{"type":"string"},"quoted":{"$ref":"#/components/schemas/QuotedDTO"},"reaction":{"type":"string"}}},"MediaDTO":{"type":"object","properties":{"type":{"type":"string","enum":["IMAGE","AUDIO","VIDEO","DOCUMENT","STICKER"]},"url":{"type":"string"},"mimeType":{"type":"string"},"fileName":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"}}},"QuotedDTO":{"type":"object","properties":{"messageId":{"type":"integer","format":"int64"},"author":{"type":"string"},"preview":{"type":"string"}}},"CloseConversationRequestDTO":{"type":"object","properties":{"reason":{"type":"string","maxLength":200,"minLength":0}}},"BotReplyRequestDTO":{"type":"object","properties":{"text":{"type":"string","maxLength":4096,"minLength":0}},"required":["text"]},"BotDraftResponseDTO":{"type":"object","properties":{"text":{"type":"string"},"wouldEscalate":{"type":"boolean"}}},"CloseBatchRequestDTO":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer","format":"int64"},"maxItems":200,"minItems":1},"sendClosingMessage":{"type":"boolean"}},"required":["ids"]},"CloseBatchResponseDTO":{"type":"object","properties":{"closed":{"type":"integer","format":"int32"},"skipped":{"type":"integer","format":"int32"}}},"BusinessHoursExceptionDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"date":{"type":"string","format":"date"},"closed":{"type":"boolean"},"openTime":{"type":"string"},"closeTime":{"type":"string"},"customMessage":{"type":"string","maxLength":500,"minLength":0}},"required":["closed","date"]},"PreviewRequest":{"type":"object","properties":{"message":{"type":"string","maxLength":2000,"minLength":0}},"required":["message"]},"Fonte":{"type":"object","properties":{"entryId":{"type":"integer","format":"int64"},"title":{"type":"string"},"score":{"type":"number","format":"double"}}},"Previa":{"type":"object","properties":{"intent":{"type":"string","enum":["GREETING","SMALLTALK","QUESTION","SPECIFIC_DATA","HUMAN_REQUEST","OFF_TOPIC"]},"reply":{"type":"string"},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Fonte"}},"prompt":{"type":"string"},"grounded":{"type":"boolean"},"wouldEscalate":{"type":"boolean"},"escalationReason":{"type":"string","enum":["EXPLICIT_REQUEST","LLM_SIGNAL","NOT_GROUNDED","SPECIFIC_DATA","AI_UNAVAILABLE","BOT_DISABLED","LOOP_GUARD","MEDIA_RECEIVED"]}}},"SubscriptionResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"stripeSubscriptionId":{"type":"string"},"stripeCustomerId":{"type":"string"},"planType":{"type":"string"},"billingInterval":{"type":"string","enum":["MONTHLY","YEARLY"]},"status":{"type":"string","enum":["ACTIVE","CANCELED","PAST_DUE","UNPAID","TRIALING","INCOMPLETE","INCOMPLETE_EXPIRED","EXPIRED"]},"currentPeriodStart":{"type":"string","format":"date-time"},"currentPeriodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"},"canceledAt":{"type":"string","format":"date-time"},"cancellationReason":{"type":"string"},"trialStart":{"type":"string","format":"date-time"},"trialEnd":{"type":"string","format":"date-time"},"isActive":{"type":"boolean"},"isOnTrial":{"type":"boolean"},"isExpiringSoon":{"type":"boolean"},"daysUntilRenewal":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"},"pendingPlanType":{"type":"string"},"pendingBillingInterval":{"type":"string"},"paymentMethod":{"type":"string"}}},"CreateCheckoutRequestDTO":{"type":"object","properties":{"planType":{"type":"string"},"billingInterval":{"type":"string","enum":["MONTHLY","YEARLY"]},"successUrl":{"type":"string"},"cancelUrl":{"type":"string"},"paymentMethod":{"type":"string","enum":["CARD","PIX","APPLE_PAY","GOOGLE_PAY"]}},"required":["cancelUrl","planType","successUrl"]},"CheckoutSessionResponseDTO":{"type":"object","properties":{"checkoutUrl":{"type":"string"},"sessionId":{"type":"string"}}},"ChangePlanRequestDTO":{"type":"object","properties":{"planType":{"type":"string"},"billingInterval":{"type":"string","enum":["MONTHLY","YEARLY"]}},"required":["billingInterval","planType"]},"FieldValueDTO":{"type":"object","properties":{"fieldId":{"type":"integer","format":"int64"},"value":{"type":"string","maxLength":500,"minLength":0}},"required":["fieldId"]},"SignDocumentRequestDTO":{"type":"object","properties":{"documentHash":{"type":"string","minLength":1},"geolocation":{"type":"string","maxLength":255,"minLength":0},"signatureImage":{"type":"string"},"signatureType":{"type":"string"},"signaturePage":{"type":"integer","format":"int32"},"signaturePosX":{"type":"number","format":"float"},"signaturePosY":{"type":"number","format":"float"},"signatureWidth":{"type":"number","format":"float"},"signatureHeight":{"type":"number","format":"float"},"refPageWidth":{"type":"number","format":"float"},"refPageHeight":{"type":"number","format":"float"},"cpf":{"type":"string"},"rg":{"type":"string","pattern":"^[0-9A-Za-z./ -]{4,20}$"},"selfieImage":{"type":"string"},"selfieSource":{"type":"string","pattern":"CAMERA|FILE"},"documentFrontImage":{"type":"string"},"documentBackImage":{"type":"string"},"documentSource":{"type":"string","pattern":"CAMERA|FILE"},"fieldValues":{"type":"array","items":{"$ref":"#/components/schemas/FieldValueDTO"},"maxItems":200,"minItems":0}},"required":["documentHash"]},"SignDocumentResponseDTO":{"type":"object","properties":{"message":{"type":"string"},"pendingSigners":{"type":"integer","format":"int64"},"declinedSigners":{"type":"integer","format":"int64"}}},"SignWithCertificateRequestDTO":{"type":"object","properties":{"documentHash":{"type":"string","maxLength":128,"minLength":0},"cmsSignatureBase64":{"type":"string","maxLength":100000,"minLength":0},"certificateChainBase64":{"type":"string","maxLength":50000,"minLength":0},"geolocation":{"type":"string","maxLength":100,"minLength":0}},"required":["certificateChainBase64","cmsSignatureBase64","documentHash"]},"MessageResponseDTO":{"type":"object","description":"Resposta generica com uma mensagem textual de confirmacao.","properties":{"message":{"type":"string","description":"Mensagem descritiva do resultado da operacao.","example":"Documento cancelado com sucesso"}}},"ConfirmSignerIdentityRequestDTO":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","maxLength":255,"minLength":0},"phone":{"type":"string"}},"required":["name"]},"DeclineSignatureRequestDTO":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"minLength":0}},"required":["reason"]},"VerifyAuthTokenRequestDTO":{"type":"object","properties":{"code":{"type":"string","minLength":1,"pattern":"\\d{6}"}},"required":["code"]},"ContactConfirmedResponseDTO":{"type":"object","properties":{"channel":{"type":"string","enum":["EMAIL","WHATSAPP"]}}},"SendContactCodeRequestDTO":{"type":"object","properties":{"channel":{"type":"string","enum":["EMAIL","WHATSAPP"]},"email":{"type":"string","maxLength":255,"minLength":0},"phone":{"type":"string","maxLength":30,"minLength":0}},"required":["channel"]},"ContactCodeSentResponseDTO":{"type":"object","properties":{"destination":{"type":"string"}}},"AuthCodeSentResponseDTO":{"type":"object","description":"Confirmação do envio do código de verificação ao signatário.","properties":{"channels":{"type":"array","description":"Canais pelos quais o código saiu, na ordem do envio. Canal que falhou fica de fora.","example":["EMAIL_CODE","WHATSAPP_CODE"],"items":{"type":"string","enum":["SCREEN_SIGNATURE","EMAIL_CODE","SMS_CODE","WHATSAPP_CODE","DIGITAL_CERTIFICATE","FACIAL_RECOGNITION","IDENTITY_VALIDATION","ICP_CERTIFICATE","CPF","RG","SELFIE_PHOTO","DOCUMENT_PHOTO"]}}}},"SubmitResponsesRequestDTO":{"type":"object","properties":{"responses":{"type":"object","additionalProperties":{"type":"string"}}}},"SubmitResponsesResponseDTO":{"type":"object","properties":{"instanceToken":{"type":"string"},"status":{"type":"string"},"signerAccessToken":{"type":"string"}}},"VerifyResetTokenRequest":{"type":"object","properties":{"token":{"type":"string","description":"Password reset token","example":"abc123...","minLength":1}},"required":["token"]},"PasswordResetResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Operation success status"},"message":{"type":"string","description":"Response message"}}},"ResetPasswordRequest":{"type":"object","properties":{"token":{"type":"string","description":"Password reset token","example":"abc123...","minLength":1},"newPassword":{"type":"string","description":"New password","example":"newPassword123!","maxLength":100,"minLength":6}},"required":["newPassword","token"]},"PasswordResetRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email to send password reset link","example":"user@example.com","minLength":1}},"required":["email"]},"CreateOrganizationRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"minLength":0},"maxMembers":{"type":"integer","format":"int32"}},"required":["name"]},"CreateCustomRoleRequestDTO":{"type":"object","properties":{"name":{"type":"string","minLength":1},"baseRole":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]},"permissionIds":{"type":"array","items":{"type":"integer","format":"int64"}}},"required":["baseRole","name"]},"InviteMemberRequestDTO":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]}},"required":["email","role"]},"OrganizationInvitationResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"role":{"type":"string","enum":["OWNER","ADMIN","MEMBER","VIEWER"]},"token":{"type":"string"},"status":{"type":"string","enum":["PENDING","ACCEPTED","EXPIRED","CANCELLED","DECLINED"]},"organizationName":{"type":"string"},"inviterName":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"CreateFolderRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0}},"required":["name"]},"CreateContactRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"minLength":0},"email":{"type":"string","format":"email","maxLength":180,"minLength":0},"phone":{"type":"string","maxLength":30,"minLength":0},"cpf":{"type":"string","maxLength":20,"minLength":0},"rg":{"type":"string","maxLength":20,"minLength":0},"favorite":{"type":"boolean"}},"required":["name"]},"ToggleFavoriteResponse":{"type":"object","properties":{"favorite":{"type":"boolean"}}},"CreateContactGroupRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":0}},"required":["name"]},"AddContactsToGroupRequest":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":200,"minItems":0}},"required":["contactIds"]},"MarkAllReadResponseDTO":{"type":"object","properties":{"marked":{"type":"integer","format":"int32"}}},"SendDocumentEmailRequestDTO":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}}},"SendDocumentEmailResponseDTO":{"type":"object","properties":{"documentsSent":{"type":"integer","format":"int32"},"emailsSent":{"type":"integer","format":"int32"}}},"CreatePrefilledDocumentRequestDTO":{"type":"object","properties":{"signerName":{"type":"string","minLength":1},"prefilledFields":{"type":"object","additionalProperties":{"type":"string"}},"tableFields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}},"required":["signerName"]},"PrefilledDocumentWithEnvelopeResponseDTO":{"type":"object","properties":{"instanceId":{"type":"string","format":"uuid"},"token":{"type":"string"},"signerName":{"type":"string"},"status":{"type":"string"},"envelopeId":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"ModelComplementaryDocResponseDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"modelId":{"type":"string","format":"uuid"},"name":{"type":"string"},"originalFilename":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"integer","format":"int64"},"dynamic":{"type":"boolean"},"displayOrder":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"}}},"BulkSendResponseDTO":{"type":"object","properties":{"documentsCreated":{"type":"integer","format":"int32"},"rowsProcessed":{"type":"integer","format":"int32"}}},"BundleSendFromModelsRequestDTO":{"type":"object","properties":{"modelIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":10,"minItems":0},"bundleTitle":{"type":"string","maxLength":255,"minLength":0},"signer":{"$ref":"#/components/schemas/SignerDTO"},"channel":{"type":"string","pattern":"WHATSAPP|EMAIL"},"prefilledFields":{"type":"object","additionalProperties":{"type":"string"}},"tableFields":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}}},"required":["modelIds","signer"]},"BundleSendResultDTO":{"type":"object","properties":{"type":{"type":"string"},"envelopeId":{"type":"integer","format":"int64"},"bundleId":{"type":"integer","format":"int64"},"envelopeIds":{"type":"array","items":{"type":"integer","format":"int64"}},"signingUrl":{"type":"string"},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/RecipientDTO"}}}},"RecipientDTO":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string"},"channel":{"type":"string"},"contactMasked":{"type":"string"}}},"LibraryTemplateResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"authorFirstName":{"type":"string"},"authorLastName":{"type":"string"},"authorEmail":{"type":"string"},"authorLink":{"type":"string"},"originalFilename":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"integer","format":"int64"},"status":{"type":"string"},"rejectionReason":{"type":"string"},"downloadCount":{"type":"integer","format":"int64"},"reviewedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"RejectLibraryTemplateRequestDTO":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"minLength":0}}},"PreviewDocFromTemplateRequestDTO":{"type":"object","description":"Payload para pre-visualizar o documento que um template geraria, sem criar nada.","properties":{"templateId":{"type":"string","description":"UUID do template (model). Obtido em GET /v1/models.","example":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f","minLength":1},"templateVariables":{"type":"object","additionalProperties":{"type":"string"},"description":"Mesmo mapa do create-from-template: chave->valor dos placeholders {{chave}}. Placeholders nao informados ficam vazios.","example":{"cliente_nome":"Maria Silva"}}},"required":["templateId"]},"CreateDocFromTemplateRequestDTO":{"type":"object","description":"Payload para gerar um documento a partir de um template e enviar para um signatario. Use externalId para idempotencia (retries com o mesmo valor retornam o documento ja criado).","properties":{"templateId":{"type":"string","description":"UUID do template (model) previamente cadastrado. Obtido em GET /v1/models.","example":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f"},"signerName":{"type":"string","description":"Nome completo do signatario.","example":"Maria Silva","minLength":1},"signerEmail":{"type":"string","description":"Email do signatario (para envio de notificacao). Opcional.","example":"maria@exemplo.com"},"signerPhoneCountry":{"type":"string","description":"DDI do telefone, sem o '+' (ex: 55 para Brasil). Opcional.","example":"55"},"signerPhoneNumber":{"type":"string","description":"Telefone do signatario, apenas digitos e sem o DDI. Opcional.","example":"11987654321"},"externalId":{"type":"string","description":"Seu identificador externo, usado para idempotencia e correlacao com webhooks. Opcional.","example":"pedido-42"},"sendAutomaticEmail":{"type":"boolean","description":"Aceito no schema, mas NAO aplicado por este endpoint hoje. Para controlar envio automatico use o endpoint compativel /api/v1/models/create-doc/."},"templateVariables":{"type":"object","additionalProperties":{"type":"string"},"description":"Mapa chave->valor que preenche os placeholders {{chave}} do template. A chave corresponde a fields[].name do template. Placeholders nao informados ficam vazios.","example":{"cliente_nome":"Maria Silva","valor":"R$ 1.200,00"}},"folderPath":{"type":"string","description":"Aceito no schema, mas NAO aplicado por este endpoint hoje. Para controlar a pasta de destino use o endpoint compativel /api/v1/models/create-doc/."}},"required":["signerName","templateId"]},"BundleSignerDTO":{"type":"object","description":"Dados do signatario do bundle.","properties":{"name":{"type":"string","description":"Nome completo do signatario.","example":"Maria Silva","minLength":1},"email":{"type":"string","description":"Email do signatario. Usado para envio de notificacao.","example":"maria@exemplo.com"},"phoneCountry":{"type":"string","description":"Codigo do pais no formato ISO (sem '+'). Default: 55 (Brasil).","example":"55"},"phoneNumber":{"type":"string","description":"Numero do telefone (apenas digitos, sem codigo do pais).","example":"11987654321"}},"required":["name"]},"BundleTemplateDTO":{"type":"object","description":"Template individual do bundle com suas proprias variaveis.","properties":{"templateId":{"type":"string","description":"UUID do modelo (template) previamente cadastrado.","minLength":1},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Variaveis para substituir placeholders neste template especifico. Placeholders nao referenciados sao mantidos vazios."}},"required":["templateId"]},"CreateBundleFromTemplatesRequestDTO":{"type":"object","description":"Payload para criar um bundle (pacote) de assinaturas a partir de N templates. Todos os signatarios informados assinam TODOS os documentos do bundle. Use externalId para garantir idempotencia em caso de retries.","properties":{"templates":{"type":"array","description":"Lista ordenada de templates. A ordem informada sera preservada na apresentacao dos documentos ao signatario.","items":{"$ref":"#/components/schemas/BundleTemplateDTO"},"maxItems":20,"minItems":1},"bundleTitle":{"type":"string","description":"Titulo do bundle. Se omitido, sera gerado automaticamente como 'Pacote de N documentos'.","example":"Pacote de cadastro Coopluz"},"signers":{"type":"array","description":"Lista de signatarios. Cada signatario assina todos os documentos do bundle.","items":{"$ref":"#/components/schemas/BundleSignerDTO"},"maxItems":10,"minItems":1},"externalId":{"type":"string","description":"Identificador externo unico para idempotencia. Se repetido para o mesmo owner, retorna o bundle ja criado em vez de duplicar.","example":"enrollment-42-bundle"},"sendImmediately":{"type":"boolean","default":true,"description":"Se true (default), envia o bundle imediatamente apos criacao (dispara emails/whatsapp). Se false, o bundle fica em DRAFT para ser enviado depois."}},"required":["signers","templates"]},"EnvelopeDTO":{"type":"object","properties":{"envelopeId":{"type":"integer","format":"int64"},"envelopeToken":{"type":"string"},"sortOrder":{"type":"integer","format":"int32"}}},"IntegrationBundleResponseDTO":{"type":"object","properties":{"bundleId":{"type":"integer","format":"int64"},"externalId":{"type":"string"},"status":{"type":"string"},"envelopes":{"type":"array","items":{"$ref":"#/components/schemas/EnvelopeDTO"}},"signers":{"type":"array","items":{"$ref":"#/components/schemas/SignerDTO"}}}},"FeedbackRequestDTO":{"type":"object","properties":{"type":{"type":"string","enum":["SUGGESTION","BUG"]},"message":{"type":"string","maxLength":4000,"minLength":0},"step":{"type":"string","maxLength":500,"minLength":0},"pageUrl":{"type":"string","maxLength":500,"minLength":0},"appVersion":{"type":"string","maxLength":50,"minLength":0}},"required":["message","type"]},"CreateEnvelopeRequestDTO":{"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"title":{"type":"string","maxLength":255,"minLength":0},"message":{"type":"string","maxLength":1000,"minLength":0},"expiresAt":{"type":"string","format":"date-time"},"signOrder":{"type":"string","enum":["SEQUENTIAL","PARALLEL"]},"organizationId":{"type":"integer","format":"int64"},"folderId":{"type":"string","format":"uuid"}},"required":["documentId","title"]},"AddSignerRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"minLength":2},"email":{"type":"string","format":"email"},"phone":{"type":"string","pattern":"^\\+?[1-9]\\d{1,14}$"},"role":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"signOrder":{"type":"integer","format":"int32","minimum":1},"authMethods":{"type":"array","items":{"type":"string","enum":["SCREEN_SIGNATURE","EMAIL_CODE","SMS_CODE","WHATSAPP_CODE","DIGITAL_CERTIFICATE","FACIAL_RECOGNITION","IDENTITY_VALIDATION","ICP_CERTIFICATE","CPF","RG","SELFIE_PHOTO","DOCUMENT_PHOTO"]}},"lockedFields":{"type":"array","items":{"type":"string","enum":["NAME","EMAIL","PHONE"]}},"locale":{"type":"string","pattern":"pt-BR|en-US"}},"required":["name","role"]},"WhatsAppSentResponseDTO":{"type":"object","description":"Resultado do reenvio do link de assinatura por WhatsApp.","properties":{"message":{"type":"string","description":"Mensagem descritiva do resultado da operacao.","example":"Mensagem WhatsApp enviada com sucesso"},"cooldownSeconds":{"type":"integer","format":"int64","description":"Segundos ate' um novo reenvio ao mesmo signatario ser aceito.","example":120}}},"RemindRequestDTO":{"type":"object","properties":{"signerId":{"type":"integer","format":"int64"}}},"ReminderSentResponseDTO":{"type":"object","description":"Resultado do lembrete por e-mail ao signatario.","properties":{"message":{"type":"string","description":"Mensagem descritiva do resultado da operacao.","example":"Lembretes enviados com sucesso"},"cooldownSeconds":{"type":"integer","format":"int64","description":"Segundos ate' um novo lembrete ao mesmo signatario ser aceito.","example":300},"sentCount":{"type":"integer","format":"int32","description":"Quantos e-mails de lembrete sairam. Sem ninguem elegivel a resposta e' 400.","example":2}}},"OwnerSignResponseDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"signerId":{"type":"integer","format":"int64"}}},"AddFieldRequestDTO":{"type":"object","properties":{"signerId":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["SIGNATURE","INITIALS","TEXT","DATE","CHECKBOX"]},"page":{"type":"integer","format":"int32","minimum":1},"posX":{"type":"number","format":"double","minimum":0},"posY":{"type":"number","format":"double","minimum":0},"width":{"type":"number","format":"double","minimum":1},"height":{"type":"number","format":"double","minimum":1},"required":{"type":"boolean"},"placeholder":{"type":"string","maxLength":255,"minLength":0},"refPageWidth":{"type":"number","format":"double"},"refPageHeight":{"type":"number","format":"double"}},"required":["height","page","posX","posY","signerId","type","width"]},"ConfigureAndSendEnvelopeRequestDTO":{"type":"object","properties":{"signerEmail":{"type":"string"},"signerPhone":{"type":"string"},"channel":{"type":"string","minLength":1},"customMessage":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"allowRefuse":{"type":"boolean"},"autoReminder":{"type":"boolean"},"reminderIntervalDays":{"type":"integer","format":"int32","maximum":30,"minimum":1},"sendSignedViaWhatsapp":{"type":"boolean"}},"required":["channel"]},"EnvelopeIdsRequestDTO":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"integer","format":"int64"}}}},"TrashOperationResponseDTO":{"type":"object","properties":{"affected":{"type":"integer","format":"int32"}}},"BatchSignItemDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"documentHash":{"type":"string"}}},"BatchSignRequestDTO":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BatchSignItemDTO"},"minItems":1},"signatureImage":{"type":"string"},"signatureType":{"type":"string"},"geolocation":{"type":"string","maxLength":255,"minLength":0},"signaturePage":{"type":"integer","format":"int32"},"signaturePosX":{"type":"number","format":"float"},"signaturePosY":{"type":"number","format":"float"},"signatureWidth":{"type":"number","format":"float"},"signatureHeight":{"type":"number","format":"float"},"refPageWidth":{"type":"number","format":"float"},"refPageHeight":{"type":"number","format":"float"}},"required":["items"]},"BatchSignResponseDTO":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchSignResultDTO"}},"totalSuccess":{"type":"integer","format":"int32"},"totalFailed":{"type":"integer","format":"int32"}}},"BatchSignResultDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"string"}}},"DocumentResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"ownerId":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"originalFilename":{"type":"string"},"contentType":{"type":"string"},"fileSize":{"type":"integer","format":"int64"},"status":{"type":"string","enum":["DRAFT","PENDING_SIGNATURES","COMPLETED","CANCELED"]},"documentHash":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"folderId":{"type":"string","format":"uuid"}}},"ContactSalesRequestDTO":{"type":"object","properties":{"fullName":{"type":"string","maxLength":150,"minLength":0},"companyName":{"type":"string","maxLength":150,"minLength":0},"email":{"type":"string","format":"email","maxLength":254,"minLength":0},"phone":{"type":"string","maxLength":30,"minLength":0},"docsPerMonth":{"type":"string","maxLength":50,"minLength":0},"contactPreference":{"type":"string","maxLength":100,"minLength":0},"message":{"type":"string","maxLength":2000,"minLength":0},"website":{"type":"string","maxLength":500,"minLength":0},"source":{"type":"string","maxLength":20,"minLength":0}},"required":["companyName","docsPerMonth","email","fullName","phone"]},"CreateBundleRequestDTO":{"type":"object","properties":{"title":{"type":"string","maxLength":255,"minLength":0},"envelopeIds":{"type":"array","items":{"type":"integer","format":"int64"},"minItems":1},"signers":{"type":"array","items":{"$ref":"#/components/schemas/BundleSignerDTO"},"minItems":1},"organizationId":{"type":"integer","format":"int64"}},"required":["envelopeIds","signers","title"]},"BundleResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"ownerId":{"type":"integer","format":"int64"},"organizationId":{"type":"integer","format":"int64"},"title":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"envelopeCount":{"type":"integer","format":"int32"},"signerCount":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AddBundleSignerRequestDTO":{"type":"object","properties":{"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email"},"phone":{"type":"string"}},"required":["name"]},"RefreshResponseDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"}}},"MobileRefreshRequestDTO":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"]},"MobileRefreshResponseDTO":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"}}},"MobileOAuth2RequestDTO":{"type":"object","properties":{"idToken":{"type":"string","minLength":1},"deviceId":{"type":"string"}},"required":["idToken"]},"MobileLoginResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"name":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"},"isNewUser":{"type":"boolean"},"twoFactorRequired":{"type":"boolean"},"twoFactorPurpose":{"type":"string","enum":["VERIFY","SETUP"]},"twoFactorChallenge":{"type":"string"}}},"LoginRequestDTO":{"type":"object","properties":{"login":{"type":"string","format":"email","minLength":1},"password":{"type":"string","minLength":1}},"required":["login","password"]},"TwoFactorLoginRequestDTO":{"type":"object","properties":{"code":{"type":"string","maxLength":32,"minLength":0},"challengeToken":{"type":"string","maxLength":128,"minLength":0}},"required":["code"]},"LoginResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"accessToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"},"twoFactorRequired":{"type":"boolean"},"twoFactorPurpose":{"type":"string","enum":["VERIFY","SETUP"]}}},"TwoFactorSetupLoginResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"accessToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int32"},"recoveryCodes":{"type":"array","items":{"type":"string"}}}},"GoogleOneTapLoginRequestDTO":{"type":"object","properties":{"credential":{"type":"string","maxLength":8192,"minLength":0},"attribution":{"$ref":"#/components/schemas/AttributionRequestDTO"}},"required":["credential"]},"GoogleOneTapLoginResponseDTO":{"type":"object","properties":{"contaCriadaAgora":{"type":"boolean"},"twoFactorRequired":{"type":"boolean"},"twoFactorPurpose":{"type":"string","enum":["VERIFY","SETUP"]}}},"ApiAuthRequestDTO":{"type":"object","description":"Credenciais de login (email + senha) para obter um par de tokens JWT de acesso e refresh.","properties":{"email":{"type":"string","format":"email","description":"Email da conta cadastrada no TapSign.","example":"voce@empresa.com","maxLength":254,"minLength":0},"password":{"type":"string","description":"Senha da conta (entre 8 e 72 caracteres).","example":"minhaSenhaForte123","maxLength":72,"minLength":8}},"required":["email","password"]},"ApiRefreshRequestDTO":{"type":"object","description":"Payload para renovar o token de acesso usando um refresh token valido.","properties":{"refresh":{"type":"string","description":"Refresh token obtido em POST /v1/auth/api/token. Troca-o por um novo access token sem reenviar email/senha.","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","maxLength":512,"minLength":0}},"required":["refresh"]},"CreateApiKeyRequestDTO":{"type":"object","description":"Payload para criar uma nova API key. O nome serve apenas para voce identificar a chave depois.","properties":{"name":{"type":"string","description":"Nome/rotulo para identificar a chave (ex: o sistema que vai usa-la).","example":"Integracao Sistema X","maxLength":100,"minLength":0}},"required":["name"]},"WhatsAppTestRequestDTO":{"type":"object","properties":{"phone":{"type":"string","maxLength":20,"minLength":10},"message":{"type":"string","maxLength":500,"minLength":0}},"required":["message","phone"]},"WhatsAppTestResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"messageId":{"type":"string"},"providerUsed":{"type":"string"}}},"WhatsAppTemplateTestRequestDTO":{"type":"object","properties":{"phone":{"type":"string","minLength":1},"templateName":{"type":"string","minLength":1},"languageCode":{"type":"string"},"bodyParams":{"type":"array","items":{"type":"string"}},"urlButtonParam":{"type":"string"}},"required":["phone","templateName"]},"WhatsAppTemplateTestResponseDTO":{"type":"object","properties":{"success":{"type":"boolean"},"providerMessageId":{"type":"string"},"errorMessage":{"type":"string"}}},"TestNotificationRequestDTO":{"type":"object","properties":{"type":{"type":"string","enum":["ENVELOPE_COMPLETED","SIGNATURE_DECLINED","SIGNER_EMAIL_BOUNCED","PAYMENT_SUCCEEDED","SUBSCRIPTION_RENEWAL_REMINDER","ORGANIZATION_INVITATION","SUPPORT_NEW_INBOUND_MESSAGE","SUPPORT_AGENT_NEW_MESSAGE","NEW_LOGIN_DETECTED","ADMIN_TEST"]},"userId":{"type":"integer","format":"int64"}},"required":["type","userId"]},"PreviewEmailRequestDTO":{"type":"object","properties":{"subject":{"type":"string","maxLength":255,"minLength":0},"bodyHtml":{"type":"string","maxLength":200000,"minLength":0},"vars":{"type":"object","additionalProperties":{"type":"string"}},"includeSignature":{"type":"boolean"},"includeUnsubscribe":{"type":"boolean"},"varsWithinLimits":{"type":"boolean"}},"required":["bodyHtml","subject"]},"PreviewResponseDTO":{"type":"object","properties":{"subject":{"type":"string"},"html":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}}}},"AddSuppressionRequestDTO":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1}},"required":["email"]},"SignatureResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"html":{"type":"string"},"isDefault":{"type":"boolean"},"hasImage":{"type":"boolean"},"imageUrl":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"personName":{"type":"string"},"roleTitle":{"type":"string"},"phone":{"type":"string"},"showPersonName":{"type":"boolean"},"showRoleTitle":{"type":"boolean"},"showPhone":{"type":"boolean"},"renderedHtml":{"type":"string"}}},"SignatureImageResponseDTO":{"type":"object","properties":{"url":{"type":"string"}}},"CreateSenderRequestDTO":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"displayName":{"type":"string","maxLength":100,"minLength":0,"pattern":"[^\\r\\n]*"}},"required":["displayName","email"]},"SenderResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"displayName":{"type":"string"},"isDefault":{"type":"boolean"}}},"AddReengagementExclusionRequestDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"reason":{"type":"string","maxLength":200,"minLength":0}},"required":["userId"]},"ReengagementExclusionResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"userName":{"type":"string"},"userEmail":{"type":"string"},"reason":{"type":"string"},"createdByName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"SendMarketingMessageRequestDTO":{"type":"object","properties":{"senderId":{"type":"integer","format":"int64"},"senderEmail":{"type":"string","format":"email"},"senderName":{"type":"string","maxLength":100,"minLength":0,"pattern":"[^\\r\\n]*"},"toEmail":{"type":"string","format":"email","minLength":1},"subject":{"type":"string","maxLength":255,"minLength":0,"pattern":"[^\\r\\n]*"},"bodyHtml":{"type":"string","maxLength":200000,"minLength":0},"vars":{"type":"object","additionalProperties":{"type":"string"}},"includeUnsubscribe":{"type":"boolean"},"includeSignature":{"type":"boolean"},"varsWithinLimits":{"type":"boolean"}},"required":["bodyHtml","subject","toEmail"]},"MarketingMessageResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"toEmail":{"type":"string"},"senderEmail":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string"},"sesMessageId":{"type":"string"},"error":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"openedAt":{"type":"string","format":"date-time"}}},"CreateCampaignRequestDTO":{"type":"object","properties":{"name":{"type":"string","maxLength":150,"minLength":0,"pattern":"[^\\r\\n]*"},"subject":{"type":"string","maxLength":255,"minLength":0,"pattern":"[^\\r\\n]*"},"bodyHtml":{"type":"string","maxLength":200000,"minLength":0},"senderId":{"type":"integer","format":"int64"},"senderEmail":{"type":"string","format":"email"},"senderName":{"type":"string","maxLength":100,"minLength":0,"pattern":"[^\\r\\n]*"},"includeUnsubscribe":{"type":"boolean"},"includeSignature":{"type":"boolean"},"ratePerMinute":{"type":"integer","format":"int32","maximum":60,"minimum":1},"serviceNotice":{"type":"boolean"}},"required":["bodyHtml","name","subject"]},"CampaignResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"subject":{"type":"string"},"bodyHtml":{"type":"string"},"senderId":{"type":"integer","format":"int64"},"senderEmail":{"type":"string"},"senderName":{"type":"string"},"includeUnsubscribe":{"type":"boolean"},"includeSignature":{"type":"boolean"},"status":{"type":"string"},"ratePerMinute":{"type":"integer","format":"int32"},"killSwitchTriggered":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"scheduledAt":{"type":"string","format":"date-time"},"serviceNotice":{"type":"boolean"},"total":{"type":"integer","format":"int64"},"pending":{"type":"integer","format":"int64"},"sent":{"type":"integer","format":"int64"},"suppressed":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"}}},"CampaignTestEmailRequestDTO":{"type":"object","properties":{"toEmail":{"type":"string","format":"email","minLength":1}},"required":["toEmail"]},"ScheduleCampaignRequestDTO":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"}},"required":["scheduledAt"]},"CampaignImportResponseDTO":{"type":"object","properties":{"imported":{"type":"integer","format":"int32"},"suppressed":{"type":"integer","format":"int32"},"invalid":{"type":"integer","format":"int32"},"duplicated":{"type":"integer","format":"int32"},"missingColumns":{"type":"array","items":{"type":"string"}}}},"SendTestEmailRequestDTO":{"type":"object","properties":{"template":{"type":"string","enum":["EMAIL_VERIFICATION","PASSWORD_RESET","SIGNATURE_REQUEST","SIGNATURE_REMINDER","ENVELOPE_COMPLETED","SIGNATURE_DECLINED","MODEL_DOCUMENT_REQUEST","CONTACT_SALES","SUPPORT_REQUEST","ENVELOPE_REVIEW_HELD","LIBRARY_SUBMISSION_RECEIVED","LIBRARY_TEMPLATE_APPROVED","ORGANIZATION_INVITATION_EXISTING_USER","ORGANIZATION_INVITATION_NEW_USER","NEW_LOGIN_DETECTED","TWO_FACTOR_ENABLED","TWO_FACTOR_DISABLED","RECOVERY_CODE_USED","TWO_FACTOR_LOCKED","PAYMENT_SUCCEEDED","CHECKOUT_LINK","BUNDLE_SIGNATURE_REQUEST","BUNDLE_COMPLETED","SIGNER_AUTH_TOKEN","SIGNER_ENVELOPE_COMPLETED","PASSWORD_SETUP_OTP","SIGNUP_OTP","OBSERVER_SIGNATURE","OBSERVER_COMPLETED","OBSERVER_BUNDLE_COMPLETED","SIGNATURE_REQUEST_EN","SIGNATURE_REMINDER_EN","SIGNER_AUTH_TOKEN_EN","SIGNER_ENVELOPE_COMPLETED_EN"]},"recipient":{"type":"string","format":"email"},"params":{"type":"object","additionalProperties":{}}},"required":["recipient","template"]},"TestEmailResponseDTO":{"type":"object","properties":{"template":{"type":"string"},"recipient":{"type":"string"},"subject":{"type":"string"},"providerName":{"type":"string"},"messageId":{"type":"string"},"mergedParams":{"type":"object","additionalProperties":{}}}},"AdminCheckoutRequestDTO":{"type":"object","properties":{"email":{"type":"string","minLength":1},"planType":{"type":"string","minLength":1},"billingInterval":{"type":"string","enum":["MONTHLY","YEARLY"]}},"required":["email","planType"]},"ProviderRequest":{"type":"object","properties":{"code":{"type":"string","maxLength":40,"minLength":0},"displayName":{"type":"string","maxLength":80,"minLength":0},"kind":{"type":"string","enum":["OPENAI_COMPATIBLE","GEMINI"]},"baseUrl":{"type":"string","maxLength":255,"minLength":0},"apiKey":{"type":"string"},"enabled":{"type":"boolean"},"notes":{"type":"string","maxLength":500,"minLength":0}},"required":["baseUrl","code","displayName","enabled","kind"]},"ProviderTestRequest":{"type":"object","properties":{"providerCode":{"type":"string","minLength":1},"model":{"type":"string","maxLength":80,"minLength":0}},"required":["model","providerCode"]},"ProviderTestResponse":{"type":"object","properties":{"success":{"type":"boolean"},"reply":{"type":"string"},"totalTokens":{"type":"integer","format":"int32"},"error":{"type":"string"}}},"CompatCreateDocRequest":{"type":"object","description":"Payload no formato da Compatibility API para criar um documento a partir de um template. Diferenca-chave vs. o endpoint nativo: as variaveis vao no array `data[]` no formato {de, para}. Ideal para quem migra de outra plataforma sem reescrever o cliente.","properties":{"template_id":{"type":"string","description":"UUID do template (model). Obtido em GET /v1/models.","example":"9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f","minLength":1},"signer_name":{"type":"string","description":"Nome completo do signatario.","example":"Maria Silva","minLength":1},"signer_email":{"type":"string","description":"Email do signatario (para notificacao).","example":"maria@exemplo.com"},"signer_phone_country":{"type":"string","description":"DDI do telefone, sem o '+' (ex: 55).","example":"55"},"signer_phone_number":{"type":"string","description":"Telefone do signatario, apenas digitos e sem DDI.","example":"11987654321"},"external_id":{"type":"string","description":"Seu identificador externo (idempotencia + correlacao com webhooks).","example":"pedido-42"},"send_automatic_whatsapp":{"type":"boolean","description":"Se true, dispara notificacao automatica por WhatsApp ao signatario.","example":true},"lang":{"type":"string","description":"Idioma do documento/notificacoes.","example":"pt-BR"},"disable_signer_emails":{"type":"boolean","description":"Se true, suprime o envio de emails de notificacao aos signatarios.","example":false},"folder_path":{"type":"string","description":"Caminho/pasta de destino do documento.","example":"/Contratos/2026"},"data":{"type":"array","description":"Variaveis para preencher os placeholders do template, no formato {de, para} (padrao da Compatibility API).","items":{"$ref":"#/components/schemas/TemplateVariable"}},"created_by":{"$ref":"#/components/schemas/CreatedBy","description":"Dados de quem criou o documento (opcional)."},"owner_sign":{"type":"boolean","description":"Se true, o dono da conta tambem assina o documento.","example":false},"owner_email":{"type":"string","description":"Email do dono que assina, quando owner_sign=true.","example":"dono@empresa.com"}},"required":["signer_name","template_id"]},"CreatedBy":{"type":"object","description":"Identificacao de quem cria o documento.","properties":{"email":{"type":"string","description":"Email do criador.","example":"operador@empresa.com"}}},"TemplateVariable":{"type":"object","description":"Substituicao de um placeholder do template: `de` = nome do placeholder, `para` = valor que entra no documento.","properties":{"de":{"type":"string","description":"Nome do placeholder no template (sem as chaves {{ }}).","example":"cliente_nome"},"para":{"type":"string","description":"Valor que substitui o placeholder no documento.","example":"Maria Silva"}}},"UserPutPasswordRequestDTO":{"type":"object","properties":{"currentPassword":{"type":"string"},"password":{"type":"string","maxLength":100,"minLength":8}},"required":["password"]},"UserUpdateLimitsDTO":{"type":"object","properties":{"maxAccounts":{"type":"integer","format":"int32","maximum":100,"minimum":1},"maxTransactionsPerMonth":{"type":"integer","format":"int32","maximum":10000,"minimum":1},"maxCategoriesPerAccount":{"type":"integer","format":"int32","maximum":100,"minimum":1}}},"UserGrantLifetimeProDTO":{"type":"object","properties":{"reason":{"type":"string"}}},"UserUpdateFeaturesDTO":{"type":"object","properties":{"canCreateBudgets":{"type":"boolean"},"canExportData":{"type":"boolean"},"canUseReports":{"type":"boolean"},"canUseGoals":{"type":"boolean"}}},"UserUpdateAccessModeDTO":{"type":"object","properties":{"accessMode":{"type":"string","enum":["READ_WRITE","READ_ONLY","DISABLED"]}},"required":["accessMode"]},"CancelSubscriptionRequestDTO":{"type":"object","properties":{"reason":{"type":"string"},"immediately":{"type":"boolean"}},"required":["immediately"]},"UpdateYearlyDiscountRequestDTO":{"type":"object","properties":{"discountPercent":{"type":"integer","format":"int32","maximum":99,"minimum":0}},"required":["discountPercent"]},"PlanTierResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"maxSignatures":{"type":"integer","format":"int32"},"maxEnvelopes":{"type":"integer","format":"int32"},"maxTemplates":{"type":"integer","format":"int32"},"priceMonthly":{"type":"number"},"priceYearly":{"type":"number"},"features":{"type":"object","additionalProperties":{}},"highlighted":{"type":"boolean"},"discountYearlyPercent":{"type":"integer","format":"int32"}}},"MoveModelToOrganizationRequestDTO":{"type":"object","properties":{"organizationId":{"type":"integer","format":"int64"}},"required":["organizationId"]},"RenameModelRequestDTO":{"type":"object","properties":{"name":{"type":"string"}}},"ConfigureLoopGroupRequestDTO":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/LoopGroupDTO"}}}},"LoopGroupDTO":{"type":"object","properties":{"name":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}},"MoveToFolderRequestDTO":{"type":"object","properties":{"folderId":{"type":"string"}}},"PageWebhookLogResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/WebhookLogResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageableObject":{"type":"object","properties":{"offset":{"type":"integer","format":"int64"},"sort":{"$ref":"#/components/schemas/SortObject"},"paged":{"type":"boolean"},"pageNumber":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"unpaged":{"type":"boolean"}}},"SortObject":{"type":"object","properties":{"empty":{"type":"boolean"},"sorted":{"type":"boolean"},"unsorted":{"type":"boolean"}}},"WebhookStatsResponseDTO":{"type":"object","properties":{"totalDeliveries":{"type":"integer","format":"int64"},"successCount":{"type":"integer","format":"int64"},"failedCount":{"type":"integer","format":"int64"},"deadLetterCount":{"type":"integer","format":"int64"},"successRate":{"type":"number","format":"double"},"lastDeliveryAt":{"type":"string","format":"date-time"},"lastSuccessAt":{"type":"string","format":"date-time"},"lastFailureAt":{"type":"string","format":"date-time"}}},"VersionResponseDTO":{"type":"object","properties":{"version":{"type":"string"}}},"VerificationResponseDTO":{"type":"object","properties":{"envelopeUuid":{"type":"string"},"envelopeTitle":{"type":"string"},"envelopeStatus":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"documentTitle":{"type":"string"},"documentHash":{"type":"string"},"documentStatus":{"type":"string","enum":["DRAFT","PENDING_SIGNATURES","COMPLETED","CANCELED"]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"signers":{"type":"array","items":{"$ref":"#/components/schemas/VerificationSignerDTO"}},"hashVerified":{"type":"boolean"}}},"VerificationSignerDTO":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"status":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"signedAt":{"type":"string","format":"date-time"}}},"UserListFilterRequestDTO":{"type":"object","properties":{"keyword":{"type":"string"},"plan":{"type":"string"},"admin":{"type":"string"},"active":{"type":"string"},"source":{"type":"string"},"createdFrom":{"type":"string"},"createdTo":{"type":"string"},"lastAccessFrom":{"type":"string"},"lastAccessTo":{"type":"string"},"neverAccessed":{"type":"string"}}},"Pageable":{"type":"object","properties":{"page":{"type":"integer","format":"int32","minimum":0},"size":{"type":"integer","format":"int32","minimum":1},"sort":{"type":"array","items":{"type":"string"}}}},"PageUserResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/UserResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"TwoFactorStatusResponseDTO":{"type":"object","properties":{"enabled":{"type":"boolean"},"requiredByOrganization":{"type":"boolean"},"remainingRecoveryCodes":{"type":"integer","format":"int64"}}},"Count":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","format":"int64"}}},"UserFilterOptionsResponseDTO":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/Count"}},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Count"}}}},"UserSignatureImageResponseDTO":{"type":"object","properties":{"dataUrl":{"type":"string"}}},"SupportDeflectionStatsResponseDTO":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"totalConversations":{"type":"integer","format":"int64"},"escalatedCount":{"type":"integer","format":"int64"},"deflectedCount":{"type":"integer","format":"int64"},"closedCount":{"type":"integer","format":"int64"},"openCount":{"type":"integer","format":"int64"},"deflectionRate":{"type":"number","format":"double"},"kbGapCount":{"type":"integer","format":"int64"},"byEscalationReason":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}}},"ConversationSummaryResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"contactPhone":{"type":"string"},"contactName":{"type":"string"},"contactType":{"type":"string"},"contactEmail":{"type":"string"},"contactUserId":{"type":"integer","format":"int64"},"state":{"type":"string","enum":["BOT","WITH_AGENT","CLOSED"]},"waiting":{"type":"boolean"},"assignedAgentUserId":{"type":"integer","format":"int64"},"assignedAgentName":{"type":"string"},"escalationReason":{"type":"string","enum":["EXPLICIT_REQUEST","LLM_SIGNAL","NOT_GROUNDED","SPECIFIC_DATA","AI_UNAVAILABLE","BOT_DISABLED","LOOP_GUARD","MEDIA_RECEIVED"]},"lastMessagePreview":{"type":"string"},"lastMessageAt":{"type":"string","format":"date-time"},"lastMessageAuthor":{"type":"string"},"lastInboundAt":{"type":"string","format":"date-time"},"windowExpiresAt":{"type":"string","format":"date-time"},"waitingSeconds":{"type":"integer","format":"int64"},"closedAt":{"type":"string","format":"date-time"},"closedByName":{"type":"string"}}},"PageConversationSummaryResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ConversationSummaryResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"CandidateDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"}}},"ContactIdentityResponseDTO":{"type":"object","properties":{"type":{"type":"string"},"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/CandidateDTO"}}}},"ConversationThreadResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"contactPhone":{"type":"string"},"contactName":{"type":"string"},"contactType":{"type":"string"},"contactEmail":{"type":"string"},"contactUserId":{"type":"integer","format":"int64"},"state":{"type":"string","enum":["BOT","WITH_AGENT","CLOSED"]},"waiting":{"type":"boolean"},"assignedAgentUserId":{"type":"integer","format":"int64"},"assignedAgentName":{"type":"string"},"escalationReason":{"type":"string","enum":["EXPLICIT_REQUEST","LLM_SIGNAL","NOT_GROUNDED","SPECIFIC_DATA","AI_UNAVAILABLE","BOT_DISABLED","LOOP_GUARD","MEDIA_RECEIVED"]},"escalatedAt":{"type":"string","format":"date-time"},"lastMessagePreview":{"type":"string"},"lastMessageAt":{"type":"string","format":"date-time"},"lastMessageAuthor":{"type":"string"},"lastInboundAt":{"type":"string","format":"date-time"},"windowExpiresAt":{"type":"string","format":"date-time"},"waitingSeconds":{"type":"integer","format":"int64"},"closedAt":{"type":"string","format":"date-time"},"closedByName":{"type":"string"},"closeReason":{"type":"string"},"canReopen":{"type":"boolean"},"contactCandidatesCount":{"type":"integer","format":"int32"},"identity":{"$ref":"#/components/schemas/ContactIdentityResponseDTO"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessageResponseDTO"}},"templates":{"type":"array","items":{"$ref":"#/components/schemas/TemplateDTO"}}}},"TemplateDTO":{"type":"object","properties":{"sentAt":{"type":"string","format":"date-time"},"templateName":{"type":"string"},"label":{"type":"string"},"preview":{"type":"string"},"deliveryStatus":{"type":"string","enum":["PENDING","SENT","DELIVERED","READ","FAILED"]}}},"ContactCandidateResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"type":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"ConversationCountsResponseDTO":{"type":"object","properties":{"waiting":{"type":"integer","format":"int64"},"mine":{"type":"integer","format":"int64"},"withAgent":{"type":"integer","format":"int64"},"bot":{"type":"integer","format":"int64"}}},"BusinessHoursConfigResponseDTO":{"type":"object","properties":{"enforcementEnabled":{"type":"boolean"},"closedMessage":{"type":"string"},"openNow":{"type":"boolean"},"days":{"type":"array","items":{"$ref":"#/components/schemas/BusinessHoursDayDTO"}},"exceptions":{"type":"array","items":{"$ref":"#/components/schemas/BusinessHoursExceptionDTO"}}}},"BotStatusResponse":{"type":"object","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string"},"outboundEnabled":{"type":"boolean"}}},"StripeConfigResponseDTO":{"type":"object","properties":{"publicKey":{"type":"string"},"environment":{"type":"string"}}},"ExistingSignaturePosition":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"posX":{"type":"number","format":"float"},"posY":{"type":"number","format":"float"},"width":{"type":"number","format":"float"},"height":{"type":"number","format":"float"},"signerName":{"type":"string"}}},"PreConfiguredPositionDTO":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"posX":{"type":"number","format":"float"},"posY":{"type":"number","format":"float"},"width":{"type":"number","format":"float"},"height":{"type":"number","format":"float"}}},"SignerFieldDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["SIGNATURE","INITIALS","TEXT","DATE","CHECKBOX"]},"page":{"type":"integer","format":"int32"},"posX":{"type":"number","format":"double"},"posY":{"type":"number","format":"double"},"width":{"type":"number","format":"double"},"height":{"type":"number","format":"double"},"required":{"type":"boolean"},"placeholder":{"type":"string"},"refPageWidth":{"type":"number","format":"double"},"refPageHeight":{"type":"number","format":"double"}}},"SigningViewResponseDTO":{"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"documentHash":{"type":"string"},"ownerName":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"signerName":{"type":"string"},"signerEmail":{"type":"string"},"signerPhone":{"type":"string"},"signerRole":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"signerStatus":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"fileUrl":{"type":"string"},"sentAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"signedAt":{"type":"string","format":"date-time"},"declinedAt":{"type":"string","format":"date-time"},"existingSignatures":{"type":"array","items":{"$ref":"#/components/schemas/ExistingSignaturePosition"}},"preConfiguredPosition":{"$ref":"#/components/schemas/PreConfiguredPositionDTO"},"preConfiguredPositions":{"type":"array","items":{"$ref":"#/components/schemas/PreConfiguredPositionDTO"}},"authMethods":{"type":"array","items":{"type":"string"}},"pendingSigners":{"type":"integer","format":"int64"},"declinedSigners":{"type":"integer","format":"int64"},"allowRefuse":{"type":"boolean"},"waitingTurn":{"type":"boolean"},"waitingForNames":{"type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"$ref":"#/components/schemas/SignerFieldDTO"}},"lockedFields":{"type":"array","items":{"type":"string"}},"locale":{"type":"string"},"copyContactOptions":{"type":"array","items":{"type":"string"}},"copyChannel":{"type":"string"}}},"DownloadSignedDocumentResponseDTO":{"type":"object","properties":{"url":{"type":"string"},"fileName":{"type":"string"},"signedReady":{"type":"boolean"}}},"SignerAuthRequirementsResponseDTO":{"type":"object","properties":{"authMethods":{"type":"array","items":{"type":"string"}},"otpVerified":{"type":"boolean"},"signerPhone":{"type":"string"}}},"BundleDocumentDTO":{"type":"object","properties":{"envelopeId":{"type":"integer","format":"int64"},"title":{"type":"string"},"signerToken":{"type":"string"},"signerStatus":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"signedAt":{"type":"string","format":"date-time"},"authMethods":{"type":"array","items":{"type":"string","enum":["SCREEN_SIGNATURE","EMAIL_CODE","SMS_CODE","WHATSAPP_CODE","DIGITAL_CERTIFICATE","FACIAL_RECOGNITION","IDENTITY_VALIDATION","ICP_CERTIFICATE","CPF","RG","SELFIE_PHOTO","DOCUMENT_PHOTO"]}},"downloadAvailable":{"type":"boolean"}}},"BundleSigningResponseDTO":{"type":"object","properties":{"bundleTitle":{"type":"string"},"signerName":{"type":"string"},"status":{"type":"string"},"documents":{"type":"array","items":{"$ref":"#/components/schemas/BundleDocumentDTO"}}}},"PublicDocumentFieldDTO":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"},"required":{"type":"boolean"},"helpText":{"type":"string"},"inputType":{"type":"string"},"hidden":{"type":"boolean"},"displayOrder":{"type":"integer","format":"int32"}}},"PublicDocumentResponseDTO":{"type":"object","properties":{"documentName":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/PublicDocumentFieldDTO"}}}},"PaymentResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"subscriptionId":{"type":"integer","format":"int64"},"stripePaymentId":{"type":"string"},"stripeInvoiceId":{"type":"string"},"paymentSource":{"type":"string"},"amount":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string","enum":["PENDING","SUCCEEDED","FAILED","REFUNDED","CANCELED"]},"paymentMethod":{"type":"string","enum":["CARD","PIX","APPLE_PAY","GOOGLE_PAY"]},"paidAt":{"type":"string","format":"date-time"},"failedAt":{"type":"string","format":"date-time"},"failureReason":{"type":"string"},"attemptCount":{"type":"integer","format":"int32"},"invoiceUrl":{"type":"string"},"receiptUrl":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"PagePaymentResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/PaymentResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"CustomRolesListResponseDTO":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/CustomRoleResponseDTO"}},"availablePermissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionResponseDTO"}},"defaultRolePermissions":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"PageReportUserStatsResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ReportUserStatsResponse"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"ReportUserStatsResponse":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"email":{"type":"string"},"name":{"type":"string"},"envelopes":{"type":"integer","format":"int64"},"averageSigningTimeMinutes":{"type":"number","format":"double"},"statusBreakdown":{"$ref":"#/components/schemas/StatusBreakdownResponse"}}},"StatusBreakdownResponse":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"signed":{"type":"integer","format":"int64"},"inProgress":{"type":"integer","format":"int64"},"refused":{"type":"integer","format":"int64"},"expired":{"type":"integer","format":"int64"},"canceled":{"type":"integer","format":"int64"},"trashed":{"type":"integer","format":"int64"}}},"EnvelopeTimelineResponse":{"type":"object","properties":{"granularity":{"type":"string"},"points":{"type":"array","items":{"$ref":"#/components/schemas/TimelinePointResponse"}}}},"TimelinePointResponse":{"type":"object","properties":{"date":{"type":"string","format":"date"},"signed":{"type":"integer","format":"int64"},"inProgress":{"type":"integer","format":"int64"},"refused":{"type":"integer","format":"int64"}}},"EnvelopeSummaryResponse":{"type":"object","properties":{"totals":{"$ref":"#/components/schemas/StatusBreakdownResponse"},"averageSigningTime":{"$ref":"#/components/schemas/SigningTimeHistogramResponse"}}},"SigningTimeHistogramBinResponse":{"type":"object","properties":{"bin":{"type":"string"},"count":{"type":"integer","format":"int64"},"percent":{"type":"number","format":"double"}}},"SigningTimeHistogramResponse":{"type":"object","properties":{"averageHours":{"type":"number","format":"double"},"histogram":{"type":"array","items":{"$ref":"#/components/schemas/SigningTimeHistogramBinResponse"}}}},"PageReportFolderStatsResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ReportFolderStatsResponse"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"ReportFolderStatsResponse":{"type":"object","properties":{"folderId":{"type":"string","format":"uuid"},"name":{"type":"string"},"envelopes":{"type":"integer","format":"int64"},"averageSigningTimeMinutes":{"type":"number","format":"double"},"statusBreakdown":{"$ref":"#/components/schemas/StatusBreakdownResponse"}}},"StreamingResponseBody":{},"DocumentTimelineResponse":{"type":"object","properties":{"granularity":{"type":"string"},"points":{"type":"array","items":{"$ref":"#/components/schemas/TimelinePointResponse"}}}},"DocumentSummaryResponse":{"type":"object","properties":{"totals":{"$ref":"#/components/schemas/StatusBreakdownResponse"},"averageSigningTime":{"$ref":"#/components/schemas/SigningTimeHistogramResponse"}}},"OrganizationPlanUsageResponseDTO":{"type":"object","properties":{"maxSignatures":{"type":"integer","format":"int32"},"signaturesUsed":{"type":"integer","format":"int32"},"maxEnvelopes":{"type":"integer","format":"int32"},"envelopesUsed":{"type":"integer","format":"int32"},"quotaRenewsOn":{"type":"string","format":"date"}}},"PageOrganizationMemberResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMemberResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageOrganizationInvitationResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationInvitationResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageFolderResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/FolderResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageContactResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ContactResponse"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageContactGroupResponse":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ContactGroupResponse"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"CanCreateOrganizationResponseDTO":{"type":"object","properties":{"canCreate":{"type":"boolean"},"reason":{"type":"string"}}},"ObservedSignerDTO":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"signedAt":{"type":"string","format":"date-time"}}},"ObservingViewResponseDTO":{"type":"object","properties":{"title":{"type":"string"},"senderName":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"completedAt":{"type":"string","format":"date-time"},"signers":{"type":"array","items":{"$ref":"#/components/schemas/ObservedSignerDTO"}},"canDownload":{"type":"boolean"}}},"ObservingDownloadResponseDTO":{"type":"object","properties":{"url":{"type":"string"}}},"NotificationResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["ENVELOPE_COMPLETED","SIGNATURE_DECLINED","SIGNER_EMAIL_BOUNCED","PAYMENT_SUCCEEDED","SUBSCRIPTION_RENEWAL_REMINDER","ORGANIZATION_INVITATION","SUPPORT_NEW_INBOUND_MESSAGE","SUPPORT_AGENT_NEW_MESSAGE","NEW_LOGIN_DETECTED","ADMIN_TEST"]},"category":{"type":"string","enum":["DOCUMENT","BILLING","ORGANIZATION","SUPPORT","SYSTEM"]},"title":{"type":"string"},"body":{"type":"string"},"actionUrl":{"type":"string"},"data":{"type":"object","additionalProperties":{}},"priority":{"type":"integer","format":"int32"},"readAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"PageNotificationResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"UnreadCountResponseDTO":{"type":"object","properties":{"count":{"type":"integer","format":"int64"}}},"NotificationPreferenceResponseDTO":{"type":"object","properties":{"category":{"type":"string","enum":["DOCUMENT","BILLING","ORGANIZATION","SUPPORT","SYSTEM"]},"channel":{"type":"string","enum":["IN_APP","EMAIL","WHATSAPP"]},"enabled":{"type":"boolean"}}},"DetectedSignatureFieldResponseDTO":{"type":"object","properties":{"page":{"type":"integer","format":"int32"},"posX":{"type":"number","format":"float"},"posY":{"type":"number","format":"float"},"width":{"type":"number","format":"float"},"height":{"type":"number","format":"float"},"label":{"type":"string"}}},"PageLibraryTemplateResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/LibraryTemplateResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageEnvelopeResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/EnvelopeResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"EnvelopeDetailResponseDTO":{"type":"object","properties":{"envelope":{"$ref":"#/components/schemas/EnvelopeResponseDTO"},"signers":{"type":"array","items":{"$ref":"#/components/schemas/SignerResponseDTO"}},"emailsQueNaoRecebem":{"type":"array","items":{"type":"string"}},"editableSignerIds":{"type":"array","items":{"type":"integer","format":"int64"}},"awaitingSignatures":{"type":"boolean"},"observers":{"type":"array","items":{"$ref":"#/components/schemas/ObserverResponseDTO"}},"observerNotifyMode":{"type":"string","enum":["COMPLETION_ONLY","EACH_SIGNATURE"]}}},"DownloadDocumentResponseDTO":{"type":"object","properties":{"url":{"type":"string"},"fileName":{"type":"string"}}},"AuditEventResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"envelopeId":{"type":"integer","format":"int64"},"actorEmail":{"type":"string"},"eventType":{"type":"string","enum":["CREATED","SENT","VIEWED","SIGNED","DECLINED","CANCELED","EXPIRED","COMPLETED","DOWNLOADED","IDENTITY_CONFIRMED","REPORT_EXPORTED","BUNDLE_CREATED","SIGNER_UPDATED"]},"ipAddress":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"}}},"MySignatureResponseDTO":{"type":"object","properties":{"documentId":{"type":"integer","format":"int64"},"documentTitle":{"type":"string"},"documentDescription":{"type":"string"},"ownerName":{"type":"string"},"myRole":{"type":"string","enum":["SIGNER","WITNESS","APPROVER","ACKNOWLEDGE_RECEIPT","AUTHORIZE","CUSTOM"]},"myStatus":{"type":"string","enum":["PENDING","NOTIFIED","VIEWED","SIGNED","DECLINED"]},"totalSigners":{"type":"integer","format":"int64"},"completedSigners":{"type":"integer","format":"int64"},"documentStatus":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"sentAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"signedAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"accessToken":{"type":"string"},"documentHash":{"type":"string"}}},"PageMySignatureResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/MySignatureResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"EmailCheckResponseDTO":{"type":"object","description":"Checagem leve de um e-mail de signatario. Aviso, nunca bloqueio.","properties":{"email":{"type":"string","example":"fulano@gmial.com"},"ok":{"type":"boolean","description":"false = pode estar errado (ver reason/suggestion)"},"suggestion":{"type":"string","description":"Correcao provavel do dominio","example":"fulano@gmail.com"},"reason":{"type":"string","description":"LIKELY_TYPO | DOMAIN_NOT_FOUND | NO_MX | SUPPRESSED | PREVIOUS_BOUNCE | INVALID_FORMAT; null quando ok","enum":["LIKELY_TYPO","DOMAIN_NOT_FOUND","NO_MX","SUPPRESSED","PREVIOUS_BOUNCE","INVALID_FORMAT"]}}},"PageBundleResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/BundleResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"BundleDetailResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"envelopes":{"type":"array","items":{"$ref":"#/components/schemas/BundleEnvelopeDTO"}},"signers":{"type":"array","items":{"$ref":"#/components/schemas/BundleSignerDetailDTO"}}}},"BundleEnvelopeDTO":{"type":"object","properties":{"envelopeId":{"type":"integer","format":"int64"},"title":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SENT","IN_PROGRESS","COMPLETED","CANCELED","EXPIRED"]},"sortOrder":{"type":"integer","format":"int32"}}},"TwoFactorChallengeResponseDTO":{"type":"object","properties":{"purpose":{"type":"string","enum":["VERIFY","SETUP"]}}},"GoogleOneTapChallengeResponseDTO":{"type":"object","properties":{"nonce":{"type":"string"},"clientId":{"type":"string"}}},"WhatsAppStatusResponseDTO":{"type":"object","properties":{"providerName":{"type":"string"},"enabled":{"type":"boolean"},"flagName":{"type":"string"},"flagEnabled":{"type":"boolean"}}},"ErrorCodeStatDTO":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int64"},"humanizedMessage":{"type":"string"}}},"WhatsAppOverviewStatsResponseDTO":{"type":"object","properties":{"totalEvents":{"type":"integer","format":"int64"},"totalSent":{"type":"integer","format":"int64"},"totalDelivered":{"type":"integer","format":"int64"},"totalRead":{"type":"integer","format":"int64"},"totalFailed":{"type":"integer","format":"int64"},"totalInbound":{"type":"integer","format":"int64"},"deliveryRate":{"type":"number","format":"double"},"readRate":{"type":"number","format":"double"},"topErrorCodes":{"type":"array","items":{"$ref":"#/components/schemas/ErrorCodeStatDTO"}},"byEventType":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}}},"PageWhatsAppWebhookInboxResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppWebhookInboxResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"WhatsAppWebhookInboxResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"providerName":{"type":"string"},"rawPayload":{"type":"string"},"signatureHeader":{"type":"string"},"signatureValid":{"type":"boolean"},"receivedAt":{"type":"string","format":"date-time"},"processedAt":{"type":"string","format":"date-time"},"parseStatus":{"type":"string","enum":["OK","PARSE_ERROR","PARTIAL","UNMATCHED","SIGNATURE_INVALID"]},"parseError":{"type":"string"},"eventsCreated":{"type":"integer","format":"int32"}}},"PageWhatsAppMessageEventResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppMessageEventResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"WhatsAppMessageEventResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"inboxId":{"type":"integer","format":"int64"},"providerName":{"type":"string"},"providerMessageId":{"type":"string"},"eventType":{"type":"string","enum":["INTERNAL_SENT","SENT","DELIVERED","READ","FAILED","INBOUND_MESSAGE"]},"signerId":{"type":"integer","format":"int64"},"envelopeId":{"type":"integer","format":"int64"},"phoneNumberId":{"type":"string"},"recipientPhone":{"type":"string"},"errorCode":{"type":"integer","format":"int32"},"errorTitle":{"type":"string"},"errorMessage":{"type":"string"},"conversationId":{"type":"string"},"conversationOrigin":{"type":"string"},"eventTimestamp":{"type":"string","format":"date-time"},"receivedAt":{"type":"string","format":"date-time"},"triggeredByAdminId":{"type":"integer","format":"int64"}}},"WhatsAppErrorResolutionResponseDTO":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"technicalTitle":{"type":"string"},"ownerMessage":{"type":"string"},"suggestedAction":{"type":"string"},"recoverable":{"type":"boolean"},"shouldFallbackEmail":{"type":"boolean"},"criticalAlert":{"type":"boolean"}}},"WhatsAppEventDetailResponseDTO":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/WhatsAppMessageEventResponseDTO"},"inbox":{"$ref":"#/components/schemas/WhatsAppWebhookInboxResponseDTO"},"errorResolution":{"$ref":"#/components/schemas/WhatsAppErrorResolutionResponseDTO"}}},"UserUsageMetricsResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"window":{"type":"string"},"lastAccess":{"type":"string","format":"date-time"},"docsCreated":{"type":"integer","format":"int64"},"envelopesSent":{"type":"integer","format":"int64"},"envelopesCompleted":{"type":"integer","format":"int64"},"completionRate":{"type":"number","format":"double"}}},"UserUsageBreakdownResponseDTO":{"type":"object","properties":{"window":{"type":"string"},"envelopesSent":{"type":"integer","format":"int64"},"fromModels":{"type":"integer","format":"int64"},"fromUploads":{"type":"integer","format":"int64"},"inBundles":{"type":"integer","format":"int64"},"modelsCount":{"type":"integer","format":"int64"},"drafts":{"type":"integer","format":"int64"},"draftsWithSentTwin":{"type":"integer","format":"int64"}}},"TimelineEventDTO":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string"},"summary":{"type":"string"},"metadata":{"type":"object","additionalProperties":{}}}},"TimelineResponseDTO":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEventDTO"}},"nextCursor":{"type":"string"}}},"UserEnvelopeQuotaResponseDTO":{"type":"object","properties":{"baseLimit":{"type":"integer","format":"int32"},"bonus":{"type":"integer","format":"int32"},"effectiveLimit":{"type":"integer","format":"int32"},"used":{"type":"integer","format":"int32"},"remaining":{"type":"integer","format":"int32"},"unlimited":{"type":"boolean"},"period":{"type":"string"},"resetsAt":{"type":"string","format":"date-time"}}},"LeadResponseDTO":{"type":"object","properties":{"source":{"type":"string"},"currentPlan":{"$ref":"#/components/schemas/PlanDTO"},"mrrBrl":{"type":"number"},"status":{"type":"string"}}},"PlanDTO":{"type":"object","properties":{"name":{"type":"string"},"displayName":{"type":"string"},"interval":{"type":"string"},"amount":{"type":"number"}}},"UserIdentityResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"planName":{"type":"string"},"organizationName":{"type":"string"},"status":{"type":"string"},"emailVerified":{"type":"boolean"},"lastAccess":{"type":"string","format":"date-time"}}},"Step":{"type":"object","properties":{"name":{"type":"string"},"completedAt":{"type":"string","format":"date-time"},"stuckSinceDays":{"type":"integer","format":"int64"}}},"UserActivationFunnelResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"}}}},"Funnel":{"type":"object","properties":{"signups":{"type":"integer","format":"int64"},"sentDocument":{"type":"integer","format":"int64"},"signedDocument":{"type":"integer","format":"int64"},"paid":{"type":"integer","format":"int64"}}},"NearQuota":{"type":"object","properties":{"period":{"type":"string"},"thresholdPercent":{"type":"integer","format":"int32"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/QuotaAccount"}}}},"QuotaAccount":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"organizationId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"planName":{"type":"string"},"used":{"type":"integer","format":"int32"},"limit":{"type":"integer","format":"int32"},"percent":{"type":"integer","format":"int32"},"lastAccess":{"type":"string","format":"date-time"}}},"UserGlobalStatsResponseDTO":{"type":"object","properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"includeInternal":{"type":"boolean"},"internalUserIds":{"type":"array","items":{"type":"integer","format":"int64"}},"totalAccounts":{"type":"integer","format":"int64"},"newAccounts":{"type":"integer","format":"int64"},"activeAccounts":{"type":"integer","format":"int64"},"payingCustomers":{"type":"integer","format":"int64"},"nearQuota":{"$ref":"#/components/schemas/NearQuota"},"idleAccounts":{"type":"integer","format":"int64"},"whatsApp":{"$ref":"#/components/schemas/WhatsApp"},"funnel":{"$ref":"#/components/schemas/Funnel"},"signupsByWeek":{"type":"array","items":{"$ref":"#/components/schemas/Week"}}}},"Week":{"type":"object","properties":{"weekStart":{"type":"string","format":"date"},"signups":{"type":"integer","format":"int64"}}},"WhatsApp":{"type":"object","properties":{"messages":{"type":"integer","format":"int64"},"internalMessagesExcluded":{"type":"integer","format":"int64"},"costPerMessage":{"type":"number"},"estimatedCost":{"type":"number"},"byAccount":{"type":"array","items":{"$ref":"#/components/schemas/WhatsAppAccount"}}}},"WhatsAppAccount":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"accountDeleted":{"type":"boolean"},"messages":{"type":"integer","format":"int64"},"estimatedCost":{"type":"number"}}},"GlobalStatsPayingCustomerResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"planName":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"payingSince":{"type":"string","format":"date-time"},"lastPaymentAt":{"type":"string","format":"date-time"},"lastPaymentAmount":{"type":"number"}}},"PageGlobalStatsPayingCustomerResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/GlobalStatsPayingCustomerResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"GlobalStatsAccountResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"documentsSent":{"type":"integer","format":"int64"}}},"PageGlobalStatsAccountResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/GlobalStatsAccountResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"GlobalStatsIdleAccountResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"daysSinceSignup":{"type":"integer","format":"int64"},"hasDraft":{"type":"boolean"}}},"PageGlobalStatsIdleAccountResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/GlobalStatsIdleAccountResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"NotificationTypeSettingResponseDTO":{"type":"object","properties":{"type":{"type":"string","enum":["ENVELOPE_COMPLETED","SIGNATURE_DECLINED","SIGNER_EMAIL_BOUNCED","PAYMENT_SUCCEEDED","SUBSCRIPTION_RENEWAL_REMINDER","ORGANIZATION_INVITATION","SUPPORT_NEW_INBOUND_MESSAGE","SUPPORT_AGENT_NEW_MESSAGE","NEW_LOGIN_DETECTED","ADMIN_TEST"]},"category":{"type":"string","enum":["DOCUMENT","BILLING","ORGANIZATION","SUPPORT","SYSTEM"]},"channels":{"type":"array","items":{"type":"string","enum":["IN_APP","EMAIL","WHATSAPP"]},"uniqueItems":true},"priority":{"type":"integer","format":"int32"},"enabled":{"type":"boolean"}}},"DeliveryResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"type":{"type":"string","enum":["ENVELOPE_COMPLETED","SIGNATURE_DECLINED","SIGNER_EMAIL_BOUNCED","PAYMENT_SUCCEEDED","SUBSCRIPTION_RENEWAL_REMINDER","ORGANIZATION_INVITATION","SUPPORT_NEW_INBOUND_MESSAGE","SUPPORT_AGENT_NEW_MESSAGE","NEW_LOGIN_DETECTED","ADMIN_TEST"]},"category":{"type":"string","enum":["DOCUMENT","BILLING","ORGANIZATION","SUPPORT","SYSTEM"]},"recipientUserId":{"type":"integer","format":"int64"},"recipientEmail":{"type":"string"},"recipientPhone":{"type":"string"},"channel":{"type":"string","enum":["IN_APP","EMAIL","WHATSAPP"]},"status":{"type":"string","enum":["SENT","FAILED","SKIPPED"]},"error":{"type":"string"},"providerMessageId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"sentAt":{"type":"string","format":"date-time"}}},"PageDeliveryResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageSuppressionResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/SuppressionResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"SuppressionResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"reason":{"type":"string"},"sourceCampaignId":{"type":"integer","format":"int64"},"createdAt":{"type":"string","format":"date-time"}}},"ReengagementSummaryResponseDTO":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"sent":{"type":"integer","format":"int64"},"skipped":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"delivered":{"type":"integer","format":"int64"},"bounced":{"type":"integer","format":"int64"},"complaints":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"byTemplate":{"type":"array","items":{"$ref":"#/components/schemas/ReengagementTemplateStatsResponseDTO"}}}},"ReengagementTemplateStatsResponseDTO":{"type":"object","properties":{"templateName":{"type":"string"},"sent":{"type":"integer","format":"int64"},"delivered":{"type":"integer","format":"int64"},"opened":{"type":"integer","format":"int64"},"unsubscribed":{"type":"integer","format":"int64"},"bounced":{"type":"integer","format":"int64"},"complaints":{"type":"integer","format":"int64"}}},"PageReengagementSendResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ReengagementSendResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"ReengagementSendResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"userName":{"type":"string"},"userEmail":{"type":"string"},"stageMonths":{"type":"integer","format":"int32"},"templateName":{"type":"string"},"status":{"type":"string"},"detail":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"messageId":{"type":"integer","format":"int64"},"subject":{"type":"string"},"delivery":{"type":"string"},"deliveryDetail":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"unsubscribedAt":{"type":"string","format":"date-time"},"excluded":{"type":"boolean"}}},"ReengagementSendEmailResponseDTO":{"type":"object","properties":{"subject":{"type":"string"},"bodyHtml":{"type":"string"}}},"PageReengagementExclusionResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/ReengagementExclusionResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"PageMarketingMessageResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/MarketingMessageResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"CampaignRecipientResponseDTO":{"type":"object","description":"Destinatario de uma campanha, com o registro de abertura do e-mail.","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string","description":"E-mail do destinatario.","example":"contato@empresa.com.br"},"companyName":{"type":"string","description":"Nome da empresa importado da planilha.","example":"Acme Ltda"},"status":{"type":"string","description":"PENDING, SENT, FAILED, SUPPRESSED ou UNSUBSCRIBED.","example":"SENT"},"sentAt":{"type":"string","format":"date-time","description":"Quando o envio foi aceito pelo SES."},"openedAt":{"type":"string","format":"date-time","description":"Quando o pixel foi carregado. Nulo = nenhuma abertura registrada. Subestima: cliente que bloqueia imagens le sem contabilizar."},"error":{"type":"string","description":"Erro do envio, quando status = FAILED."}}},"PageCampaignRecipientResponseDTO":{"type":"object","properties":{"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"},"size":{"type":"integer","format":"int32"},"content":{"type":"array","items":{"$ref":"#/components/schemas/CampaignRecipientResponseDTO"}},"number":{"type":"integer","format":"int32"},"first":{"type":"boolean"},"last":{"type":"boolean"},"sort":{"$ref":"#/components/schemas/SortObject"},"numberOfElements":{"type":"integer","format":"int32"},"pageable":{"$ref":"#/components/schemas/PageableObject"},"empty":{"type":"boolean"}}},"EnvelopeReviewResponseDTO":{"type":"object","properties":{"envelopeId":{"type":"integer","format":"int64"},"bundleId":{"type":"integer","format":"int64"},"title":{"type":"string"},"message":{"type":"string"},"signals":{"type":"array","items":{"type":"string"}},"heldAt":{"type":"string","format":"date-time"},"ownerId":{"type":"integer","format":"int64"},"ownerName":{"type":"string"},"ownerEmail":{"type":"string"},"ownerCreatedAt":{"type":"string","format":"date-time"},"recipients":{"type":"array","items":{"type":"string"}}}},"EmailTemplateInfoDTO":{"type":"object","properties":{"id":{"type":"string"},"templateId":{"type":"string"},"defaultSubject":{"type":"string"},"defaultParams":{"type":"object","additionalProperties":{}}}},"UsageResponse":{"type":"object","properties":{"task":{"type":"string","enum":["CHAT","INTENT","GROUNDEDNESS","EMBEDDING","LEARNING","AUDIO_TRANSCRIPTION","DOCUMENT_VISION"]},"provider":{"type":"string"},"model":{"type":"string"},"totalTokens":{"type":"integer","format":"int64"},"estimatedCostUsd":{"type":"number"},"calls":{"type":"integer","format":"int64"}}},"TraceResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"conversationId":{"type":"integer","format":"int64"},"inboundMessageId":{"type":"integer","format":"int64"},"inboundText":{"type":"string"},"intent":{"type":"string"},"outcome":{"type":"string"},"escalationReason":{"type":"string"},"totalMs":{"type":"integer","format":"int32"},"totalTokens":{"type":"integer","format":"int32"},"estimatedCostUsd":{"type":"number"},"createdAt":{"type":"string","format":"date-time"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/TraceStepResponse"}}}},"TraceStepResponse":{"type":"object","properties":{"seq":{"type":"integer","format":"int32"},"stepType":{"type":"string"},"stepLabel":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"input":{"type":"string"},"output":{"type":"string"},"provider":{"type":"string"},"model":{"type":"string"},"promptTokens":{"type":"integer","format":"int32"},"completionTokens":{"type":"integer","format":"int32"},"estimatedCostUsd":{"type":"number"},"durationMs":{"type":"integer","format":"int32"},"failed":{"type":"boolean"}}},"TaskBindingResponse":{"type":"object","properties":{"task":{"type":"string","enum":["CHAT","INTENT","GROUNDEDNESS","EMBEDDING","LEARNING","AUDIO_TRANSCRIPTION","DOCUMENT_VISION"]},"taskLabel":{"type":"string"},"taskDescription":{"type":"string"},"providerCode":{"type":"string"},"model":{"type":"string"},"temperature":{"type":"number","format":"double"},"maxTokens":{"type":"integer","format":"int32"},"fallbackProviderCode":{"type":"string"},"fallbackModel":{"type":"string"}}},"ProviderResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"code":{"type":"string"},"displayName":{"type":"string"},"kind":{"type":"string","enum":["OPENAI_COMPATIBLE","GEMINI"]},"baseUrl":{"type":"string"},"apiKeyMasked":{"type":"string"},"enabled":{"type":"boolean"},"notes":{"type":"string"}}},"PromptResponse":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"content":{"type":"string"},"customized":{"type":"boolean"}}},"PromptHistoryResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"content":{"type":"string"},"version":{"type":"integer","format":"int32"},"replacedAt":{"type":"string","format":"date-time"},"replacedByUserId":{"type":"integer","format":"int64"}}},"ActivityEventResponseDTO":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"userName":{"type":"string"},"userEmail":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"method":{"type":"string"},"route":{"type":"string"},"action":{"type":"string"},"status":{"type":"integer","format":"int32"},"durationMs":{"type":"integer","format":"int32"},"ip":{"type":"string"},"device":{"type":"string"},"background":{"type":"boolean"},"errorMessage":{"type":"string"}}},"ActivityPageResponseDTO":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ActivityEventResponseDTO"}},"nextCursor":{"type":"string"}}},"RouteUsageResponseDTO":{"type":"object","properties":{"method":{"type":"string"},"route":{"type":"string"},"action":{"type":"string"},"total":{"type":"integer","format":"int64"},"errors":{"type":"integer","format":"int64"},"users":{"type":"integer","format":"int64"},"lastAt":{"type":"string","format":"date-time"}}},"PresenceSummaryResponseDTO":{"type":"object","properties":{"total":{"type":"integer","format":"int64"},"today":{"type":"integer","format":"int64"},"last7Days":{"type":"integer","format":"int64"},"gone":{"type":"integer","format":"int64"},"neverUsed":{"type":"integer","format":"int64"},"includeInternal":{"type":"boolean"}}},"PresenceEntryResponseDTO":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"name":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"lastSeenAt":{"type":"string","format":"date-time"},"documents":{"type":"integer","format":"int64"},"plan":{"type":"string"},"planName":{"type":"string"},"firstSeenAt":{"type":"string","format":"date-time"},"activeDays30":{"type":"integer","format":"int32"},"reengagement":{"$ref":"#/components/schemas/ReengagementTrail"}}},"ReengagementTrail":{"type":"object","properties":{"sent":{"type":"integer","format":"int32"},"lastSentAt":{"type":"string","format":"date-time"},"lastTemplate":{"type":"string"},"deliveryStatus":{"type":"string"},"openedAt":{"type":"string","format":"date-time"},"returnedAfter":{"type":"boolean"}}},"CampaignPerformanceResponseDTO":{"type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"signups":{"type":"integer","format":"int64"},"payingCustomers":{"type":"integer","format":"int64"},"revenue":{"type":"number"},"revenuePerSignup":{"type":"number"},"conversionRate":{"type":"number"}}},"BulkDeleteRequest":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":200,"minItems":0}},"required":["ids"]}}}}