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

# Events

> An audit log entry recording an action taken within a workspace, capturing who acted, when, and from which source.

This resource represents an audit log entry that records an action taken within a workspace. Each entry captures who performed an action, when it occurred, and from where (source).

Note that List Audit Log Entries is available for all workspaces. Creating custom audit log entries via `customEvent.*` is an action only available on the [Enterprise plan](https://app.assembly.com/settings/plans).

## Properties

**id** `string`\
The unique identifier for this item.

**createdAt** `string`\
The date this item was created in RFC3339 format.

**object** `string`\
The object type of this resource.

**eventType** `string`\
The type of action that was recorded. See [Event Types](#event-types) for the full set of values.

**eventDescription** `string`\
A human-readable description of the event.

**source** `web / platform / automation / system`\
Where the event originated:

| Source       | Description                                                                      |
| ------------ | -------------------------------------------------------------------------------- |
| `web`        | Action performed by a user via the Assembly webapp (dashboard or client portal). |
| `platform`   | Action performed via the Platform API using an API key.                          |
| `automation` | Action performed by an automation/workflow.                                      |
| `system`     | Action performed by the system (webhooks, background jobs).                      |

**actorId** `string` (optional)\
The ID of the user who performed the action. This will be empty for actions not attributable to a user.

**actorType** `internalUser / clientUser` (optional)\
The type of entity the `actorId` refers to.

**companyId** `string` (optional)\
The ID of the company associated with the event, if applicable.

**automationId** `string` (optional)\
The ID of the automation that triggered the event. This is populated when `source` is `automation`.

**userAgent** `string` (optional)\
The browser/client user agent string of the request origin.

**ip** `string` (optional)\
The IP address of the request origin.

**context** `object` (optional)\
Event-specific metadata. The shape of this object varies by `eventType`.

## Event Types

The `eventType` property is one of the following values, grouped by category.

### Authentication

| Event Type           | Description             |
| -------------------- | ----------------------- |
| `userLoggedIn`       | User logged in          |
| `userLoggedOut`      | User logged out         |
| `userLoginSucceeded` | User login succeeded    |
| `userLoginFailed`    | User login failed       |
| `passwordReset`      | Password reset          |
| `passwordChanged`    | Password changed        |
| `googleDelinked`     | Google account delinked |
| `magicLinkSent`      | Magic link sent         |

### Session

| Event Type       | Description     |
| ---------------- | --------------- |
| `sessionStarted` | Session started |
| `sessionEnded`   | Session ended   |

### Workspace Settings

| Event Type             | Description            |
| ---------------------- | ---------------------- |
| `workspaceMfaEnabled`  | Workspace MFA enabled  |
| `workspaceMfaDisabled` | Workspace MFA disabled |

### Client

| Event Type                  | Description                  |
| --------------------------- | ---------------------------- |
| `clientCreated`             | Client created               |
| `clientActivated`           | Client activated             |
| `clientUpdated`             | Client updated               |
| `clientDeleted`             | Client deleted               |
| `clientInvited`             | Client invited               |
| `clientCustomFieldsUpdated` | Client custom fields updated |

### Company

| Event Type                   | Description                   |
| ---------------------------- | ----------------------------- |
| `companyCreated`             | Company created               |
| `companyUpdated`             | Company updated               |
| `companyDeleted`             | Company deleted               |
| `companyCustomFieldsUpdated` | Company custom fields updated |

### File

| Event Type            | Description            |
| --------------------- | ---------------------- |
| `fileCreated`         | File created           |
| `fileUpdated`         | File updated           |
| `fileDeleted`         | File deleted           |
| `fileDownloaded`      | File downloaded        |
| `fileBatchDownloaded` | Files batch downloaded |
| `fileBatchDeleted`    | Files batch deleted    |

### Folder

| Event Type      | Description    |
| --------------- | -------------- |
| `folderCreated` | Folder created |
| `folderUpdated` | Folder updated |
| `folderDeleted` | Folder deleted |

### Link

| Event Type    | Description  |
| ------------- | ------------ |
| `linkCreated` | Link created |
| `linkUpdated` | Link updated |
| `linkDeleted` | Link deleted |

### Invoice

| Event Type          | Description        |
| ------------------- | ------------------ |
| `invoiceCreated`    | Invoice created    |
| `invoiceUpdated`    | Invoice updated    |
| `invoiceDeleted`    | Invoice deleted    |
| `invoicePaid`       | Invoice paid       |
| `invoiceVoided`     | Invoice voided     |
| `invoiceDownloaded` | Invoice downloaded |
| `refundRequested`   | Refund requested   |

### Payment

| Event Type         | Description       |
| ------------------ | ----------------- |
| `paymentSucceeded` | Payment succeeded |
| `paymentFailed`    | Payment failed    |

### Subscription

| Event Type              | Description            |
| ----------------------- | ---------------------- |
| `subscriptionCreated`   | Subscription created   |
| `subscriptionCancelled` | Subscription cancelled |

### Product & Price

| Event Type       | Description     |
| ---------------- | --------------- |
| `productCreated` | Product created |
| `productUpdated` | Product updated |
| `priceCreated`   | Price created   |

### Message

| Event Type              | Description             |
| ----------------------- | ----------------------- |
| `messageSent`           | Message sent            |
| `messageChannelCreated` | Message channel created |
| `messageChannelDeleted` | Message channel deleted |

### Task

| Event Type      | Description    |
| --------------- | -------------- |
| `taskCreated`   | Task created   |
| `taskUpdated`   | Task updated   |
| `taskDeleted`   | Task deleted   |
| `taskArchived`  | Task archived  |
| `taskCompleted` | Task completed |

### Contract

| Event Type           | Description         |
| -------------------- | ------------------- |
| `contractRequested`  | Contract requested  |
| `contractCompleted`  | Contract signed     |
| `contractDownloaded` | Contract downloaded |

### Form

| Event Type              | Description             |
| ----------------------- | ----------------------- |
| `formCreated`           | Form created            |
| `formEdited`            | Form edited             |
| `formAssigned`          | Form assigned           |
| `formResponseCompleted` | Form response completed |

### Note

| Event Type    | Description  |
| ------------- | ------------ |
| `noteCreated` | Note created |
| `noteUpdated` | Note updated |
| `noteDeleted` | Note deleted |

### Internal User

| Event Type                        | Description                         |
| --------------------------------- | ----------------------------------- |
| `internalUserCreated`             | Internal user created               |
| `internalUserDeleted`             | Internal user deleted               |
| `internalUserAccessLevelChanged`  | Internal user access level changed  |
| `internalUserClientVisibilitySet` | Internal user client visibility set |

### API Key

| Event Type      | Description     |
| --------------- | --------------- |
| `apiKeyCreated` | API key created |
| `apiKeyDeleted` | API key deleted |

### Custom

| Event Type      | Description                                                                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `customEvent.*` | Custom events created via the Platform API. Event types are prefixed with `customEvent.` (e.g. `customEvent.userOnboarded`). Requires Enterprise plan. |

<br />

```json Example Audit Log Entry theme={null}
{
  "id": "bb9405f0-8644-4bb8-bbc8-84a1a05dcc01",
  "object": "auditLogEntry",
  "createdAt": "2024-02-22T18:17:01.577287641+05:30",
  "eventType": "invoicePaid",
  "eventDescription": "Invoice paid",
  "source": "web",
  "actorId": "5d686cec-6ef8-4394-a62c-0c2fde950669",
  "actorType": "clientUser",
  "companyId": "d15b1422-2e57-42f3-a0ac-0a726d6e1b42",
  "context": {
    "invoiceId": "3a5981d8-6619-4dc6-b9b9-a791d275bd5c",
    "amount": 12000
  },
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36",
  "ip": "203.0.113.42"
}
```

```json Example Automation Audit Log Entry theme={null}
{
  "id": "f0c2a1d4-1b3e-4f9a-9c7d-2e8b6a4c1f00",
  "object": "auditLogEntry",
  "createdAt": "2024-02-22T18:17:01.577287641+05:30",
  "eventType": "clientInvited",
  "eventDescription": "Client invited",
  "source": "automation",
  "automationId": "9a1f2b3c-4d5e-6f70-8192-a3b4c5d6e7f8",
  "companyId": "d15b1422-2e57-42f3-a0ac-0a726d6e1b42",
  "context": {
    "clientId": "5d686cec-6ef8-4394-a62c-0c2fde950669"
  }
}
```
