API Reference / Audit
List audit log entries
Lists audit log entries for the caller's workspace, optionally filtered by object type, action type, or exact event type. There is no workspace_id request field. The scope is always the caller's own workspace, except for a platform administrator, who reads across every workspace plus the entries tied to no workspace. Results are paginated. Pass the returned cursor to fetch the next page.
/ audit. v1. Audit/ ListAuditEntriesRequest body
application/jsonRequired
Request for one page of audit entries in the caller's workspace, newest first. There is no workspace field: the workspace is always the caller's own.
cursor?stringOpaque cursor from a previous ListAuditEntriesResponse.next_cursor. Empty for the first page. Send the same filter with every page.
filter?AuditEntryFilterOptional narrowing by object type, action type or event type. Absent returns every entry.
Show attributes
actionTypes?array<string>Action types to include, matching any of them. Empty includes every action type.
Value in"ACTION_"ACTION_"ACTION_
entityId?stringOnly entries about this entity, matching entity_id exactly.
eventType?stringExact event type to match, such as "user.created" or "security". Absent or empty applies no event type filter.
objectTypes?array<string>Object types to include, matching any of them. Empty includes every object type.
Value in"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_"OBJECT_
occurredBefore?stringKeeps only entries that occurred strictly before this time. Absent applies no upper bound.
Format"date-time"
occurredFrom?stringKeeps only entries that occurred at or after this time. Absent applies no lower bound.
Format"date-time"
performedByApiKeyId?stringOpaque 16-byte identifier of an API key, base64-encoded in JSON. Keeps only the entries performed through that key. Absent applies no key filter. Set this or performed_by_user_id, not both.
Format"byte" base64
performedByUserId?stringOpaque 16-byte identifier of a user, base64-encoded in JSON. Keeps only the entries that user performed, through their own sessions or through API keys they own. Absent applies no person filter.
Format"byte" base64
query?stringFree text to search for, matched case-insensitively against the summary and the entity's name, and against the names of the workspace's members and API keys as the performer. Absent or blank applies no search.
limit?integerMaximum number of entries to return, from 1 to 100. Zero uses the default of 50. A larger value is rejected with invalid_argument.
Format"int32"
Response body
application/json
Success
auditEntries?array<AuditEntry>The audit entries on this page, ordered by occurred_at descending.
Show attributes
actionType?stringWhat happened to the entity, in lowercase, such as "created", "updated", "deleted" or "restored".
category?stringThe customer grouping the entry belongs to. Unspecified on entries recorded before this field existed.
Value in"AUDIT_"AUDIT_"AUDIT_"AUDIT_"AUDIT_"AUDIT_"AUDIT_
changes?array<AuditChange>What the action changed, one row per audited field, ready to display. Empty when nothing audited changed, and on entries recorded before this field existed. Secrets are never included.
Show attributes
after?stringThe value after the change, formatted for display. Empty when it was cleared.
before?stringThe value before the change, formatted for display. Empty when it had none.
field?stringThe field's customer-facing label, such as "Name".
createdAt?stringWhen the entry was written to the audit log. Usually moments after occurred_at.
Format"date-time"
details?stringAction-specific detail as a UTF-8 JSON object, base64-encoded in JSON. Empty when the action carries no detail. Never contains secrets or credential material.
Format"byte" base64
entityId?stringIdentifier of the entity acted on, as text. Empty when the action has no single target entity.
eventId?stringIdentifier of the platform event this entry was recorded from. Unique across the audit log, so a redelivered event never produces a second entry.
eventType?stringEvent name, either the dotted platform event name such as "user.created" or the category "security" for login, two-factor and credential actions.
id?stringOpaque 16-byte identifier of this audit entry, assigned when the entry is recorded. Base64-encoded in JSON.
Format"byte" base64
objectName?stringThe display name of the entity at the time of the action, such as the contract's name. Empty when the entity has no name, and on entries recorded before this field existed.
objectType?stringThe kind of entity acted on, in lowercase, such as "workspace", "contract" or "api_key".
occurredAt?stringWhen the action happened, as stamped by the service that performed it.
Format"date-time"
performedBy?ActorSummaryWho performed the action, resolved when the entry is read. Unset for an entry with no person or key behind it.
Show attributes
avatarUrl?stringThe user's avatar image URL. Unset for an API key or a user with no avatar.
displayName?stringThe user's name or the API key's name at read time. Empty when the actor no longer exists.
id?stringOpaque 16-byte identifier of the user or API key, base64-encoded in JSON.
Format"byte" base64
subjectType?stringHow the actor authenticated: a user session or an API key.
Value in"SUBJECT_"SUBJECT_"SUBJECT_
service?stringThe platform service that performed the action, such as "accounts" or "contracts". Empty when the source service was not recorded.
summary?stringOne-line human-readable description of the action, in the form "<object> <action>: <name>", such as "contract created: AK-47 buyer". The name part is omitted when the entity has none.
workspaceId?stringOpaque 16-byte identifier of the workspace the action belongs to, base64-encoded in JSON. Empty for a security entry that belongs to no workspace, such as a failed login for an unknown email, which only a platform administrator can read.
Format"byte" base64
nextCursor?stringCursor to pass as cursor to fetch the next page. Empty when this is the last page.
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/audit.v1.Audit/ListAuditEntries" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.goldmine.to/audit.v1.Audit/ListAuditEntries", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();body := strings.NewReader(`{}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/audit.v1.Audit/ListAuditEntries", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/audit.v1.Audit/ListAuditEntries",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={},
)
data = res.json(){
"auditEntries": [
{
"id": "MDEyMzQ1Njc4OTo7PD0+Pw==",
"workspaceId": "AAECAwQFBgcICQoLDA0ODw==",
"eventId": "b1c2d3e4-f5a6-4788-8899-aabbccddeeff",
"eventType": "membership.updated",
"objectType": "accounts_membership",
"actionType": "updated",
"service": "accounts",
"entityId": "20212223-2425-2627-2829-2a2b2c2d2e2f",
"performedBy": {
"subjectType": "SUBJECT_TYPE_SESSION",
"id": "MDEyMzQ1Njc4OTo7PD0+Pw==",
"displayName": "Jordan Hale"
},
"summary": "Updated membership role",
"details": "eyJiZWZvcmUiOnsicm9sZSI6Ik1FTUJFUlNISVBfUk9MRV9NRU1CRVIifSwiYWZ0ZXIiOnsicm9sZSI6Ik1FTUJFUlNISVBfUk9MRV9PV05FUiJ9fQ==",
"occurredAt": "2026-06-29T12:15:00Z",
"createdAt": "2026-06-29T12:15:00Z"
}
],
"nextCursor": "eyJvZmZzZXQiOjUwfQ=="
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}curl -X POST "https://api.goldmine.to/audit.v1.Audit/ListAuditEntries" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 25,
"filter": {
"objectTypes": [
"OBJECT_TYPE_ACCOUNTS_MEMBERSHIP"
],
"actionTypes": [
"ACTION_TYPE_UPDATED"
]
}
}'const res = await fetch("https://api.goldmine.to/audit.v1.Audit/ListAuditEntries", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"limit": 25,
"filter": {
"objectTypes": [
"OBJECT_TYPE_ACCOUNTS_MEMBERSHIP"
],
"actionTypes": [
"ACTION_TYPE_UPDATED"
]
}
}),
});
const data = await res.json();body := strings.NewReader(`{
"limit": 25,
"filter": {
"objectTypes": [
"OBJECT_TYPE_ACCOUNTS_MEMBERSHIP"
],
"actionTypes": [
"ACTION_TYPE_UPDATED"
]
}
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/audit.v1.Audit/ListAuditEntries", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/audit.v1.Audit/ListAuditEntries",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"limit": 25,
"filter": {
"objectTypes": [
"OBJECT_TYPE_ACCOUNTS_MEMBERSHIP"
],
"actionTypes": [
"ACTION_TYPE_UPDATED"
]
}
},
)
data = res.json(){
"auditEntries": [
{
"id": "MDEyMzQ1Njc4OTo7PD0+Pw==",
"workspaceId": "AAECAwQFBgcICQoLDA0ODw==",
"eventId": "b1c2d3e4-f5a6-4788-8899-aabbccddeeff",
"eventType": "membership.updated",
"objectType": "accounts_membership",
"actionType": "updated",
"service": "accounts",
"entityId": "20212223-2425-2627-2829-2a2b2c2d2e2f",
"performedBy": {
"subjectType": "SUBJECT_TYPE_SESSION",
"id": "MDEyMzQ1Njc4OTo7PD0+Pw==",
"displayName": "Jordan Hale"
},
"summary": "Updated membership role",
"details": "eyJiZWZvcmUiOnsicm9sZSI6Ik1FTUJFUlNISVBfUk9MRV9NRU1CRVIifSwiYWZ0ZXIiOnsicm9sZSI6Ik1FTUJFUlNISVBfUk9MRV9PV05FUiJ9fQ==",
"occurredAt": "2026-06-29T12:15:00Z",
"createdAt": "2026-06-29T12:15:00Z"
}
],
"nextCursor": ""
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}