Filing Webhooks

Brinta sends a webhook every time something happens to a filing: its results are ready, a user approves it, it is filed. Use it to know when to act.

Webhooks only notify. To get the details, call Get a Filing with the filing_id, and List Tax Entries for the tax entries.

How a filing moves

Filed by the client or by Brinta outside the platform:

  setup → in-process → review → ready-to-file → filed

Transmitted by Brinta:

  setup → in-process → review → ready-to-file → preparing-filing → filed
                                                       ↑    ↓
                                              filing-with-errors

From review, a filing can also be closed as not-filed.
StatusWhat it meansWhat you can do
setupThe filing exists and waits for data.Upload the data.
in-processBrinta is processing the data.Wait.
reviewThe results are ready. Validations may still be running.Check them and approve, or fix the data.
ready-to-fileThe filing was approved.Wait for it to be filed.
preparing-filingBrinta is transmitting the filing to the tax authority.Wait.
filing-with-errorsThe tax authority rejected part of the transmission.Fix the data; the filing is transmitted again.
filedThe tax authority received the filing.Download the proof of submission.
not-filedThe filing was closed without filing it.Nothing.

Payload

Every webhook has the same envelope. Fields without a value are not sent.

FieldDescription
resourceAlways filing.
eventWhat happened. See Events.
occurred_atWhen it happened (ISO 8601, UTC).
data.filing_idId (UUID) of the filing.
data.company_idId (UUID) of the company.
data.statusCurrent status.
data.previous_statusStatus before the change. Not sent on the first event.
data.filing_load_idId (UUID) of the processing run. Not sent before the first run.
data.filing_load_typeWhat started the run: client_upload (a data upload), reprocessing (an earlier run processed again) or data_change (data edits).
data.triggered_by{"type": "user", "email": "..."} when a user made the change, {"type": "system"} when Brinta did.

Some events add more data:

FieldSent inDescription
data.tax_entry_idsFrom review on, when the run calculated tax entriesIds of those tax entries. Get each one with Get a Tax Entry.
data.validation_summaryvalidation-finishedstatus (success, warning or error), errors and warnings: how many validations failed or passed with a warning.
data.transmission_summarytransmission-failed and filed, for filings transmitted as separate events (EFD-Reinf, e-Financeira, DeRE)total, transmitted and with_errors events, also per event_type in by_event_type.

Events

The event says what happened; data.status and data.previous_status say where the filing is.

EventStatus after
createdUsually setup
processing-startedin-process
results-readyreview
validation-finishedUnchanged
processing-cancelledsetup
approvedready-to-file
reopenedreview
transmission-startedpreparing-filing
transmission-failedfiling-with-errors
filedfiled
not-filednot-filed
proof-of-submission-addedUnchanged (filed)
status-changedAny

created

The filing was created. It is the first webhook of every filing.

  • Status after: Usually setup.
{
  "resource": "filing",
  "event": "created",
  "occurred_at": "2026-09-01T12:00:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "status": "setup",
    "triggered_by": {
      "type": "system"
    }
  }
}

processing-started

A processing run started: new data was uploaded, an earlier run was reprocessed, or data was edited. filing_load_type says which.

  • Status after: in-process.
{
  "resource": "filing",
  "event": "processing-started",
  "occurred_at": "2026-09-08T14:30:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "filing_load_type": "client_upload",
    "status": "in-process",
    "previous_status": "setup",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    }
  }
}

results-ready

The run finished and the results can be reviewed. Validations may still be running: wait for validation-finished to know their result.

  • Status after: review.
  • Also sends: tax_entry_ids when the run calculated tax entries.
{
  "resource": "filing",
  "event": "results-ready",
  "occurred_at": "2026-09-08T14:42:10Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "filing_load_type": "client_upload",
    "status": "review",
    "previous_status": "in-process",
    "triggered_by": {
      "type": "system"
    },
    "tax_entry_ids": [
      "3f2b8c1e-9d4a-4e6f-b7a2-1c5d8e9f0a12",
      "a8d4e2f1-6b3c-4d9e-8f7a-2b1c3d4e5f67"
    ]
  }
}
{
  "resource": "filing",
  "event": "results-ready",
  "occurred_at": "2026-09-10T09:15:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "review",
    "previous_status": "in-process",
    "triggered_by": {
      "type": "system"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}

validation-finished

The validations of the run finished. They run in the background after results-ready, so a user may have approved the filing before this arrives.

  • Status after: Unchanged.
  • Also sends: validation_summary.
{
  "resource": "filing",
  "event": "validation-finished",
  "occurred_at": "2026-09-08T14:47:30Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "filing_load_type": "client_upload",
    "status": "review",
    "previous_status": "review",
    "triggered_by": {
      "type": "system"
    },
    "tax_entry_ids": [
      "3f2b8c1e-9d4a-4e6f-b7a2-1c5d8e9f0a12",
      "a8d4e2f1-6b3c-4d9e-8f7a-2b1c3d4e5f67"
    ],
    "validation_summary": {
      "status": "warning",
      "errors": 0,
      "warnings": 3
    }
  }
}

processing-cancelled

The run was cancelled and the filing went back to waiting for data. The next run starts with processing-started and a new filing_load_id.

  • Status after: setup.
{
  "resource": "filing",
  "event": "processing-cancelled",
  "occurred_at": "2026-09-09T08:00:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "filing_load_type": "client_upload",
    "status": "setup",
    "previous_status": "review",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    }
  }
}

approved

A user approved the results.

  • Status after: ready-to-file.
  • Also sends: tax_entry_ids.
{
  "resource": "filing",
  "event": "approved",
  "occurred_at": "2026-09-11T16:05:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "ready-to-file",
    "previous_status": "review",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}

reopened

An approved or filed filing went back to review.

  • Status after: review.
  • Also sends: tax_entry_ids.
{
  "resource": "filing",
  "event": "reopened",
  "occurred_at": "2026-09-11T17:00:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "review",
    "previous_status": "ready-to-file",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}

transmission-started

Brinta started transmitting the filing to the tax authority. Only for filings Brinta transmits.

  • Status after: preparing-filing.
  • Also sends: tax_entry_ids.
{
  "resource": "filing",
  "event": "transmission-started",
  "occurred_at": "2026-10-14T13:00:00Z",
  "data": {
    "filing_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "4d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
    "filing_load_type": "client_upload",
    "status": "preparing-filing",
    "previous_status": "ready-to-file",
    "triggered_by": {
      "type": "system"
    }
  }
}

transmission-failed

The tax authority rejected part of the transmission. Fix the data; the filing is processed and transmitted again.

  • Status after: filing-with-errors.
  • Also sends: transmission_summary, for filings transmitted as separate events.
{
  "resource": "filing",
  "event": "transmission-failed",
  "occurred_at": "2026-10-14T18:30:00Z",
  "data": {
    "filing_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "4d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
    "filing_load_type": "client_upload",
    "status": "filing-with-errors",
    "previous_status": "preparing-filing",
    "triggered_by": {
      "type": "system"
    },
    "transmission_summary": {
      "total": 120,
      "transmitted": 118,
      "with_errors": 2,
      "by_event_type": [
        {
          "event_type": "R-2010",
          "total": 80,
          "transmitted": 78,
          "with_errors": 2
        },
        {
          "event_type": "R-4020",
          "total": 40,
          "transmitted": 40,
          "with_errors": 0
        }
      ]
    }
  }
}

filed

The tax authority received the filing. The proof of submission may come with it or later in proof-of-submission-added.

  • Status after: filed.
  • Also sends: tax_entry_ids; transmission_summary for filings transmitted as separate events.
{
  "resource": "filing",
  "event": "filed",
  "occurred_at": "2026-09-12T10:20:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "filed",
    "previous_status": "ready-to-file",
    "triggered_by": {
      "type": "system"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}
{
  "resource": "filing",
  "event": "filed",
  "occurred_at": "2026-10-16T11:10:00Z",
  "data": {
    "filing_id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "4d3c2b1a-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
    "filing_load_type": "client_upload",
    "status": "filed",
    "previous_status": "preparing-filing",
    "triggered_by": {
      "type": "system"
    },
    "transmission_summary": {
      "total": 120,
      "transmitted": 120,
      "with_errors": 0,
      "by_event_type": [
        {
          "event_type": "R-2010",
          "total": 80,
          "transmitted": 80,
          "with_errors": 0
        },
        {
          "event_type": "R-4020",
          "total": 40,
          "transmitted": 40,
          "with_errors": 0
        }
      ]
    }
  }
}

not-filed

The filing was closed without filing it.

  • Status after: not-filed.
  • Also sends: tax_entry_ids.
{
  "resource": "filing",
  "event": "not-filed",
  "occurred_at": "2026-09-15T11:00:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "filing_load_type": "client_upload",
    "status": "not-filed",
    "previous_status": "review",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    },
    "tax_entry_ids": [
      "3f2b8c1e-9d4a-4e6f-b7a2-1c5d8e9f0a12",
      "a8d4e2f1-6b3c-4d9e-8f7a-2b1c3d4e5f67"
    ]
  }
}

proof-of-submission-added

The proof of submission of a filed filing became available. Download it with Get a Filing.

  • Status after: Unchanged (filed).
  • Also sends: tax_entry_ids.
{
  "resource": "filing",
  "event": "proof-of-submission-added",
  "occurred_at": "2026-09-13T09:45:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "filed",
    "previous_status": "filed",
    "triggered_by": {
      "type": "user",
      "email": "[email protected]"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}

status-changed

Any other status change, not covered by the events above. Use status and previous_status.

  • Status after: Any.
{
  "resource": "filing",
  "event": "status-changed",
  "occurred_at": "2026-09-20T10:00:00Z",
  "data": {
    "filing_id": "510e8400-e29b-41d4-a716-446655440012",
    "company_id": "6f1c2e0a-8b3d-4c2f-9a51-3e7d2b9c4f10",
    "filing_load_id": "e1b2c3d4-5f6a-4b7c-8d9e-0f1a2b3c4d5e",
    "filing_load_type": "data_change",
    "status": "ready-to-file",
    "previous_status": "filed",
    "triggered_by": {
      "type": "system"
    },
    "tax_entry_ids": [
      "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"
    ]
  }
}

Cases to handle

  • Validations after approval. A user can approve before the validations finish, or despite errors, so validation-finished can arrive after approved.
  • New run, same status. Processing new data repeats processing-started and results-ready with a new filing_load_id.
  • Duplicates and order. A webhook can be delivered more than once or out of order. The same filing_id, event and occurred_at is the same webhook; order them by occurred_at.