---
title: "Assinar um documento"
product: "Signer"
slug: "sign-a-document"
language: "pt"
canonical_url: "https://try.lacunasoftware.com/pt/signer/sign-a-document"
docs_url: "https://docs.lacunasoftware.com/pt-br/articles/signer"
samples: []
samples_repo: "https://github.com/LacunaSoftware/SignerSamples"
trace_recorded: null
last_generated: "2026-10-12T15:24:28Z"
---

# Assinar um documento

Um fluxo real de documento no Dropsigner: o Dropsigner envia um convite por e-mail e você assina com um código por SMS ou com o seu certificado digital.

Live demo: [https://try.lacunasoftware.com/pt/signer/sign-a-document](https://try.lacunasoftware.com/pt/signer/sign-a-document). It runs against Lacuna's real products; this page describes it for AI coding agents.

## How it works

1. Documento
2. Signatário
3. Acompanhe o fluxo

## Call sequence

No call sequence has been recorded for this demo yet, so none is shown here: this page doesn't guess calls. The docs and samples below show the calls; the live demo makes them.

## Patterns to copy

- Upload the PDF first, then create the document with the upload's id as its file, and read the new document's id from the single item the create call returns. A `SignerApiException` with code `FileHasPassword` or `CpfAlreadyBeingUsed` is a problem with the user's input, not an outage.
- Read the document back and treat its first flow action's user as the truth rather than what you sent: Dropsigner looks signers up by e-mail and keeps a known user's stored name, CPF and phone.
- Follow progress by polling the document (`GetDocumentDetailsAsync`): Concluded, Canceled and Expired are final, Refused is not. The Demo polls every 5 s for the first 10 minutes, then every 30 s.
- Seeing that the signer opened the document takes `GET /api/documents/{id}/events`, which the typed client lacks: read it into your own type and count only a `DocumentViewed` whose agent e-mail is the signer's.
- Ask for a fresh download ticket (`GetDocumentDownloadTicketAsync`, `Signatures` or `PrinterFriendlyVersion`) on each click: the link needs no authentication, lasts an hour and carries a one-time token, so never log it.

## Links

- Live demo: https://try.lacunasoftware.com/en/signer/sign-a-document (Portuguese: https://try.lacunasoftware.com/pt/signer/sign-a-document)
- Docs: https://docs.lacunasoftware.com/pt-br/articles/signer
- Samples: https://github.com/LacunaSoftware/SignerSamples
- Every demo: https://try.lacunasoftware.com/llms.txt and https://try.lacunasoftware.com/demos.json
