Seal Docs

Audit Log API

Access the complete tamper-evident activity history for your workspace

Audit Log API

The Audit Log API provides read access to your workspace's immutable activity history. Every significant event — document creation, signing, recipient changes, member activity, and setting changes — is recorded in chronological order.

Use the audit log for compliance reporting, security investigations, and integration with your own SIEM or logging infrastructure.

The Audit Log Entry Object

Attributes

AttributeTypeDescription
idstringUnique audit log entry ID
actionstringThe action performed (see Action Types below)
actor_typestringWho performed it: user, recipient, or system
actor_namestringDisplay name of the actor (optional)
actor_emailstringEmail of the actor (optional)
resource_typestringType of resource affected: document, recipient, member, etc.
resource_idstringID of the affected resource (optional)
document_idstringDocument ID if the event is document-related (optional)
ip_addressstringIP address of the actor
sourcestringWhere the action originated: web, api, or system
created_atstringISO 8601 timestamp of the event

Example Object

{
  "id": "log_abc123",
  "action": "document.sent",
  "actor_type": "user",
  "actor_name": "Alice Johnson",
  "actor_email": "alice@example.com",
  "resource_type": "document",
  "resource_id": "jd7k8l9m0n1p2q3r4s5t6u7v",
  "document_id": "jd7k8l9m0n1p2q3r4s5t6u7v",
  "ip_address": "203.0.113.42",
  "source": "web",
  "created_at": "2024-01-27T10:31:00Z"
}

Action Types

Document Actions

ActionDescription
document.createdNew document uploaded
document.updatedDocument metadata changed
document.deletedDocument permanently deleted
document.sentDocument sent to recipients for signing
document.viewedDocument opened
document.completedAll required signatures collected
document.cancelledDocument voided by sender
document.expiredDocument expired before completion
document.ownership_transferredDocument reassigned to a new owner

Recipient Actions

ActionDescription
recipient.addedRecipient added to a document
recipient.updatedRecipient details changed
recipient.removedRecipient removed from a document
recipient.viewedRecipient opened the signing link
recipient.signedRecipient completed signing
recipient.declinedRecipient declined to sign
recipient.esign_consentRecipient accepted ESIGN consent
recipient.esign_opt_outRecipient declined ESIGN consent
recipient.expiredRecipient's signing deadline passed

Member & Organization Actions

ActionDescription
member.invitedUser invited to workspace
member.joinedUser accepted invitation
member.removedUser removed from workspace
member.role_changedMember role updated
organization.updatedWorkspace settings changed

List Audit Log

Retrieve a paginated, filterable list of audit log entries for your workspace.

Endpoint

GET /api/v1/audit-log

Required Scope

seal:audit:read

Query Parameters

ParameterTypeDescription
limitnumberNumber of results (max 100, default 20)
cursorstringPagination cursor from previous response
document_idstringFilter entries related to a specific document
actionstringFilter by exact action name (e.g., document.sent)
created_afternumberUnix timestamp (ms) — only return entries after this
created_beforenumberUnix timestamp (ms) — only return entries before this

Entries are returned in reverse chronological order (newest first).

TypeScript Example

// Get all audit log entries for a specific document
const response = await fetch(
  "https://seal.convex.site/api/v1/audit-log?document_id=jd7k8l9m0n1p2q3r4s5t6u7v&limit=50",
  {
    headers: {
      Authorization: "Bearer ak_your_api_key_here",
    },
  },
);

const { entries, has_more, next_cursor } = await response.json();

cURL Example

# Get signing events from the last 24 hours
YESTERDAY=$(date -u -d '1 day ago' +%s000 2>/dev/null || date -u -v-1d +%s000)

curl -X GET "https://seal.convex.site/api/v1/audit-log?action=recipient.signed&created_after=${YESTERDAY}" \
  -H "Authorization: Bearer ak_your_api_key_here"

Response

{
  "entries": [
    {
      "id": "log_xyz789",
      "action": "recipient.signed",
      "actor_type": "recipient",
      "actor_name": "John Doe",
      "actor_email": "john@example.com",
      "resource_type": "recipient",
      "resource_id": "rec_abc123",
      "document_id": "jd7k8l9m0n1p2q3r4s5t6u7v",
      "ip_address": "198.51.100.10",
      "source": "web",
      "created_at": "2024-01-27T11:00:00Z"
    },
    {
      "id": "log_def456",
      "action": "document.sent",
      "actor_type": "user",
      "actor_name": "Alice Johnson",
      "actor_email": "alice@example.com",
      "resource_type": "document",
      "resource_id": "jd7k8l9m0n1p2q3r4s5t6u7v",
      "document_id": "jd7k8l9m0n1p2q3r4s5t6u7v",
      "ip_address": "203.0.113.42",
      "source": "api",
      "created_at": "2024-01-27T10:31:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Compliance Export Example

// Export all audit log entries for a date range to a SIEM
async function exportAuditLog(fromMs: number, toMs: number) {
  const entries = [];
  let cursor: string | undefined;

  do {
    const params = new URLSearchParams({
      limit: "100",
      created_after: String(fromMs),
      created_before: String(toMs),
      ...(cursor ? { cursor } : {}),
    });

    const response = await fetch(
      `https://seal.convex.site/api/v1/audit-log?${params}`,
      { headers: { Authorization: "Bearer ak_your_api_key_here" } },
    );

    const data = await response.json();
    entries.push(...data.entries);
    cursor = data.has_more ? data.next_cursor : undefined;
  } while (cursor);

  return entries;
}

Next Steps

Last updated on

On this page