{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Webhooks","description":"Documentação oficial, guias e referência da API Auvo v2.","siteUrl":"https://developers.auvo.com.br","lang":"pt-BR","keywords":"auvo, api, documentação, developers, field service, workforce","meta":[{"name":"og:site_name","content":"Auvo Developers"},{"name":"og:locale","content":"pt_BR"},{"name":"og:locale:alternate","content":"es_ES"},{"name":"og:locale:alternate","content":"en_US"},{"name":"twitter:card","content":"summary_large_image"},{"name":"twitter:site","content":"@auvoapp"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"webhooks","__idx":0},"children":["Webhooks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A API Auvo notifica eventos de tarefas, tickets e ordens de serviço via"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTP POST autenticado"]}," para a URL registrada pelo cliente."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"assinar-eventos","__idx":1},"children":["Assinar eventos"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use o grupo ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["WebHooks"]}," na referência da API para criar/listar/remover"," ","assinaturas. Cada assinatura informa:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," — endpoint do cliente (HTTPS obrigatório em produção)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events"]}," — lista de eventos (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task.created"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task.updated"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ticket.closed"]},"...)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["secret"]}," — string opaca retornada na criação; use para assinar payloads."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"formato-do-payload","__idx":2},"children":["Formato do payload"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"event\": \"task.created\",\n  \"occurredAt\": \"2026-04-24T13:45:00Z\",\n  \"deliveryId\": \"01J9F3T2...-\",\n  \"data\": { \"taskId\": 12345, \"customerId\": 98 }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"validação-de-origem","__idx":3},"children":["Validação de origem"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cada entrega inclui ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Auvo-Signature: t=<ts>,v1=<hexHmacSha256>"]}," calculado"," ","como ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HMAC_SHA256(secret, \"${ts}.${body}\")"]},". Rejeite se:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A diferença entre ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ts"]}," e ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Date.now()"]}," for maior que ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["5 minutos"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v1"]}," não bater (use comparação time-safe)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"reentrega","__idx":4},"children":["Reentrega"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Respostas ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]}," em até ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["10 s"]}," marcam a entrega como sucesso."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Falhas ou timeout disparam retries com backoff exponencial até ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["24 h"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Auvo-Delivery-Attempt"]}," informa a tentativa atual (1..n)."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"idempotência","__idx":5},"children":["Idempotência"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliveryId"]}," para deduplicar entregas no seu lado — reentregas chegam com"," ","o mesmo ID."]}]},"headings":[{"value":"Webhooks","id":"webhooks","depth":1},{"value":"Assinar eventos","id":"assinar-eventos","depth":2},{"value":"Formato do payload","id":"formato-do-payload","depth":2},{"value":"Validação de origem","id":"validação-de-origem","depth":2},{"value":"Reentrega","id":"reentrega","depth":2},{"value":"Idempotência","id":"idempotência","depth":2}],"frontmatter":{"title":"Webhooks","description":"Assinatura, payloads, reentrega e validação de origem de Webhooks.","seo":{"title":"Webhooks"}},"lastModified":"2026-04-24T13:01:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/webhooks","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}