Skip to content

REST API

Script Strac Comply from CI, Postman, or any HTTP client. Authenticate with a Personal Access Token (see Authentication). An OAuth access token from the MCP sign-in works here too, with the same scopes. Every endpoint below shows its parameters, required scope, and a copy-paste request in curl, JavaScript, and Python.

Conventions

Base URL

bash
https://comply.strac.io/api/v1

Most paths are scoped to your company: /api/v1/companies/{companyId}/.... The companyId is checked against your token's company. A request for another company returns 403 forbidden with a neutral message. The endpoints that manage PATs live under /api/companies/{companyId}/pats and use your signed-in session, not /api/v1 and a PAT.

Response envelope

Most responses are { success: true, data: ... }. A few keep legacy shapes (noted on the endpoint), for example, test results return { summary, results } and the audit log nests under data.entries.

Errors

  • A refused token, scope, company or role (401, 403) and a server error (500) follow RFC 6750: { error, error_description }. A missing scope is 403 insufficient_scope and lists required_scopes.
  • Validation and lookup errors (400, 404, 409), and a refusal from the endpoint itself (such as 403 on a restricted document), are { success: false, error }, sometimes with details.
  • An error at the gateway carries only { message }: 502 when the request failed or timed out before an answer, 504 when it ran past the gateway's time limit. Retry it.
  • When your workspace is read-only, a write returns 403 with error: "workspace_read_only" and a reason. Reads keep working.

Auth header

Send your PAT as a bearer token: Authorization: Bearer strac_pat_… (an OAuth access token, mcp_at_…, goes in the same header). Creating, listing and revoking PATs uses your signed-in Strac Comply session instead. You can't create a PAT with a PAT.

Machine-readable spec

This reference is generated from a typed catalog, so the spec never drifts from the page. Import the OpenAPI 3.1 document into Postman, Insomnia, or an SDK generator, and point AI clients at llms.txt for discovery. The OpenAPI doc covers the REST surface only. MCP tools are JSON-RPC and live in the MCP reference.

Scopes

Each endpoint lists the scope it needs. Give your PAT only those scopes.

ScopeWhat it allows
compliance:read
Read frameworks, controls and their summary, test results, and the audit log.
policies:read
Read policies and their versions.
policies:write
Upload a new policy version as a draft.
policies:approve
Approve a policy version, which makes it count toward your audit.
documents:read
Read the document catalog and download documents.
documents:write
Upload and publish document versions (a published document counts toward your audit).
personnel:read
Read the employee directory.
audits:read
Read your audits.
evidence:write
Mark a control not applicable, or restore it.

Find an endpoint

Type part of a path, a method or what the endpoint does. Press Enter to jump to the first match.

23 endpoints on this page.

Tokens

POST (write)
/api/companies/{companyId}/pats
Scope
any bearer
Role: owner / admin (to mint write scopes)Auth: Cognito session

Mint a Personal Access Token

Create a PAT for the REST API. Cognito-authenticated (you cannot mint a PAT with a PAT). The plaintext token is returned exactly once. Owners/admins can mint any scope; members and viewers can mint read-only scopes only.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Body (Zod-strict: extra keys rejected)

label requiredType: string, 1–80 charsDescription: Shows in the token list in Settings.
scopes requiredType: string[] (non-empty)Description: Least-privilege scope set; each must be a canonical scope.
expiresInDays requiredType: integerDescription: Token lifetime in days. 0 = never expires (service accounts).03090365

Request

bashPOST /api/companies/{companyId}/pats
curl -X POST 'https://comply.strac.io/api/companies/comp_demo/pats' \  -H 'Authorization: Bearer eyJraWQ...<cognito-id-token>' \  -H 'Content-Type: application/json' \  -d '{  "label": "CI deploy bot",  "scopes": [    "compliance:read",    "documents:write"  ],  "expiresInDays": 90}'

Response · 201

json
{  "success": true,  "data": {    "token": "strac_pat_xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxx",    "pat": {      "patId": "<sha256-hash>",      "prefix": "strac_pat_a1b2",      "label": "CI deploy bot",      "scope": "compliance:read documents:write",      "expiresAt": 1787616000,      "email": "ci@example.com",      "createdAt": "2026-05-27T08:18:14.536Z",      "createdBy": "ci@example.com",      "lastUsedAt": null,      "revokedAt": null,      "status": "active"    }  }}
GET (read)
/api/companies/{companyId}/pats
Scope
any bearer
Auth: Cognito session

List Personal Access Tokens

Returns token metadata only, never the secret. Owners/admins see every PAT in the org; members and viewers see only their own.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Request

bashGET /api/companies/{companyId}/pats
curl 'https://comply.strac.io/api/companies/comp_demo/pats' \  -H 'Authorization: Bearer eyJraWQ...<cognito-id-token>'

Response · 200

json
{  "success": true,  "data": {    "pats": [      {        "patId": "<sha256-hash>",        "prefix": "strac_pat_a1b2",        "label": "CI deploy bot",        "scope": "compliance:read documents:write",        "expiresAt": 1787616000,        "email": "ci@example.com",        "createdAt": "2026-05-27T08:18:14.536Z",        "createdBy": "ci@example.com",        "lastUsedAt": "2026-05-27T15:00:00.000Z",        "revokedAt": null,        "status": "active"      }    ]  }}
POST (write)
/api/companies/{companyId}/pats/{patId}/revoke
Scope
any bearer
Role: owner / admin (or the token owner)Auth: Cognito session

Revoke a Personal Access Token

Soft-revoke (the row is preserved for the audit trail). The PAT stops working on the next request, with no grace period. The optional reason is stored on the token record, not in the audit log.

Path parameters

companyId requiredType: stringDescription: Your organization id.
patId requiredType: stringDescription: The PAT id (sha256 hash), not the plaintext token.

Body (Zod-strict: extra keys rejected)

reason optionalType: string, 1–500 charsDescription: Why the token was revoked (e.g. rotation, offboarding).

Request

bashPOST /api/companies/{companyId}/pats/{patId}/revoke
curl -X POST 'https://comply.strac.io/api/companies/comp_demo/pats/%3Csha256-hash%3E/revoke' \  -H 'Authorization: Bearer eyJraWQ...<cognito-id-token>' \  -H 'Content-Type: application/json' \  -d '{  "reason": "rotation"}'

Response · 200

json
{  "success": true,  "data": {    "revoked": true,    "alreadyRevoked": false,    "patId": "<sha256-hash>"  }}

Frameworks

GET (read)
/api/v1/frameworks
Scope
compliance:read
Auth: PAT bearer

List available frameworks

Returns the frameworks Strac Comply supports, each with its id, name and short label. The list is the same for every company, and you still need a valid token to read it. For your own controls, use the controls list.

Request

bashGET /api/v1/frameworks
curl 'https://comply.strac.io/api/v1/frameworks' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "frameworks": [    {      "id": "soc2",      "name": "SOC 2",      "shortLabel": "SOC 2"    },    {      "id": "iso27001",      "name": "ISO 27001:2022",      "shortLabel": "ISO 27001"    },    {      "id": "ccpa",      "name": "CCPA / CPRA",      "shortLabel": "CCPA"    }  ]}

Controls

GET (read)
/api/v1/companies/{companyId}/controls
Scope
compliance:read
Auth: PAT bearer

List controls with completion

All controls for the company with completion % and the binary readiness signal. If an input could not be read, the response names it in degradedReads: treat those verdicts as not fully evaluated. ackSignalBasis: "not-evaluated" means the policy acknowledgment check did not run. scopeStatus is not_applicable_by_scope when your declared scope (the California privacy answers, the HIPAA role, the PCI SAQ type or the SOC 2 audit scope) takes the control out, otherwise in_scope. dueFrom is the date a phased CCPA duty starts to apply while it is not yet due, and null otherwise; dueFromKind says what that date is (effective, period, submission, report, recurring or triggered). When the date depends on a revenue band you have not answered, dueFrom is null and dueFromUnresolved gives the reason and every candidate date. While a control is due later, countsFrom is the day it starts counting toward your percentage if it is still incomplete: the start date, or for a cybersecurity audit control whose evidence is the audit report, the date that report is first due (with an unanswered band, the earliest one). CCPA control ids are their citations and keep their parentheses, such as ccpa-1798.100(e) and ccpa-7123(c)(4).

Path parameters

companyId requiredType: stringDescription: Your organization id.

Query parameters

framework optionalType: stringDescription: Filter by framework id (e.g. soc2, ccpa).Default: all
category optionalType: stringDescription: Filter by control category (exact match on the category field).
status optionalType: stringDescription: Exact-match on the workflow status label (URL-encode the space). NOT about people: Unassigned/Assigned/Needs reassignment track whether the control has TESTS linked to it, not who owns it. Human ownership is the separate assignedTo field. Needs evidence and In progress are derived at read time from a stored Completed that readiness contradicts, so they never appear in stored data. The readiness signal is the separate auditReadiness field.UnassignedAssignedNeeds reassignmentIn progressNeeds evidenceCompleted

Request

bashGET /api/v1/companies/{companyId}/controls
curl 'https://comply.strac.io/api/v1/companies/comp_demo/controls' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "count": 1,  "data": [    {      "id": "soc2-cc6.1",      "title": "Logical access controls",      "category": "Logical & Physical Access",      "status": "Needs evidence",      "framework": "SOC 2",      "frameworkId": "soc2",      "frameworkReference": "CC6.1",      "notApplicable": false,      "completionPercentage": 67,      "auditReadiness": "gap",      "testsPassed": 4,      "testsTotal": 5,      "linkedTestCount": 5,      "linkedPolicyCount": 1,      "linkedDocumentCount": 1,      "requiredTotal": 3,      "requiredMissing": 1,      "riskLevel": "high"    }  ]}
GET (read)
/api/v1/companies/{companyId}/controls/{controlId}
Scope
compliance:read
Auth: PAT bearer

One control + evidence summary

A single control with its linked tests, policies, documents, and any Not-Applicable metadata.

Path parameters

companyId requiredType: stringDescription: Your organization id.
controlId requiredType: stringDescription: Control id, e.g. CC6.1 or ccpa-7123(c)(4). URL-encode # as %23.

Request

bashGET /api/v1/companies/{companyId}/controls/{controlId}
curl 'https://comply.strac.io/api/v1/companies/comp_demo/controls/CC6.1' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "id": "soc2-cc6.1",    "title": "Logical access controls",    "description": "The entity implements logical access security controls...",    "category": "Logical & Physical Access",    "status": "Needs evidence",    "framework": "SOC2",    "frameworkId": "soc2",    "frameworkReference": "CC6.1",    "completionPercentage": 67,    "auditReadiness": "gap",    "auditGaps": [      "No approved access-review policy within the review window"    ],    "testsPassed": 4,    "testsTotal": 5,    "notApplicable": false,    "markedNAAt": null,    "markedNABy": null,    "linkedTests": [      {        "testId": "aws-s3-encryption",        "name": "S3 Encryption Check",        "status": "failing"      }    ],    "linkedPolicies": [      {        "policyId": "POL-SEC-001",        "name": "Information Security Policy"      }    ],    "linkedDocuments": [      {        "documentId": "DOC-CC1-ORG-CHART",        "title": "Company Organization Chart"      }    ]  }}
GET (read)
/api/v1/companies/{companyId}/controls/summary
Scope
compliance:read
Auth: PAT bearer

Framework rollup

Org-wide rollup: per-framework control counts + the tests / policies / documents / integrations evidence dimensions, plus overall totals. Can take 5–30s on large tenants. Two keys describe how the numbers were computed: percentageBasis: "audit-ready-controls" means every percentage is a ready-controls ratio (completed / applicable), not an evidence-weighted average (for CCPA, an incomplete control whose every obligation starts later is outside applicable until its date: dueLaterIncompleteControls counts them and dueLaterCountsFrom is the first date one counts); personnelSignalBasis: "not-evaluated" means this endpoint did not resolve the personnel background-check signal, so a control whose required background-check evidence would be credited from your People view reads unmet here while GET /controls, which does resolve it, may show it satisfied. Expect the two endpoints to differ by that amount if you have no background-check integration. When SOC 2 is active, observationPeriod is the SOC 2 Type II observation period the app shows: start, earliest close (necessary, not sufficient), day of the period, and windowAnchor (management = a date you set; signup or first-evidence = our proposal). Absent when SOC 2 is not active or the period could not be read.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Request

bashGET /api/v1/companies/{companyId}/controls/summary
curl 'https://comply.strac.io/api/v1/companies/comp_demo/controls/summary' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "frameworks": [      {        "frameworkId": "SOC2",        "total": 64,        "completed": 40,        "percentage": 65,        "percentageBasis": "audit-ready-controls",        "applicable": 62,        "notApplicable": 2,        "totalTests": 120,        "passingTests": 102,        "failingTests": 18,        "policies": {          "total": 14,          "approved": 11,          "needsAttention": 3        },        "documents": {          "total": 79,          "needsAttention": 12        },        "training": {          "completed": 18,          "assigned": 20,          "applicable": true        }      }    ],    "tests": {      "total": 120,      "passing": 102,      "failing": 18,      "errors": 0    },    "policies": {      "total": 14,      "approved": 11,      "needsAttention": 3    },    "integrations": {      "total": 3,      "connected": 3    },    "documents": {      "total": 79,      "needsAttention": 12    },    "total": 64,    "completed": 40,    "averageCompletion": 65,    "percentageBasis": "audit-ready-controls",    "personnelSignalBasis": "not-evaluated",    "observationPeriod": {      "frameworkId": "soc2",      "windowDays": 90,      "windowStartedAt": "2026-09-01T00:00:00.000Z",      "windowAnchor": "signup",      "earliestCloseAt": "2026-11-30T00:00:00.000Z",      "dayOfWindow": 37,      "notStarted": false,      "windowComplete": false,      "evidenceCollectionStartedAt": "2026-09-03T14:12:00.000Z",      "uncoveredLeadDays": 2    }  }}
POST (write)
/api/v1/companies/{companyId}/controls/{controlId}/mark-na
Scope
evidence:write
Role: owner / adminAuth: PAT bearer

Mark a control Not Applicable

Marks a control N/A with a reason. Writes an append-only audit-log row (v1_mark_control_na).

Path parameters

companyId requiredType: stringDescription: Your organization id.
controlId requiredType: stringDescription: The control id from the controls list, e.g. soc2-cc6.1. The short reference (CC6.1) is not accepted here.

Body (Zod-strict: extra keys rejected)

reason requiredType: string, 10–2000 charsDescription: Why the control does not apply. Your auditor sees it word for word. ISO 27001 clauses 4 to 10 cannot be marked not applicable.

Request

bashPOST /api/v1/companies/{companyId}/controls/{controlId}/mark-na
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/controls/soc2-cc6.1/mark-na' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx' \  -H 'Content-Type: application/json' \  -d '{  "reason": "No customer-managed laptops; access is via SSO-only managed devices."}'

Response · 200

json
{  "success": true,  "data": {    "markedNAAt": "2026-05-27T16:00:00.000Z",    "markedNABy": "admin@example.com"  }}
POST (write)
/api/v1/companies/{companyId}/controls/{controlId}/restore
Scope
evidence:write
Role: owner / adminAuth: PAT bearer

Restore an N/A control to applicable

Reverses a Not-Applicable marking. Writes an audit-log row (v1_unmark_control_na).

Path parameters

companyId requiredType: stringDescription: Your organization id.
controlId requiredType: stringDescription: The control id from the controls list, e.g. soc2-cc6.1.

Request

bashPOST /api/v1/companies/{companyId}/controls/{controlId}/restore
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/controls/soc2-cc6.1/restore' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true}

Policies

GET (read)
/api/v1/companies/{companyId}/policies
Scope
policies:read
Auth: PAT bearer

List policies + status

All policies with lifecycle status and review dates. lifecycleStatus === "published" is the signal that a policy is approved audit/portal evidence.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Query parameters

framework optionalType: stringDescription: Filter by framework.

Request

bashGET /api/v1/companies/{companyId}/policies
curl 'https://comply.strac.io/api/v1/companies/comp_demo/policies' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": [    {      "id": "POL-SEC-001",      "policyId": "POL-SEC-001",      "title": "Information Security Policy",      "framework": [        "SOC 2"      ],      "status": "compliant",      "lifecycleStatus": "published",      "currentVersion": "<version-uuid>",      "lastReviewDate": "2026-02-27T00:00:00.000Z",      "nextReviewDate": "2027-02-27T00:00:00.000Z",      "assignedTo": "ciso@example.com"    }  ]}
GET (read)
/api/v1/companies/{companyId}/policies/{policyId}
Scope
policies:read
Auth: PAT bearer

One policy + version history

A single policy with its full version list (status, uploader, format, approval metadata).

Path parameters

companyId requiredType: stringDescription: Your organization id.
policyId requiredType: stringDescription: Policy id, e.g. POL-SEC-001.

Request

bashGET /api/v1/companies/{companyId}/policies/{policyId}
curl 'https://comply.strac.io/api/v1/companies/comp_demo/policies/POL-SEC-001' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "id": "POL-SEC-001",    "policyId": "POL-SEC-001",    "title": "Information Security Policy",    "framework": [      "SOC 2"    ],    "lifecycleStatus": "published",    "currentVersion": "<version-uuid>",    "currentVersionNumber": 3,    "linkedControls": [      "CC6.1",      "CC7.2"    ],    "versions": [      {        "id": "<version-uuid>",        "version": 3,        "status": "approved",        "uploadedAt": "2026-02-20T00:00:00.000Z",        "uploadedBy": "ciso@example.com",        "fileName": "infosec-policy-v3.pdf",        "contentFormat": "pdf",        "approvedAt": "2026-02-27T00:00:00.000Z",        "approvedBy": "ceo@example.com"      }    ]  }}
POST (write)
/api/v1/companies/{companyId}/policies/{policyId}/versions
Scope
policies:write
Role: owner / adminAuth: PAT bearer

Upload a new policy version (draft)

Uploads a new version as a draft. Send the file base64-encoded (≤4 MB raw). Writes audit-log row v1_upload_policy.

Path parameters

companyId requiredType: stringDescription: Your organization id.
policyId requiredType: stringDescription: Policy id, e.g. POL-SEC-001.

Body (Zod-strict: extra keys rejected)

fileName requiredType: stringDescription: File name with extension (.pdf, .docx, .doc).
fileContent requiredType: string (base64)Description: Base64-encoded file bytes, ≤4 MB raw.
comments optionalType: stringDescription: Optional changelog note for this version.

Request

bashPOST /api/v1/companies/{companyId}/policies/{policyId}/versions
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/policies/POL-SEC-001/versions' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "infosec-policy-v4.pdf",  "fileContent": "JVBERi0xLjcK...<base64>",  "comments": "Annual review update"}'

Response · 200

json
{  "success": true,  "data": {    "id": "<version-uuid>",    "policyId": "POL-SEC-001",    "version": 4,    "status": "draft",    "uploadedAt": "2026-05-27T16:00:00.000Z",    "uploadedBy": "ciso@example.com",    "fileName": "infosec-policy-v4.pdf",    "contentFormat": "pdf"  }}
POST (write)
/api/v1/companies/{companyId}/policies/{policyId}/versions/{versionId}/approve
Scope
policies:approve
Role: owner / adminAuth: PAT bearer

Approve a draft version → published

Approves a draft policy version, flipping the policy to published. Writes audit-log row v1_approve_policy.

Path parameters

companyId requiredType: stringDescription: Your organization id.
policyId requiredType: stringDescription: Policy id, e.g. POL-SEC-001.
versionId requiredType: stringDescription: The draft version id to approve.

Request

bashPOST /api/v1/companies/{companyId}/policies/{policyId}/versions/{versionId}/approve
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/policies/POL-SEC-001/versions/%3Cversion-uuid%3E/approve' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "message": "Policy version approved successfully"}

Documents

GET (read)
/api/v1/companies/{companyId}/documents
Scope
documents:read
Auth: PAT bearer

List catalog documents + status

Your document catalog across your frameworks (SOC 2, ISO 27001, PCI DSS, HIPAA, HIPAA Privacy Rule, NIST CSF, CCPA), with control mappings and lifecycle status. Only published docs within their review window count toward completion.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Request

bashGET /api/v1/companies/{companyId}/documents
curl 'https://comply.strac.io/api/v1/companies/comp_demo/documents' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": [    {      "id": "DOC-CC1-ORG-CHART",      "name": "Organization Chart",      "frameworks": [        "SOC 2"      ],      "controlMappings": [        {          "controlId": "CC1.1",          "framework": "SOC 2",          "evidenceType": "required"        }      ],      "lifecycleStatus": "published",      "currentVersionId": "<version-uuid>",      "publishedAt": "2026-05-01T00:00:00.000Z",      "nextReviewDate": "2026-08-01T00:00:00.000Z"    }  ]}
GET (read)
/api/v1/companies/{companyId}/documents/{documentId}
Scope
documents:read
Auth: PAT bearer

One document + version history

A single catalog document with its version list.

Path parameters

companyId requiredType: stringDescription: Your organization id.
documentId requiredType: stringDescription: Document id, e.g. DOC-CC1-ORG-CHART.

Request

bashGET /api/v1/companies/{companyId}/documents/{documentId}
curl 'https://comply.strac.io/api/v1/companies/comp_demo/documents/DOC-CC1-ORG-CHART' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "id": "DOC-CC1-ORG-CHART",    "name": "Organization Chart",    "lifecycleStatus": "published",    "versions": [      {        "id": "<version-uuid>",        "versionNumber": 2,        "status": "published",        "fileName": "org-chart-2026-05.xlsx",        "fileSize": 1048576,        "uploadedAt": "2026-05-01T00:00:00.000Z",        "uploadedBy": "people@example.com",        "publishedAt": "2026-05-01T00:00:00.000Z"      }    ]  }}
GET (read)
/api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/download-url
Scope
documents:read
Auth: PAT bearer

Presigned download URL for a version

Returns url, a signed link to the version's file that works for 3600 seconds (expiresInSeconds). For a version that is a link to a file kept elsewhere, you get that link back with external: true; it is not signed.

Path parameters

companyId requiredType: stringDescription: Your organization id.
documentId requiredType: stringDescription: Document id.
versionId requiredType: stringDescription: Version id.

Request

bashGET /api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/download-url
curl 'https://comply.strac.io/api/v1/companies/comp_demo/documents/DOC-CC1-ORG-CHART/versions/%3Cversion-uuid%3E/download-url' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "url": "https://s3.amazonaws.com/.../org-chart.xlsx?X-Amz-Signature=...",    "expiresInSeconds": 3600  }}
POST (write)
/api/v1/companies/{companyId}/documents/{documentId}/versions/upload
Scope
documents:write
Role: owner / adminAuth: PAT bearer

Upload a new document version (draft)

Uploads a new document version as a draft. Send the file base64-encoded (≤4 MB raw). Writes audit-log row v1_upload_document.

Path parameters

companyId requiredType: stringDescription: Your organization id.
documentId requiredType: stringDescription: Document id.

Body (Zod-strict: extra keys rejected)

fileName requiredType: stringDescription: File name with extension (pdf/docx/xlsx/pptx/doc/xls/png/jpeg/gif/webp/csv/txt/md/json/zip).
fileType requiredType: string (MIME)Description: MIME type, e.g. application/pdf or application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
fileContent requiredType: string (base64)Description: Base64-encoded file bytes, ≤4 MB raw.
comments optionalType: stringDescription: Optional changelog note.

Request

bashPOST /api/v1/companies/{companyId}/documents/{documentId}/versions/upload
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/documents/DOC-CC1-ORG-CHART/versions/upload' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "org-chart-2026-06.xlsx",  "fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",  "fileContent": "UEsDBBQ...<base64>",  "comments": "Q2 reorg"}'

Response · 200

json
{  "success": true,  "data": {    "version": {      "id": "<version-uuid>",      "documentId": "DOC-CC1-ORG-CHART",      "versionNumber": 3,      "status": "draft",      "fileName": "org-chart-2026-06.xlsx",      "fileType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",      "uploadedAt": "2026-05-27T16:00:00.000Z",      "uploadedBy": "people@example.com"    },    "status": {      "documentId": "DOC-CC1-ORG-CHART",      "lifecycleStatus": "published",      "currentVersionId": "<published-version-uuid>"    }  }}
POST (write)
/api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/publish
Scope
documents:write
Role: owner / adminAuth: PAT bearer

Publish a document version

Archives the prior published version and publishes the target. Writes audit-log row v1_publish_document. Publishing a version that is already published returns 200 with noop: true and publishes nothing new; if the document status row had drifted from that version, it is corrected and the response adds repairedStatus: true. A version that cannot be published in its current state returns 409. Send no body, or an empty JSON object ({}): a body with any field is refused with 400 unsupported_field, because this route only publishes.

Path parameters

companyId requiredType: stringDescription: Your organization id.
documentId requiredType: stringDescription: Document id.
versionId requiredType: stringDescription: Version id to publish.

Request

bashPOST /api/v1/companies/{companyId}/documents/{documentId}/versions/{versionId}/publish
curl -X POST 'https://comply.strac.io/api/v1/companies/comp_demo/documents/DOC-CC1-ORG-CHART/versions/%3Cversion-uuid%3E/publish' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "version": {      "id": "<version-uuid>",      "documentId": "DOC-CC1-ORG-CHART",      "versionNumber": 3,      "status": "published",      "publishedAt": "2026-05-27T16:00:00.000Z",      "publishedBy": "people@example.com"    },    "status": {      "documentId": "DOC-CC1-ORG-CHART",      "lifecycleStatus": "published",      "currentVersionId": "<version-uuid>"    }  }}

Audits

GET (read)
/api/v1/companies/{companyId}/audits
Scope
audits:read
Auth: PAT bearer

List audits + pending counts

All audit binders with status, period, and pending-evidence breakdown.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Request

bashGET /api/v1/companies/{companyId}/audits
curl 'https://comply.strac.io/api/v1/companies/comp_demo/audits' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": [    {      "id": "<audit-uuid>",      "name": "SOC 2 Type 2 (2026)",      "frameworkAudits": [        {          "frameworkId": "soc2",          "mode": "type-2",          "sampledControls": [            {              "controlId": "soc2-cc6.1"            }          ]        }      ],      "status": "fieldwork",      "periodStart": "2026-01-01T00:00:00.000Z",      "periodEnd": "2026-03-31T00:00:00.000Z",      "pendingRequestsCount": 5,      "pendingBreakdown": {        "awaitingAdmin": 2,        "awaitingAuditor": 3      },      "totalEvidenceCount": 127,      "approvedEvidenceCount": 120,      "createdAt": "2025-11-01T00:00:00.000Z"    }  ]}
GET (read)
/api/v1/companies/{companyId}/audits/{auditId}
Scope
audits:read
Auth: PAT bearer

One audit binder summary

A single audit with sampled controls and per-control auditor status. auditorStatus is keyed by control id; each status is not-reviewed, needs-info, accepted, exception or na.

Path parameters

companyId requiredType: stringDescription: Your organization id.
auditId requiredType: stringDescription: Audit id (UUID).

Request

bashGET /api/v1/companies/{companyId}/audits/{auditId}
curl 'https://comply.strac.io/api/v1/companies/comp_demo/audits/%3Caudit-uuid%3E' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "id": "<audit-uuid>",    "name": "SOC 2 Type 2 (2026)",    "status": "fieldwork",    "periodStart": "2026-01-01T00:00:00.000Z",    "periodEnd": "2026-03-31T00:00:00.000Z",    "frameworkAudits": [      {        "frameworkId": "soc2",        "mode": "type-2",        "sampledControls": [          {            "controlId": "soc2-cc6.1"          }        ]      }    ],    "auditorStatus": {      "soc2-cc6.1": {        "status": "needs-info",        "reviewedAt": "2026-04-02T15:10:00.000Z",        "notes": "Please add the Q1 access review."      }    },    "pendingRequestsCount": 5,    "totalEvidenceCount": 127,    "approvedEvidenceCount": 120  }}

Tests

GET (read)
/api/v1/companies/{companyId}/tests/results
Scope
compliance:read
Auth: PAT bearer

List automated test results

Automated evidence-collection results with a summary header. Response is {summary, results} (not the {success,data} envelope). Each test appears once per integration, at its latest result, and summary counts the results after your filters. A filter value that matches nothing (including a misspelled status) returns an empty list, not an error.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Query parameters

status optionalType: stringDescription: Filter by result status. Leave it out to get every result. acknowledged means every flagged resource is an accepted risk.passingfailingerroracknowledged
severity optionalType: stringDescription: Filter by severity. Leave it out to get every severity.criticalhighmediumlowinfo
category optionalType: stringDescription: Filter by test category, e.g. Access Control. Case and separators are ignored, so access-control matches too.
integrationId optionalType: stringDescription: Filter to one integration (e.g. aws-123456789012).

Request

bashGET /api/v1/companies/{companyId}/tests/results
curl 'https://comply.strac.io/api/v1/companies/comp_demo/tests/results?status=failing&severity=high' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "summary": {    "total": 1,    "passing": 0,    "failing": 1,    "acknowledged": 0,    "errors": 0,    "lastRun": "2026-05-27T14:30:00.000Z",    "basis": "all-live-tests"  },  "results": [    {      "id": "<result-uuid>",      "testId": "aws-s3-encryption",      "testName": "S3 Encryption Check",      "status": "failing",      "severity": "high",      "category": "Security",      "integration": "aws",      "integrationId": "aws-123456789012",      "resourceId": "s3://acme-audit-logs",      "finding": "S3 bucket 'acme-audit-logs' does not have default encryption enabled.",      "executedAt": "2026-05-27T14:30:00.000Z",      "remediationSteps": [        "Enable SSE-S3 or SSE-KMS default encryption on the bucket."      ]    }  ]}

Personnel

GET (read)
/api/v1/companies/{companyId}/employees
Scope
personnel:read
Auth: PAT bearer

Employee directory

A snapshot from the employees table (not a live IdP call), with status + department filters. Manual employment-status overrides set by an admin in the People page are honored, and so are completed offboardings: either reads as terminated here even if the IdP still shows the account. terminationSignal: "unavailable" means completed offboardings could not be read, so active may include people who already left. Any query parameter other than these three returns 400.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Query parameters

status optionalType: stringDescription: Filter by employment status.activeterminatedallDefault: active
department optionalType: stringDescription: Exact, case-sensitive department match.
limit optionalType: integerDescription: Max rows, 1 to 2000. A larger value returns 400.Default: 500

Request

bashGET /api/v1/companies/{companyId}/employees
curl 'https://comply.strac.io/api/v1/companies/comp_demo/employees?status=active&department=Engineering' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "total": 1,  "truncated": false,  "data": [    {      "employeeId": "<emp-uuid>",      "email": "alice@example.com",      "name": "Alice Smith",      "jobTitle": "Security Engineer",      "department": "Engineering",      "status": "active",      "hireDate": "2024-01-15",      "terminationDate": null    }  ]}

Audit log

GET (read)
/api/v1/companies/{companyId}/audit-log
Scope
compliance:read
Auth: PAT bearer

Append-only audit log of v1 writes

The /api/v1/* writes and MCP writes land here. Each row has who made the change, the tool, the resource, when, and whether a before and after state was recorded (hasBeforeState, hasAfterState); the states themselves are not returned. A row is written after its change, so if writing it fails, the change stands without a row. Rows come newest first, up to 200, with no paging. Filter by tool or by changeAuthor; if you send both, only changeAuthor applies.

Path parameters

companyId requiredType: stringDescription: Your organization id.

Query parameters

tool optionalType: stringDescription: Filter by tool name, e.g. v1_mark_control_na.
changeAuthor optionalType: stringDescription: Filter by actor, e.g. pat:851b5b8dabaa.
limit optionalType: integerDescription: Max rows (capped at 200).Default: 50

Request

bashGET /api/v1/companies/{companyId}/audit-log
curl 'https://comply.strac.io/api/v1/companies/comp_demo/audit-log?tool=v1_mark_control_na' \  -H 'Authorization: Bearer strac_pat_xxxxxxxxxxxx'

Response · 200

json
{  "success": true,  "data": {    "totalCount": 847,    "truncated": true,    "entries": [      {        "ts": "2026-05-27T14:32:00.000Z",        "tool": "v1_mark_control_na",        "resource": "soc2-cc6.1",        "resourceType": "control",        "userEmail": "admin@example.com",        "userRole": "admin",        "changeAuthor": "pat:851b5b8dabaa",        "clientType": "pat",        "hasBeforeState": false,        "hasAfterState": true,        "reasoning": null,        "sk": "<sort-key>"      }    ]  }}

See also