# Get audit events

`GET /v1/organizations/{organizationId}/audit-events`

Available as MCP tool `get-audit-events` (Read).

Audit endpoints allow you to review audit event metadata, including relevant timestamps and statuses, or the actual payload.

Currently, you can retrieve a list of audit events.

### Get audit events

Retrieve audit events with their related metadata and payloads based on the criteria you specify with query parameters. Typically, you can use this if you're monitoring user activity within your organization and want to get an idea of what happened and when.

Only Redox organization owners or admins can use this endpoint.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `organizationId` | path | string | Yes | Identifies the Redox organization that you're operating in. |
| `userId` | query | number | No | Filter all audit events to a specific user based on the Redox user id. |
| `startDateTime` | query | string | No | Contains the date-time in ISO 8601 format to define the beginning of the date range for the audit events you want to review. |
| `stopDateTime` | query | string | No | Contains the date-time in ISO 8601 format to define the end of the date range for the audit events you want to review. |
| `status` | query | string | No | Specifies that you want to search for audit events with the indicated status. |
| `actionType` | query | array | No | Specifies the type of audit event to search for. |
| `resourceType` | query | string | No | Specifies the type of resource to query on. This is a parameter pair with resourceId. For `source`, `destination`, and `subscription`, the results include the resource's own events and every event that affected it, such as a filter, config modifier, or translation set link that was added or removed, an edit to a linked asset, or a change to an auth credential it uses. This history covers events recorded after October 2026. |
| `resourceId` | query | string | No | The unique identifier of the resource for which to retrieve audit events. This is a parameter pair with resourceType. |
| `_page` | query | number | No | Identifies a specific page of results to return. This value typically comes from a previous response's `page` object. |
| `_count` | query | number | No | Defines the number of results to return per page. The maximum value per page is 50. |

## Request example

```bash
curl 'https://api.redoxengine.com/platform/v1/organizations/{organizationId}/audit-events' \
--request GET \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json'
```

## Responses

### 200

Contains a `payload` object with the requested returned audit events in a `results` array.

Contains the payload and metadata returned for `Get Audit Events`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No | Contains the metadata information for the returned results, including version and pagination information. |
| `meta.version` | string | No | Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences. |
| `meta.page` | object | No | Contains the pagination data for the returned results. |
| `meta.page.currentPage` | integer | No | Displays the current page number of returned results you're viewing. |
| `meta.page.pageType` | string | No | Displays the type of pagination supported for the returned results. Currently, we only support the `offset` type, which determines the page number by taking the page size and offsetting the number of records from the start. |
| `meta.page.pageSize` | integer | No | Displays the number of results included in each page. |
| `meta.page.links` | object | No | Contains the related pagination links for the returned results. |
| `meta.page.links.self` | string | No | Links to the current page of results. |
| `meta.page.links.next` | string | No | Links to the next page of results. |
| `meta.page.links.first` | string | No | Links to the first page of results. |
| `payload` | object | No |  |
| `payload.results` | Array of object | No |  |
| `payload.results[].id` | string | No | Displays the unique identifier of the audit event. |
| `payload.results[].organizationId` | number | No | Identifies the specific Redox organization where the audit event occurred. This field matches the organization ID specified in the request. |
| `payload.results[].user` | object | No | Contains details about the user that performed the event. |
| `payload.results[].user.id` | number | Yes | Displays the unique identifier of the user that performed the audit event. |
| `payload.results[].user.email` | string | Yes | Displays the email of the user that performed the audit event. |
| `payload.results[].user.fullName` | string | No | Displays the full name of the user that performed the audit event. |
| `payload.results[].requestIp` | string | No | Specifies the IP of the client that performed the audit event. |
| `payload.results[].route` | string | No | The original request route that resulted in this auditable event. |
| `payload.results[].createdAt` | string | No | Displays the date-time in ISO 8601 format for when the audit event occurred. |
| `payload.results[].type` | string | No | Indicates the type of audit event that occurred. Possible values: asset-copy-operation, asset-link-operation, asset-promotion-operation, auth-credential-operation, auth-credential-viewed, configuration-modifier-link-operation, configuration-modifier-link-viewed, configuration-modifier-operation, configuration-modifier-restore-version, configuration-modifier-viewed, configurations-operation, connection-operation, customer-alert-link-operation, customer-alert-link-viewed, customer-alert-operation, customer-alert-viewed, customer-filter-link-operation, customer-filter-link-viewed, customer-filter-operation, customer-filter-restore-version, customer-filter-viewed, data-on-demand-operation, destination-operation, dev-tools-operation, edge-gateway-job-operation, group-member-added, group-member-removed, group-operation, group-role-changed, group-role-removed, log-inspected, log-payload-viewed, log-retried, log-search, log-summary-operation, oauth-authorization-operation, oauth2-api-key-operation, onramps-empi-admin-operation, organization-audit-viewed, organization-auth-operation, organization-loaded, organization-operation, port-map-operation, queue-job-deleted, queue-purged, redox-base-config-assignment-operation, redox-filter-operation, service-account-operation, slug-operation, source-operation, transaction-audit-viewed, translation-set-link-operation, translation-set-link-viewed, translation-set-operation, translation-set-restore-version, translation-set-viewed, user-env-role-changed, user-env-role-removed, user-invited, user-joined, user-operation, user-org-role-changed, user-permissions-updated, user-removed, user-script-operation, value-set-operation, value-set-viewed, vpn-operation |
| `payload.results[].status` | string | No | Defines the current status of the audit event. Possible values: attempted, successful, unauthorized, unauthenticated, failed |
| `payload.results[].details` | object | No | Contains any extra details about the audit event. Different audit types may include a different set of details. |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "meta": {
    "version": "1.0.0",
    "page": {
      "currentPage": 1,
      "pageType": "offset",
      "pageSize": 50,
      "links": {
        "self": "/organizations/12345/logs",
        "next": "/organizations/12345/logs?_page=2&_count=50",
        "first": "/organizations/12345/logs?_page=1&_count=50"
      }
    }
  },
  "payload": {
    "results": [
      {
        "id": "ec126522-7d0f-4c5d-a65c-9ff2c0156d8a",
        "organizationId": 122,
        "user": {
          "id": 3363,
          "fullName": "Joe Smith",
          "email": "joe.smith@not-email.com"
        },
        "requestIp": "8.8.8.8",
        "route": "/organization/122",
        "createdAt": "2023-09-29T15:19:34.815+00:00",
        "type": "user-invited",
        "status": "successful",
        "details": {
          "method": "fetched",
          "invitor": 3363,
          "inviteeEmail": "an.email@email.com"
        }
      }
    ]
  }
}
```

### 400

Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Bad Request`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Bad Request",
      "code": "validation.error.bad.request",
      "detail": "Error details",
      "status": 400,
      "transient": false
    }
  }
}
```

### 500

Internal Server Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Failed in step X`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Internal Server Error",
      "code": "failed.db.lookup",
      "detail": "Error details",
      "status": 500,
      "transient": true
    }
  }
}
```
