> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

Events record meaningful changes to resources in your organization.

When something changes, Syntage creates an Event resource. For example, submitting an entity's SAT credential can create credential and entity events, and a completed extraction can create an `extraction.updated` event.

Many requests can create more than one event. For example, submitting valid SAT credentials for an entity can create `credential.created`, `credential.updated`, and `link.created` events.

Events occur when the state of another resource changes. The state of that resource at the time of the change is embedded in the event's `data` field. For example, a `credential.updated` event contains a Credential, and an `invoice.updated` event contains an Invoice.

Use the Events endpoints to retrieve recent events directly. Use [webhooks](/resources/webhooks) when you want Syntage to deliver events to your server automatically.

<Note>Access to events is only guaranteed for 7 days.</Note>

<Info>
  Entity lifecycle events still use the `link.*` event type names for backwards compatibility.
</Info>

## How Events Are Used

1. Subscribe to [webhooks](/resources/webhooks) when your integration needs to react automatically to resource changes.
2. Store the event ID from each webhook request or Events response so your integration can deduplicate processing.
3. Use `type` to route the event to the correct handler.
4. Use `resource` to retrieve the current version of the changed resource when needed.
5. Use `data.object` when you need the resource state captured at the time the event was created.

The Events endpoints are useful for backfills, debugging, and reconciliation. Webhooks are the best fit for ongoing delivery.

For implementation details, see [Event examples](/developers/event-examples).

## Event Types

The suffix describes the kind of change:

| Suffix     | Meaning                                           |
| ---------- | ------------------------------------------------- |
| `.created` | A new resource was created.                       |
| `.updated` | An existing resource changed.                     |
| `.deleted` | A resource was deleted or is no longer available. |

| Resource                      | Event types                                                                                    |
| ----------------------------- | ---------------------------------------------------------------------------------------------- |
| Credentials                   | `credential.created`, `credential.updated`, `credential.deleted`                               |
| Entities                      | `link.created`, `link.updated`, `link.deleted`                                                 |
| Files                         | `file.created`                                                                                 |
| Extractions                   | `extraction.created`, `extraction.updated`                                                     |
| Exports                       | `export.created`, `export.updated`                                                             |
| Invoices                      | `invoice.created`, `invoice.updated`, `invoice.deleted`                                        |
| Invoice payments              | `invoice_payment.created`, `invoice_payment.updated`                                           |
| Invoice line items            | `invoice_line_item.created`, `invoice_line_item.updated`                                       |
| Tax returns                   | `tax_return.created`, `tax_return.updated`, `tax_return.deleted`                               |
| Tax status                    | `tax_status.created`, `tax_status.updated`, `tax_status.deleted`                               |
| Tax compliance checks         | `tax_compliance_check.created`, `tax_compliance_check.updated`, `tax_compliance_check.deleted` |
| Tax retentions                | `tax_retention.created`, `tax_retention.updated`, `tax_retention.deleted`                      |
| Electronic accounting records | `electronic_accounting_record.created`, `electronic_accounting_record.updated`                 |
| RPC entidades                 | `rpc_entidades.created`, `rpc_entidades.updated`                                               |
| RPC socios                    | `rpc_socios.created`, `rpc_socios.updated`                                                     |
| RPC actos                     | `rpc_acto.created`, `rpc_acto.updated`                                                         |
| Shareholder relations         | `shareholder_relation.created`, `shareholder_relation.updated`                                 |
| Shareholder relation sources  | `shareholder_relation_source.created`                                                          |
| RUG garantias                 | `rug_garantia.created`, `rug_garantia.updated`                                                 |
| Buró de Crédito reports       | `buro_de_credito_report.created`, `buro_de_credito_report.updated`                             |
| Background checks             | `background_check.created`                                                                     |
| SAT certificates              | `sat_certificate.created`, `sat_certificate.updated`                                           |
| Company verification reports  | `company_verification_report.created`, `company_verification_report.updated`                   |
