Audit Logs

Get audit logs by scope

GET
/api/v1/audit-logs

Query audit logs at the workspace, organization or environment level, with optional filtering and pagination.

Authorization

AccessToken
Authorization<token>

Use access token to access this API. Example: "Authorization: api-MzQ..."

In: header

Query Parameters

Scope?string

Required. Allowed values (case-sensitive): Environment, Organization, Workspace. Workspace queries are not currently supported and return 403.

ScopeId?string

Required. The environment, organization or workspace ID corresponding to scope. Must not be an empty GUID.

Formatuuid
RefTypes?array<String>

Optional. Allowed values (case-sensitive): FeatureFlag, Segment, Member, Group, Policy. Defaults to the types currently supported by the scope: FeatureFlag and Segment for Environment; Member, Group and Policy for Organization. Types must match the scope. Multiple values match any selected type. Example: refTypes=FeatureFlag&refTypes=Segment.

RefId?string

Optional resource ID, such as a feature flag or segment ID. Used to get audit logs for a specific resource.

CreatorId?string

Optional user or access token ID. Omit to query logs from all creators.

Formatuuid
Query?string

Optional text to search for in the log keyword or comment. Matching is case-insensitive.

From?|

Optional inclusive start time, expressed as Unix milliseconds. Omit for no lower time limit.

Match^-?(?:0|[1-9]\d*)$
Formatint64
To?|

Optional inclusive end time, expressed as Unix milliseconds. Must not precede from. Omit for no upper time limit.

Match^-?(?:0|[1-9]\d*)$
Formatint64
CrossEnvironment?boolean

Only used to query audit logs for a specific shared segment across environments. Defaults to false.

PageIndex?|
Match^-?(?:0|[1-9]\d*)$
Formatint32
PageSize?|
Match^-?(?:0|[1-9]\d*)$
Formatint32

Header Parameters

Organization?string

The organization ID associated with the request. Some APIs require this header to identify the organization context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Workspace?string

The workspace ID associated with the request. Some APIs require this header to identify the workspace context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/audit-logs"
{  "success": true,  "errors": [    "string"  ],  "data": null}