Skip to content

List user actions and configuration changes within this organization.

GET
/organization/audit_logs

Authorizations

Parameters

Query Parameters

effective_at

Return only events whose effective_at (Unix seconds) is in this range.

object
gt

Return only events whose effective_at (Unix seconds) is greater than this value.

integer
gte

Return only events whose effective_at (Unix seconds) is greater than or equal to this value.

integer
lt

Return only events whose effective_at (Unix seconds) is less than this value.

integer
lte

Return only events whose effective_at (Unix seconds) is less than or equal to this value.

integer
project_ids[]
Array<string>

Return only events for these projects.

event_types[]
Array<string>
Allowed values: api_key.created api_key.updated api_key.deleted invite.sent invite.accepted invite.deleted login.succeeded login.failed logout.succeeded logout.failed organization.updated project.created project.updated project.archived service_account.created service_account.updated service_account.deleted user.added user.updated user.deleted

Return only events with a type in one of these values. For example, project.created. For all options, see the documentation for the audit log object.

actor_ids[]
Array<string>

Return only events performed by these actors. Can be a user ID, a service account ID, or an api key tracking ID.

actor_emails[]
Array<string>

Return only events performed by users with these emails.

resource_ids[]
Array<string>

Return only events performed on these targets. For example, a project ID updated.

limit
integer
default: 20

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

after
string

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

before
string

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

Responses

200

Audit logs listed successfully.

object
object
required
string
Allowed values: list
data
required
Array<object>

A log of a user action or configuration change within this organization.

object
id
required

The ID of this log.

string
type
required

The event type.

string
Allowed values: api_key.created api_key.updated api_key.deleted invite.sent invite.accepted invite.deleted login.succeeded login.failed logout.succeeded logout.failed organization.updated project.created project.updated project.archived service_account.created service_account.updated service_account.deleted user.added user.updated user.deleted
effective_at
required

The Unix timestamp (in seconds) of the event.

integer
project

The project that the action was scoped to. Absent for actions not scoped to projects.

object
id

The project ID.

string
name

The project title.

string
actor
required

The actor who performed the audit logged action.

object
type

The type of actor. Is either session or api_key.

string
Allowed values: session api_key
session

The session in which the audit logged action was performed.

object
user

The user who performed the audit logged action.

object
id

The user id.

string
email

The user email.

string
ip_address

The IP address from which the action was performed.

string
api_key

The API Key used to perform the audit logged action.

object
id

The tracking id of the API key.

string
type

The type of API key. Can be either user or service_account.

string
Allowed values: user service_account
user

The user who performed the audit logged action.

object
id

The user id.

string
email

The user email.

string
service_account

The service account that performed the audit logged action.

object
id

The service account id.

string
api_key.created

The details for events with this type.

object
id

The tracking ID of the API key.

string
data

The payload used to create the API key.

object
scopes

A list of scopes allowed for the API key, e.g. ["api.model.request"]

Array<string>
api_key.updated

The details for events with this type.

object
id

The tracking ID of the API key.

string
changes_requested

The payload used to update the API key.

object
scopes

A list of scopes allowed for the API key, e.g. ["api.model.request"]

Array<string>
api_key.deleted

The details for events with this type.

object
id

The tracking ID of the API key.

string
invite.sent

The details for events with this type.

object
id

The ID of the invite.

string
data

The payload used to create the invite.

object
email

The email invited to the organization.

string
role

The role the email was invited to be. Is either owner or member.

string
invite.accepted

The details for events with this type.

object
id

The ID of the invite.

string
invite.deleted

The details for events with this type.

object
id

The ID of the invite.

string
login.failed

The details for events with this type.

object
error_code

The error code of the failure.

string
error_message

The error message of the failure.

string
logout.failed

The details for events with this type.

object
error_code

The error code of the failure.

string
error_message

The error message of the failure.

string
organization.updated

The details for events with this type.

object
id

The organization ID.

string
changes_requested

The payload used to update the organization settings.

object
title

The organization title.

string
description

The organization description.

string
name

The organization name.

string
settings
object
threads_ui_visibility

Visibility of the threads page which shows messages created with the Assistants API and Playground. One of ANY_ROLE, OWNERS, or NONE.

string
usage_dashboard_visibility

Visibility of the usage dashboard which shows activity and costs for your organization. One of ANY_ROLE or OWNERS.

string
project.created

The details for events with this type.

object
id

The project ID.

string
data

The payload used to create the project.

object
name

The project name.

string
title

The title of the project as seen on the dashboard.

string
project.updated

The details for events with this type.

object
id

The project ID.

string
changes_requested

The payload used to update the project.

object
title

The title of the project as seen on the dashboard.

string
project.archived

The details for events with this type.

object
id

The project ID.

string
service_account.created

The details for events with this type.

object
id

The service account ID.

string
data

The payload used to create the service account.

object
role

The role of the service account. Is either owner or member.

string
service_account.updated

The details for events with this type.

object
id

The service account ID.

string
changes_requested

The payload used to updated the service account.

object
role

The role of the service account. Is either owner or member.

string
service_account.deleted

The details for events with this type.

object
id

The service account ID.

string
user.added

The details for events with this type.

object
id

The user ID.

string
data

The payload used to add the user to the project.

object
role

The role of the user. Is either owner or member.

string
user.updated

The details for events with this type.

object
id

The project ID.

string
changes_requested

The payload used to update the user.

object
role

The role of the user. Is either owner or member.

string
user.deleted

The details for events with this type.

object
id

The user ID.

string
first_id
required
string
audit_log-defb456h8dks
last_id
required
string
audit_log-hnbkd8s93s
has_more
required
boolean