# Adds programmatic access to account activity logs ## What’s new Adds programmatic access to your account’s security history through the [Activity Logs API](https://docs.stripe.com/api/v2/iam/activity-logs.md?api-version=2026-04-22.preview). Retrieve detailed logs of security-related activities across your Stripe account, including API key management, user invitations, and role changes. The new API adds the [List activity logs](https://docs.stripe.com/api/v2/iam/activity-logs/list.md?api-version=2026-04-22.preview) endpoint. This endpoint retrieves a paginated list of activity logs with filtering options. The API tracks the following action types: - **API key actions**: Creation, deletion, updates, and viewing of API keys (`api_key_created`, `api_key_deleted`, `api_key_updated`, `api_key_viewed`) - **User invitation actions**: Creating, deleting, and accepting user invitations (`user_invite_created`, `user_invite_deleted`, `user_invite_accepted`) - **User role actions**: Updates and deletions of user roles (`user_roles_updated`, `user_roles_deleted`) Each [ActivityLog](https://docs.stripe.com/api/v2/iam/activity-logs/object.md?api-version=2026-04-22.preview) object contains details about the event, including the actor, timestamp, affected resources, and contextual metadata. ## Impact Build automated security monitoring and compliance reporting systems by integrating with the Activity Logs API. This enables you to: - Monitor API key lifecycle events for security auditing - Track user access changes and role modifications - Create custom alerting systems for suspicious activities - Integrate activity data with external SIEM systems Previously, this security information was available through the Dashboard, requiring manual review and limiting automation capabilities. To learn how to programmatically access your account’s security history, see [Activity logs](https://docs.stripe.com/activity-logs.md). ## Changes #### REST API | Endpoint | Change | Resource | | -------- | ------ | ------------------------------------------------------------------------------------------------------------ | | `list` | Added | [V2.Iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### Ruby | Method | Change | Resource | | ------ | ------ | -------------------------------------------------------------------------------------------------------------- | | `list` | Added | [V2::Iam::ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### Python | Method | Change | Resource | | ------ | ------ | ------------------------------------------------------------------------------------------------------------ | | `list` | Added | [v2.iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### PHP | Method | Change | Resource | | ------ | ------ | ------------------------------------------------------------------------------------------------------------ | | `all` | Added | [V2.Iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### Java | Method | Change | Resource | | ------ | ------ | ------------------------------------------------------------------------------------------------------------ | | `list` | Added | [v2.iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### Node.js | Method | Change | Resource | | ------ | ------ | ------------------------------------------------------------------------------------------------------------ | | `list` | Added | [V2.Iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### Go | Method | Change | Resource | | ------ | ------ | ---------------------------------------------------------------------------------------------------------- | | `List` | Added | [V2IamActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | #### .NET | Method | Change | Resource | | ------ | ------ | ------------------------------------------------------------------------------------------------------------ | | `List` | Added | [V2.Iam.ActivityLog](/api/v2/iam/activity-logs/object?api-version=2026-04-22.preview#v2_activity_log_object) | ## Upgrade #### REST API 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. If you use an SDK, upgrade to the corresponding SDK version for this API version. - If you don’t use an SDK, update your [API requests](https://docs.stripe.com/api/versioning.md) to include `Stripe-Version: 2026-04-22.preview` 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### Ruby 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your Ruby SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### Python 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your Python SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### PHP 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your PHP SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### Java 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your Java SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### Node.js 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your Node SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### Go 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your Go SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md). #### .NET 1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench. 1. Upgrade your .NET SDK to the latest version. 1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md). 1. [Test your integration](https://docs.stripe.com/testing.md) against the new version. 1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md). 1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours. Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).