# The Activity Log object

### The Activity Log object

```json
{
  "id": "accact_1SdeybAiQNL8swvtMHyVtfCU",
  "object": "v2.iam.activity_log",
  "created": "2025-01-01T00:00:00.000Z",
  "type": "api_key_created",
  "livemode": true,
  "context": "acct_1SdeybAiQNL8swvt",
  "actor": {
    "type": "user",
    "user": {
      "email": "user@example.com"
    }
  },
  "details": {
    "type": "api_key",
    "api_key": {
      "id": "mk_1SdeybAiQNL8swvtMHyVtfCU",
      "created": "2025-01-01T00:00:00.000Z",
      "type": "secret_key",
      "name": "My API Key",
      "note": "",
      "expires_at": null,
      "ip_allowlist": [],
      "new_key": null,
      "managed_by": null
    }
  }
}
```

## Attributes

- `id` (string)
  Unique identifier of the activity log entry.

- `object` (string, value is "v2.iam.activity_log")
  String representing the object’s type. Objects of the same type share the same value of the object field.

- `actor` (object)
  The actor that performed the action.

  - `actor.api_key` (object, nullable)
    Set when the actor is an API key.

    - `actor.api_key.id` (string)
      Unique identifier of the API key.

  - `actor.type` (enum)
    The type of actor.
Possible enum values:
    - `api_key`
      An API key actor.

    - `user`
      A user actor.

  - `actor.user` (object, nullable)
    Set when the actor is a user.

    - `actor.user.email` (string)
      Email address of the user.

- `context` (string)
  The account on which the action was performed.

- `created` (timestamp)
  Timestamp when the activity log entry was created.

- `details` (object)
  Action-specific details of the activity log entry.

  - `details.api_key` (object, nullable)
    Details of an API key action.

    - `details.api_key.id` (string)
      Unique identifier of the API key.

    - `details.api_key.created` (timestamp)
      Timestamp when the API key was created.

    - `details.api_key.expires_at` (timestamp, nullable)
      Timestamp when the API key expires.

    - `details.api_key.ip_allowlist` (array of strings)
      List of IP addresses allowed to use this API key.

    - `details.api_key.managed_by` (object, nullable)
      Information about the entity managing this API key.

      - `details.api_key.managed_by.application` (object, nullable)
        An application.

        - `details.api_key.managed_by.application.id` (string)
          Identifier of the application.

      - `details.api_key.managed_by.type` (enum)
        The type of entity.
Possible enum values:
        - `application`
          Application.

    - `details.api_key.name` (string, nullable)
      Name of the API key.

    - `details.api_key.new_key` (string, nullable)
      Unique identifier of the new API key, set when this key was rotated.

    - `details.api_key.note` (string, nullable)
      Note or description for the API key.

    - `details.api_key.type` (enum)
      Type of the API key.
Possible enum values:
      - `publishable_key`
        A publishable API key.

      - `secret_key`
        A secret API key.

  - `details.type` (enum)
    The action group type of the activity log entry.
Possible enum values:
    - `api_key`
      An API key related action group.

    - `user_invite`
      A user invite related action group.

    - `user_roles`
      User roles related action group.

  - `details.user_invite` (object, nullable)
    Details of a user invite action.

    - `details.user_invite.invited_user_email` (string)
      Email address of the invited user.

    - `details.user_invite.roles` (array of strings)
      Roles assigned to the invited user.

  - `details.user_roles` (object, nullable)
    Details of a user role change action.

    - `details.user_roles.new_roles` (array of strings)
      Roles the user has after the change.

    - `details.user_roles.old_roles` (array of strings)
      Roles the user had before the change.

    - `details.user_roles.user_email` (string)
      Email address of the user whose roles were changed.

- `livemode` (boolean)
  Whether the action was performed in live mode.

- `type` (enum)
  The type of action that was performed.
Possible enum values:
  - `api_key_created`
    An API key was created.

  - `api_key_deleted`
    An API key was deleted.

  - `api_key_updated`
    An API key was updated.

  - `api_key_viewed`
    An API key’s secret was viewed.

  - `user_invite_accepted`
    A user invite was accepted.

  - `user_invite_created`
    A user invite was created.

  - `user_invite_deleted`
    A user invite was deleted.

  - `user_roles_deleted`
    A user’s roles were deleted.

  - `user_roles_updated`
    A user’s roles were updated.
