Skip to content

Compliance API

Audit logs, reports, and compliance management.

Endpoints

MethodEndpointDescription
GET/v1/compliance/audit-logQuery audit logs
POST/v1/compliance/reportsGenerate report
GET/v1/compliance/reports/:idGet report status
POST/v1/compliance/holdsCreate legal hold
DELETE/v1/compliance/holds/:idRelease hold

Query Audit Logs

bash
curl https://api.gateflow.ai/v1/compliance/audit-log \
  -H "Authorization: Bearer gw_prod_..." \
  -G -d "start=2024-01-01" -d "action=document.accessed"

Parameters

ParameterTypeDescription
startdatetimeStart of period
enddatetimeEnd of period
actionstringFilter by action type
actorstringFilter by actor ID
resourcestringFilter by resource ID

Response

json
{
  "events": [
    {
      "event_id": "evt_123",
      "timestamp": "2024-01-15T10:30:00Z",
      "action": "document.accessed",
      "actor": {"id": "user_456"},
      "resource": {"id": "doc_789"},
      "hash": "sha256:..."
    }
  ],
  "pagination": {
    "next_cursor": "abc123"
  }
}

Generate Report

bash
curl -X POST https://api.gateflow.ai/v1/compliance/reports \
  -H "Authorization: Bearer gw_prod_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "hipaa_audit",
    "period": {"start": "2024-01-01", "end": "2024-03-31"},
    "format": "pdf"
  }'
bash
curl -X POST https://api.gateflow.ai/v1/compliance/holds \
  -H "Authorization: Bearer gw_prod_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Litigation 2024-001",
    "scope": {
      "documents": ["doc_123", "doc_456"],
      "date_range": {"start": "2023-01-01"}
    }
  }'

Next Steps

Built with reliability in mind.