Event types parameter for audit logs API with multiple events filter

I am trying to make an API call to /v1/organization/audit_logs. Here I am using a parameter for event_types as in /v1/organization/audit_logs?event_types=[invite.accepted,user.deleted]

However the response is

{
“error”: {
“message”: “Invalid type for ‘event_types’: expected an array of one of ‘api…ted’, ‘api…ted’, ‘api…ted’, ‘invite.sent’, ‘inv…ted’, ‘inv…ted’, ‘login.failed’, ‘log…ded’, ‘log…led’, ‘log…ded’, ‘org…ted’, ‘pro…ted’, ‘pro…ted’, ‘pro…ted’, ‘ser…ted’, ‘ser…ted’, ‘ser…ted’, ‘user.added’, ‘user.updated’, or ‘user.deleted’, but got a string instead.”,
“type”: “invalid_request_error”,
“param”: “event_types”,
“code”: “invalid_type”
}
}

Can someone please help me on how to pass multiple events to event_types parameter in /v1/organization/audit_logs?

1 Like

Please note that i could get this API working for single event type like v1/organization/audit_logs?event_types=invite.accepted.

1 Like

I am looking at this and can confirm both the problem with some types and with passing in multiples… trying to troubleshoot!

curl --location --globoff 'https://api.openai.com/v1/organization/audit_logs?event_types[]=project.updated&event_types[]=project.created