> For the complete documentation index, see [llms.txt](https://docs.giro.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giro.tech/desenvolvedores/api-gtsign/webhooks/webhook-eventos.md).

# Webhook - Eventos

## Eventos de webhook para notificações de documentos e assinaturas

> Quando um evento ocorre, o sistema envia um webhook contendo informações sobre o evento.\
> O payload varia conforme o tipo de evento configurado no webhook.<br>

```json
{"openapi":"3.0.0","info":{"title":"GTSign API","version":"1.0.0"},"servers":[{"url":"https://app.staging.gtsign.giro.tech/api","description":"Ambiente de Staging"},{"url":"https://api.gtsign.giro.tech","description":"Ambiente de Produção"}],"paths":{"/webhooks/events":{"post":{"summary":"Eventos de webhook para notificações de documentos e assinaturas","description":"Quando um evento ocorre, o sistema envia um webhook contendo informações sobre o evento.\nO payload varia conforme o tipo de evento configurado no webhook.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["NOTIFICATION_SIGNATURE_REQUEST"]}}},"signer":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]}}},"signature":{"type":"object","properties":{"signatureUrl":{"type":"string"}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["NOTIFICATION_TOKEN"]}}},"signer":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]}}},"signature":{"type":"object","properties":{"token":{"type":"string"}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["NOTIFICATION_SIGNATURE_CONFIRMATION"]}}},"signer":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"cpf":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"ip":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["NOTIFICATION_FINISHED_DOCUMENT"]}}},"signer":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"downloadUrl":{"type":"string"}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["SIGNATURE"]},"signer":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}},"envelope":{"type":"object","properties":{"uuid":{"type":"string"},"status":{"type":"string","enum":["VALID","SIGNED","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"documents":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"}}}},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_FINISHED"]}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["DOCUMENT_CANCELED"]}}},"document":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["ENVELOPE_FINISHED"]}}},"envelope":{"type":"object","properties":{"uuid":{"type":"string"},"status":{"type":"string","enum":["VALID","SIGNED","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"documents":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"}}}},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}}}},{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string","enum":["ENVELOPE_CANCELED"]}}},"envelope":{"type":"object","properties":{"uuid":{"type":"string"},"status":{"type":"string","enum":["VALID","SIGNED","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"documents":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"name":{"type":"string"},"originalDocumentDate":{"type":"string","format":"date"},"signedDocumentDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["VALID","FINISHED","CANCELED"]},"deadline":{"type":"string","format":"date"},"notificationPeriodDelivery":{"type":"integer"},"signedDocumentPreSignedUrl":{"type":"string"}}}},"signatures":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"cpf":{"type":"string"},"name":{"type":"string"},"phone":{"type":"string"},"birth":{"type":"string","format":"date"},"status":{"type":"string","enum":["SIGNED","PENDING"]},"personSignatureDate":{"type":"string","format":"date-time"},"email":{"type":"string"},"signatureType":{"type":"string","enum":["PART","WITNESS","CONTRACTOR","HIRED","ADMINISTRATOR","GUARANTOR","TRANSFEROR","TRANSFEREE","JOINT_DEBTOR","ISSUER","ENDORSER","ENDORSEE","WARRANTOR","MANAGER","LESSOR","LESSEE","PURCHASER","SELLER","ATTORNEY","LEGAL_REPRESENTATIVE","VALIDATOR"]},"notificationChannel":{"type":"string","enum":["EMAIL","WHATSAPP","WEBHOOK"]}}}}}}}}]}}}},"responses":{"200":{"description":"Webhook processado com sucesso","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Erro no processamento do webhook","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}}}}}}}}}}
```

<figure><img src="https://978140111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF6l1W0qI0y7eF7f0QRDC%2Fuploads%2Fgit-blob-f5d2064d02c970341ca52b2c083eb1f585bc436a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% embed url="<https://giro.tech/central-de-atendimento/>" %}
