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

# List Events

> Lista events.

Lista `events` em ordem decrescente de criação. Events ficam disponíveis por
30 dias; eventos mais antigos não aparecem na listagem.

## Filtros

<ParamField query="type" type="string">
  Filtra por tipo de evento, ex.: `customer.updated`.
</ParamField>

<ParamField query="object_type" type="string">
  Filtra pelo tipo do recurso afetado, ex.: `subscription`, `checkout.session`.
</ParamField>

<ParamField query="related_object" type="string">
  Filtra pelos eventos de um recurso específico, pelo ID público dele
  (ex.: `sub_123`). Útil para montar a linha do tempo de um recurso.
</ParamField>

<ParamField query="created_at[gte]" type="string">
  Eventos criados a partir do timestamp informado (ISO 8601). Também aceita
  `created_at[gt]`, `created_at[lte]` e `created_at[lt]`.
</ParamField>

<ParamField query="limit" type="integer">
  Quantidade de itens, de `1` a `100`. Padrão `10`.
</ParamField>

<ParamField query="starting_after" type="string">
  Cursor para a próxima página (ID de um event).
</ParamField>

<ParamField query="ending_before" type="string">
  Cursor para a página anterior (ID de um event).
</ParamField>

<RequestExample>
  ```bash cURL theme={}
  curl -X GET "https://api.chargefy.io/v1/events?type=customer.updated&limit=10" \
    -H "Authorization: Bearer {{API_KEY}}"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={}
  {
    "object": "list",
    "data": [
      {
        "id": "evt_123",
        "object": "event",
        "created_at": "2026-05-27T14:09:27Z",
        "data": {
          "object": {
            "id": "cus_123",
            "object": "customer",
            "created_at": "2026-05-27T14:09:20Z",
            "email": "ana@example.com",
            "livemode": true,
            "metadata": {},
            "name": "Ana Souza"
          },
          "previous_attributes": {
            "name": "Ana"
          }
        },
        "livemode": true,
        "organization": "org_123",
        "request": {
          "id": "req_123"
        },
        "type": "customer.updated"
      }
    ],
    "has_more": false,
    "url": "/v1/events"
  }
  ```

  ```json 400 theme={}
  {
    "error": {
      "code": "invalid_request",
      "message": "limit must be between 1 and 100.",
      "param": "limit",
      "type": "invalid_request_error"
    }
  }
  ```
</ResponseExample>
