# Event Subscription API

The Event Subscription API allows you to manage subscriptions to specific event types.

## Pagination Parameters
- **ending_before** (string): A cursor representing an item's token before which a page of results should end. Used to retrieve the previous page of results before this item.
- **page_size** (integer): Page size (for pagination). Ranges from 1 to 100 (Defaults to 50).
- **starting_after** (string): A cursor representing an item's token after which a page of results should begin. Used to retrieve the next page of results after this item.

## Response Structure
### HTTP Status Code: `200 OK`

#### Response Body
```json
{
  "data": [
    {
      "description": "A subscription for all events",
      "disabled": false,
      "token": "ep_1srOrx2ZWZBpBUvZwXKQmoEYga1",
      "url": "https://example.com/webhook"
    }
  ],
  "has_more": false
}
```

## Event Types
The type of event that occurred can include:
- `account_holder_document.updated`
- `account_holder.created`
- `account_holder.updated`
- `account_holder.verification`
- `auth_rules.backtest_report.created`
- `balance.updated`
- `book_transfer_transaction.created`
- `book_transfer_transaction.updated`
- `card_authorization.challenge`
- `card_authorization.challenge_response`
- `card_transaction.enhanced_data.created`
- `card_transaction.enhanced_data.updated`
- `card_transaction.updated`
- `card.converted`
- `card.created`
- `card.reissued`
- `card.renewed`
- `card.shipped`
- `card.updated`
- `claim_document.accepted`
- `claim_document.rejected`
- `claim_document.uploaded`
- `claim.created`
- `claim.updated`
- `digital_wallet.tokenization_result`
- `dispute_evidence.upload_failed`
- `dispute_transaction.created`
- `dispute_transaction.updated`
- `dispute.updated`
- `embed.session_generated`
- `embed.viewed`
- `external_bank_account.created`
- `external_bank_account.updated`
- `external_payment.created`
- `external_payment.updated`
- `financial_account.created`
- `financial_account.updated`
- `funding_event.created`
- `internal_transaction.created`
- `internal_transaction.updated`
- `loan_tape.created`
- `loan_tape.updated`
- `management_operation.created`
- `management_operation.updated`
- `network_total.created`
- `network_total.updated`
- `payment_transaction.created`
- `payment_transaction.updated`
- `settlement_report.updated`
- `statements.created`
- `three_ds_authentication.challenge`
- `three_ds_authentication.created`
- `three_ds_authentication.updated`
- `tokenization.approval_request`
- `tokenization.result`
- `tokenization.updated`

## Example API Request
```shell
curl --request GET \
     --url 'https://sandbox.lithic.com/v1/event_subscriptions?page_size=50' \
     --header 'accept: application/json'
```

## Error Codes
- **400**: A parameter in the query is invalid.
- **401**: User has not been authenticated.
- **422**: Unprocessable entity.
- **429**: Client has exceeded the number of allowed requests.
