TF Fiscal
Documentation

Invoice e-mail

Query invoice e-mail

Status, wait or failure reason and what was actually sent, by the emailId from acceptance.

GET/openapi/v2/empresas/{empresaId}/emails/{emailId}
Requires the token, timestamp and sign signature headers, see Authentication.

Queries an e-mail accepted by Send e-mail. It is the fallback to the webhook: email.sent and email.failed carry the same verdict but require an explicit subscription. An emailId of another company answers 10021020.

Path parameters

empresaId*
stringCompany identifier
emailId*
stringE-mail identifier

* Required field

200
E-mail found. Fields without a value in the current status come as null.
emailId
stringE-mail identifier
id
stringRequest identifier
tipoDocumento
stringDocument type
documentoId
stringDocument identifier
numero
intDocument number
chaveAcesso
stringAccess key
codigoVerificacao
stringVerification code
templateId
stringTemplate used
status
stringE-mail status
motivoEspera
stringWait reason
motivoFalha
stringFailure reason
destinatarios
arrayEffective recipients
anexos
arrayRequested attachments
assunto
stringRendered subject
criadoEm
stringAcceptance time
enviadoEm
stringHand-off to the mail service
atualizadoEm
stringLast update

The document fields (numero, chaveAcesso, codigoVerificacao) come from the acceptance moment and are refreshed on send; assunto and enviadoEm only exist after sending; motivoEspera only in Aguardando and motivoFalha only in Falha. Enviado and Falha are terminal: from them the same document accepts a new send.

Aguardando: key missing

São Paulo NFS-e whose 50-digit key has not come back yet: chaveAcesso is null, codigoVerificacao already exists, motivoEspera = chaveAcesso. The platform rechecks every 30 seconds for up to 120 minutes; nothing to do on your side.

json
{
"emailId": "2103160000000000002",
"id": "mail-sp-000045",
"tipoDocumento": "NFSe",
"documentoId": "SP-20260928-045",
"numero": 45,
"chaveAcesso": null,
"codigoVerificacao": "ABCD1234",
"templateId": "2103150000000000002",
"status": "Aguardando",
"motivoEspera": "chaveAcesso",
"motivoFalha": null,
"destinatarios": ["financeiro@cliente.com.br"],
"anexos": ["pdf", "xml"],
"assunto": null,
"criadoEm": "2026-09-28T12:00:00Z",
"enviadoEm": null,
"atualizadoEm": "2026-09-28T12:03:00Z"
}
status*
stringE-mail status
motivoEspera*
stringWait reason

* Required field

Aguardando: PDF or XML missing

You asked for an attachment and the file is not available yet: motivoEspera = pdf when the rendering service is down, xml when the authorized XML is not archived yet. Same 30-second recheck and same 120-minute limit.

json
{
"emailId": "2103160000000000003",
"id": "email-pedido-8843-1",
"tipoDocumento": "NFe",
"documentoId": "pedido-8843",
"numero": 11770,
"chaveAcesso": "35241204893402000113650010000117701017244270",
"codigoVerificacao": null,
"templateId": "2103150000000000001",
"status": "Aguardando",
"motivoEspera": "pdf",
"motivoFalha": null,
"destinatarios": ["comprador@exemplo.com"],
"anexos": ["pdf"],
"assunto": null,
"criadoEm": "2026-09-28T12:10:00Z",
"enviadoEm": null,
"atualizadoEm": "2026-09-28T12:10:30Z"
}
status*
stringE-mail status
motivoEspera*
stringWait reason

* Required field

Enviado

The mail service accepted the message: assunto carries the final text and enviadoEm the hand-off time. An email.sent arrives with the same data. Delivery into the recipient inbox depends on their provider.

json
{
"emailId": "2103160000000000001",
"id": "email-pedido-8842-1",
"tipoDocumento": "NFe",
"documentoId": "pedido-8842",
"numero": 11769,
"chaveAcesso": "35241204893402000113650010000117691017244265",
"codigoVerificacao": null,
"templateId": "2103150000000000001",
"status": "Enviado",
"motivoEspera": null,
"motivoFalha": null,
"destinatarios": ["comprador@exemplo.com"],
"anexos": ["pdf", "xml"],
"assunto": "Nota fiscal 11769 - Loja Exemplo LTDA",
"criadoEm": "2026-09-28T12:00:00Z",
"enviadoEm": "2026-09-28T12:00:31Z",
"atualizadoEm": "2026-09-28T12:00:31Z"
}
status*
stringE-mail status
assunto*
stringRendered subject
enviadoEm*
stringHand-off to the mail service

* Required field

Falha

Terminal. Causes: exhausted wait (motivoFalha names chaveAcesso, pdf or xml), exhausted send attempts, document no longer authorized, template disabled after acceptance or a voucher that cannot be issued. An email.failed arrives with motivo_falha. Fix the cause and resend with a new id.

json
{
"emailId": "2103160000000000002",
"id": "mail-sp-000045",
"tipoDocumento": "NFSe",
"documentoId": "SP-20260928-045",
"numero": 45,
"chaveAcesso": null,
"codigoVerificacao": "ABCD1234",
"templateId": "2103150000000000002",
"status": "Falha",
"motivoEspera": null,
"motivoFalha": "Tempo esgotado aguardando: chaveAcesso",
"destinatarios": ["financeiro@cliente.com.br"],
"anexos": ["pdf", "xml"],
"assunto": null,
"criadoEm": "2026-09-28T12:00:00Z",
"enviadoEm": null,
"atualizadoEm": "2026-09-28T14:00:30Z"
}
status*
stringE-mail status
motivoFalha*
stringFailure reason

* Required field