For platform partners

Add DPDP compliance to your product with one API

Run compliance audits, generate privacy policies, score vendors, track breach clocks and log data-subject requests for your clients, from your own software.

Quickstart

  1. Get API access (Enterprise plan; firm accounts can manage many clients). Request access below.
  2. Sign in and create a key at Settings → API keys. Copy it: it is shown once.
  3. Call GET /me to check the key, then create a client and run an audit.

curl

curl https://complisarthi.com/api/v1/me \
  -H "Authorization: Bearer $COMPLISARTHI_API_KEY"

Authentication

Every request needs an API key, sent as a bearer token. The header X-API-Key: <key> also works.

Header

Authorization: Bearer cs_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Keys start with cs_live_. We store only a hash, so a lost key cannot be recovered: create a new one and revoke the old.
  • Keep keys on your server, in environment variables or a secrets manager. Never put one in a browser, mobile app or public repository. The API sends no CORS headers on purpose.
  • A key belongs to one account. A firm key acts on that firm’s client workspaces; an Enterprise company’s key acts on its own workspace.
  • Revoking a key takes effect immediately. A key stops working if its account is suspended or leaves the Enterprise plan.
  • Use one key per integration so you can rotate and revoke them independently.

Conventions

  • Base URL: https://complisarthi.com/api/v1. The version is in the path; breaking changes will ship as /v2.
  • Requests and responses are JSON (UTF-8). Send Content-Type: application/json with a body. Bodies over 256 KB are rejected.
  • Success: { "data": … }. Failure: { "error": { "code": "…", "message": "…" } }. Branch on error.code, not the message.
  • Every response carries X-Request-Id. Quote it when you contact support.
  • Timestamps are ISO 8601 in UTC. Ids are UUIDs.
  • A client is the end business you serve. Map it to your own record with external_ref.
  • We log metadata for every call (key, route, status, timing). We never store request or response bodies in the usage log.

Rate limits

Each key has its own limit, 60 requests per minute by default (set per key, up to 600). The window is one clock minute. Every response includes:

Headers

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1763203260   # unix time when the window resets

When you exceed the limit you receive 429 with a Retry-After header (seconds). Back off and retry; spread bulk jobs over time.

Errors

HTTPerror.codeMeaning
400invalid_jsonThe body is not valid JSON.
401unauthorizedMissing, invalid or revoked API key.
402plan_limitThe client's plan limit was reached (for example policies or vendors).
403forbiddenThe key's account is not allowed to do this (for example creating clients from a non-firm account).
404not_foundThe client or resource does not exist or is not yours.
409conflictThe resource already exists (for example a duplicate external_ref).
413payload_too_largeThe body is over 256 KB.
422validation_failed / incomplete_answersThe body did not pass validation; error.issues lists the problems.
429rate_limitedToo many requests. See Retry-After.
500internal_errorSomething went wrong on our side. Quote the request id.

Example (422)

{
  "error": {
    "code": "validation_failed",
    "message": "The request did not pass validation.",
    "issues": [
      {
        "path": "storage",
        "message": "Invalid option"
      }
    ]
  }
}

Account and clients

Check your key

GET /api/v1/me

Returns the account the key belongs to and its rate limit. Use it to test a new key.

Response · 200

{
  "data": {
    "account": "Sharma & Associates",
    "type": "firm",
    "key_name": "Tally connector — production",
    "rate_limit_per_minute": 60
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/me", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/me",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/me');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

List clients

GET /api/v1/clients?external_ref=tally-10442

For a firm key: your client workspaces. For any other Enterprise key: a single entry, your own workspace.

Filter with ?external_ref= to find the client you mapped to your own record.

Response · 200

{
  "data": [
    {
      "id": "5b9a6615-7f54-4964-8051-8843070b475e",
      "name": "Acme Textiles Pvt Ltd",
      "plan": "starter",
      "external_ref": "tally-10442",
      "created_at": "2026-11-15T09:00:00.000Z",
      "latest_audit": {
        "score": 65,
        "rating": "Needs work",
        "completed_at": "2026-11-15T10:42:11.000Z"
      }
    }
  ]
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Create a client

POST /api/v1/clients

Firm accounts only. Creates an isolated workspace. Clients are billed to the firm at the per-client rate for their plan.

external_ref is your own identifier for the client (unique per firm). plan is starter, growth or enterprise (default starter).

Request body (JSON)

{
  "name": "Acme Textiles Pvt Ltd",
  "external_ref": "tally-10442",
  "plan": "starter"
}

Response · 201

{
  "data": {
    "id": "5b9a6615-7f54-4964-8051-8843070b475e",
    "name": "Acme Textiles Pvt Ltd",
    "plan": "starter",
    "external_ref": "tally-10442",
    "created_at": null,
    "latest_audit": null
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Acme Textiles Pvt Ltd",
    "external_ref": "tally-10442",
    "plan": "starter"
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/clients",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "name": "Acme Textiles Pvt Ltd",
      "external_ref": "tally-10442",
      "plan": "starter"
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "name" => 'Acme Textiles Pvt Ltd',
        "external_ref" => 'tally-10442',
        "plan" => 'starter',
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Get a client

GET /api/v1/clients/{client_id}

Response · 200

{
  "data": {
    "id": "5b9a6615-7f54-4964-8051-8843070b475e",
    "name": "Acme Textiles Pvt Ltd",
    "plan": "starter",
    "external_ref": "tally-10442",
    "created_at": "2026-11-15T09:00:00.000Z",
    "latest_audit": {
      "score": 65,
      "rating": "Needs work",
      "completed_at": "2026-11-15T10:42:11.000Z"
    }
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Compliance audit

Get the audit questions

GET /api/v1/audit/questions

The question set to show in your own interface. Answers must be one of the listed values.

Response · 200

{
  "data": {
    "answers": [
      "yes",
      "partial",
      "no",
      "na",
      "unaware"
    ],
    "areas": [
      {
        "id": "consent",
        "name": "Consent"
      }
    ],
    "questions": [
      {
        "id": "C1",
        "area": "consent",
        "text": "Do you ask for consent before collecting personal data?",
        "weight": 3
      }
    ]
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/audit/questions", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/audit/questions",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/audit/questions');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Run a compliance audit

POST /api/v1/clients/{client_id}/audit

Send an answer for every question (see /audit/questions). The audit is scored immediately and returns the score, a rating per area, and the ranked gaps with a fix for each.

If any question is unanswered the call fails with 422 incomplete_answers and lists the missing ids. profile is optional. Calling again runs a new audit; earlier results are kept.

Request body (JSON)

{
  "profile": {
    "company_name": "Acme Textiles Pvt Ltd",
    "industry": "Manufacturing",
    "company_size": "11–50",
    "data_types": [
      "Contact details"
    ]
  },
  "answers": {
    "C1": "partial",
    "…": "one entry per question id"
  }
}

Response · 201

{
  "data": {
    "assessment_id": "0b6c1a54-3f0e-4d4e-9d0a-5d3f1b2c7a10",
    "score": 65,
    "rating": "Needs work",
    "completed_at": "2026-11-15T10:42:11.000Z",
    "sections": [
      {
        "area": "consent",
        "name": "Consent",
        "score": 58,
        "rating": "Needs work"
      }
    ],
    "gaps": [
      {
        "question_id": "C1",
        "area": "consent",
        "question": "Do you ask for consent before collecting personal data?",
        "answer": "partial",
        "gap": "Consent is not collected consistently.",
        "fix": "Add a consent step to every data-collection form.",
        "recommended_module": "consent-manager",
        "priority": 6
      }
    ]
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/audit", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "profile": {
      "company_name": "Acme Textiles Pvt Ltd",
      "industry": "Manufacturing",
      "company_size": "11–50",
      "data_types": [
        "Contact details"
      ]
    },
    "answers": {
      "C1": "partial",
      "…": "one entry per question id"
    }
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/audit",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "profile": {
        "company_name": "Acme Textiles Pvt Ltd",
        "industry": "Manufacturing",
        "company_size": "11–50",
        "data_types": [
          "Contact details"
        ]
      },
      "answers": {
        "C1": "partial",
        "…": "one entry per question id"
      }
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/audit');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "profile" => [
            "company_name" => 'Acme Textiles Pvt Ltd',
            "industry" => 'Manufacturing',
            "company_size" => '11–50',
            "data_types" => ['Contact details'],
        ],
        "answers" => [
            "C1" => 'partial',
            "…" => 'one entry per question id',
        ],
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Get the latest audit result

GET /api/v1/clients/{client_id}/audit

404 no_audit if the client has no completed audit.

Response · 200

{
  "data": {
    "assessment_id": "0b6c1a54-3f0e-4d4e-9d0a-5d3f1b2c7a10",
    "score": 65,
    "rating": "Needs work",
    "completed_at": "2026-11-15T10:42:11.000Z",
    "sections": [
      {
        "area": "consent",
        "name": "Consent",
        "score": 58,
        "rating": "Needs work"
      }
    ],
    "gaps": [
      {
        "question_id": "C1",
        "area": "consent",
        "question": "Do you ask for consent before collecting personal data?",
        "answer": "partial",
        "gap": "Consent is not collected consistently.",
        "fix": "Add a consent step to every data-collection form.",
        "recommended_module": "consent-manager",
        "priority": 6
      }
    ]
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/audit", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/audit",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/audit');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Privacy policy

Generate a privacy policy

POST /api/v1/clients/{client_id}/policies

Drafts a DPDP-aligned privacy policy from structured answers. Uses an AI model when one is available and a built-in template otherwise (engine tells you which). Counts towards the client's plan limit (402 plan_limit when reached).

Request body (JSON)

{
  "title": "Privacy policy",
  "company_name": "Acme Textiles Pvt Ltd",
  "contact_email": "privacy@acme.example",
  "officer_name": "Asha Rao",
  "officer_email": "asha@acme.example",
  "data_collected": [
    "Name and contact details"
  ],
  "purposes": [
    "Providing the product or service"
  ],
  "storage": "india",
  "retention": "3 years after the last order",
  "children": false,
  "ai_use": false,
  "cookies": true
}

Response · 201

{
  "data": {
    "id": "7d3c0f0e-61a6-4a43-8b3c-0d2b5d9f2e11",
    "title": "Privacy policy",
    "version": 1,
    "engine": "template",
    "content_markdown": "# Privacy Policy\n…"
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/policies", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "title": "Privacy policy",
    "company_name": "Acme Textiles Pvt Ltd",
    "contact_email": "privacy@acme.example",
    "officer_name": "Asha Rao",
    "officer_email": "asha@acme.example",
    "data_collected": [
      "Name and contact details"
    ],
    "purposes": [
      "Providing the product or service"
    ],
    "storage": "india",
    "retention": "3 years after the last order",
    "children": false,
    "ai_use": false,
    "cookies": true
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/policies",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "title": "Privacy policy",
      "company_name": "Acme Textiles Pvt Ltd",
      "contact_email": "privacy@acme.example",
      "officer_name": "Asha Rao",
      "officer_email": "asha@acme.example",
      "data_collected": [
        "Name and contact details"
      ],
      "purposes": [
        "Providing the product or service"
      ],
      "storage": "india",
      "retention": "3 years after the last order",
      "children": False,
      "ai_use": False,
      "cookies": True
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/policies');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "title" => 'Privacy policy',
        "company_name" => 'Acme Textiles Pvt Ltd',
        "contact_email" => 'privacy@acme.example',
        "officer_name" => 'Asha Rao',
        "officer_email" => 'asha@acme.example',
        "data_collected" => ['Name and contact details'],
        "purposes" => ['Providing the product or service'],
        "storage" => 'india',
        "retention" => '3 years after the last order',
        "children" => false,
        "ai_use" => false,
        "cookies" => true,
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

List policies

GET /api/v1/clients/{client_id}/policies

Response · 200

{
  "data": [
    {
      "id": "7d3c0f0e-61a6-4a43-8b3c-0d2b5d9f2e11",
      "title": "Privacy policy",
      "version": 1,
      "created_at": "2026-11-15T10:50:00.000Z"
    }
  ]
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/policies", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/policies",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/policies');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Get a policy

GET /api/v1/clients/{client_id}/policies/{policy_id}?version=1

Response · 200

{
  "data": {
    "id": "7d3c0f0e-61a6-4a43-8b3c-0d2b5d9f2e11",
    "title": "Privacy policy",
    "current_version": 1,
    "version": 1,
    "engine": "template",
    "created_at": "2026-11-15T10:50:00.000Z",
    "content_markdown": "# Privacy Policy\n…",
    "versions": [
      1
    ]
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/policies/POLICY_ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/policies/POLICY_ID",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/policies/POLICY_ID');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Vendor risk

Score a vendor (stateless)

POST /api/v1/vendor-risk/score

Scores a vendor profile and returns the contributing factors. Nothing is stored and no client is needed. Public breach history is not looked up by this call; use a stored vendor for that.

Request body (JSON)

{
  "data_types": [
    "Payment and billing details"
  ],
  "data_volume": "10k_100k",
  "dpa_status": "missing",
  "hosting_country": "United States",
  "security_certs": [
    "ISO 27001"
  ]
}

Response · 200

{
  "data": {
    "score": 55,
    "level": "high",
    "factors": [
      {
        "factor": "dpa",
        "points": 25,
        "reason": "No data processing agreement is in place.",
        "fix": "Sign a DPA before sharing more data."
      }
    ]
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/vendor-risk/score", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "data_types": [
      "Payment and billing details"
    ],
    "data_volume": "10k_100k",
    "dpa_status": "missing",
    "hosting_country": "United States",
    "security_certs": [
      "ISO 27001"
    ]
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/vendor-risk/score",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "data_types": [
        "Payment and billing details"
      ],
      "data_volume": "10k_100k",
      "dpa_status": "missing",
      "hosting_country": "United States",
      "security_certs": [
        "ISO 27001"
      ]
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/vendor-risk/score');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "data_types" => ['Payment and billing details'],
        "data_volume" => '10k_100k',
        "dpa_status" => 'missing',
        "hosting_country" => 'United States',
        "security_certs" => ['ISO 27001'],
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Add and score a vendor

POST /api/v1/clients/{client_id}/vendors

Stores the vendor in the client's register and returns its risk result. Counts towards the client's vendor limit.

Request body (JSON)

{
  "name": "Smoke Cloud",
  "domain": "example.com",
  "category": "Cloud / hosting",
  "data_types": [
    "Name and contact details"
  ],
  "data_volume": "1k_10k",
  "dpa_status": "missing",
  "security_certs": [],
  "shared_since": "",
  "dpa_signed_on": "",
  "dpa_expires_on": "",
  "last_reviewed": ""
}

Response · 201

{
  "data": {
    "id": "2f6e0d2c-7a1b-4c59-9f43-6b7a1d0e8c55",
    "name": "Smoke Cloud",
    "domain": "example.com",
    "category": "Cloud / hosting",
    "data_types": [
      "Name and contact details"
    ],
    "data_volume": "1k_10k",
    "dpa_status": "missing",
    "dpa_expires_on": null,
    "hosting_country": "",
    "security_certs": [],
    "risk": {
      "score": 40,
      "level": "medium",
      "factors": [
        {
          "factor": "dpa",
          "points": 25,
          "reason": "No data processing agreement is in place.",
          "fix": "Sign a DPA."
        }
      ],
      "scored_at": "2026-11-15T10:55:00.000Z"
    },
    "public_breaches": {
      "count": 0,
      "latest": null,
      "checked_at": null
    },
    "created_at": "2026-11-15T10:55:00.000Z"
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Smoke Cloud",
    "domain": "example.com",
    "category": "Cloud / hosting",
    "data_types": [
      "Name and contact details"
    ],
    "data_volume": "1k_10k",
    "dpa_status": "missing",
    "security_certs": [],
    "shared_since": "",
    "dpa_signed_on": "",
    "dpa_expires_on": "",
    "last_reviewed": ""
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "name": "Smoke Cloud",
      "domain": "example.com",
      "category": "Cloud / hosting",
      "data_types": [
        "Name and contact details"
      ],
      "data_volume": "1k_10k",
      "dpa_status": "missing",
      "security_certs": [],
      "shared_since": "",
      "dpa_signed_on": "",
      "dpa_expires_on": "",
      "last_reviewed": ""
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "name" => 'Smoke Cloud',
        "domain" => 'example.com',
        "category" => 'Cloud / hosting',
        "data_types" => ['Name and contact details'],
        "data_volume" => '1k_10k',
        "dpa_status" => 'missing',
        "security_certs" => [],
        "shared_since" => '',
        "dpa_signed_on" => '',
        "dpa_expires_on" => '',
        "last_reviewed" => '',
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

List vendors with risk scores

GET /api/v1/clients/{client_id}/vendors

Highest risk first. Each item has the same shape as the create response.

Response · 200

{
  "data": []
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/vendors');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Breach notification status

Get breach notification status

GET /api/v1/clients/{client_id}/breaches

Read-only view of the incident register. For each incident, notification.board is the 72-hour clock for the Data Protection Board and notification.cert_in is the 6-hour clock for CERT-In. state is green, amber, red, overdue, or stopped once notified.

Incidents are created and managed in the app, not through the API.

Response · 200

{
  "data": [
    {
      "id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
      "reference": "INC-0001",
      "title": "Laptop stolen",
      "status": "open",
      "severity": "high",
      "breach_type": "unauthorised_access",
      "detected_at": "2026-11-15T08:00:00.000Z",
      "occurred_at": null,
      "affected_count": 120,
      "notification": {
        "board": {
          "due_at": "2026-11-18T08:00:00.000Z",
          "state": "green",
          "remaining_seconds": 250000,
          "notified_at": null,
          "late_by_seconds": 0,
          "reference": null
        },
        "cert_in": {
          "due_at": "2026-11-15T14:00:00.000Z",
          "state": "green",
          "remaining_seconds": 20000,
          "notified_at": null,
          "late_by_seconds": 0,
          "reference": null
        },
        "affected_people_notified_at": null
      },
      "closed_at": null
    }
  ]
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Get one incident

GET /api/v1/clients/{client_id}/breaches/{incident_id}

Same shape as the list items, plus drafted_notices (kind, language and time of each drafted notice; the text itself is not returned).

Response · 200

{
  "data": {}
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches/INCIDENT_ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches/INCIDENT_ID",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/breaches/INCIDENT_ID');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Data subject requests

Submit a data subject request

POST /api/v1/clients/{client_id}/data-requests

Logs an access, correction, erasure or grievance request from a Data Principal. The 30-day response clock starts now, and a request.created webhook is sent to the client workspace's endpoints.

Request body (JSON)

{
  "type": "erasure",
  "contact": "customer@example.com",
  "subject_id": "cust_88213",
  "details": "Please delete my account data."
}

Response · 201

{
  "data": {
    "id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
    "type": "erasure",
    "status": "received",
    "due_at": "2026-12-15T10:00:00.000Z"
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "erasure",
    "contact": "customer@example.com",
    "subject_id": "cust_88213",
    "details": "Please delete my account data."
  }),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "POST",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    json={
      "type": "erasure",
      "contact": "customer@example.com",
      "subject_id": "cust_88213",
      "details": "Please delete my account data."
    },
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "type" => 'erasure',
        "contact" => 'customer@example.com',
        "subject_id" => 'cust_88213',
        "details" => 'Please delete my account data.',
    ]),
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

List data requests

GET /api/v1/clients/{client_id}/data-requests

Response · 200

{
  "data": [
    {
      "id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "type": "erasure",
      "status": "received",
      "received_at": "2026-11-15T10:00:00.000Z",
      "due_at": "2026-12-15T10:00:00.000Z",
      "completed_at": null
    }
  ]
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Get a data request's status

GET /api/v1/clients/{client_id}/data-requests/{request_id}

Response · 200

{
  "data": {
    "id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
    "type": "erasure",
    "status": "received",
    "received_at": "2026-11-15T10:00:00.000Z",
    "due_at": "2026-12-15T10:00:00.000Z"
  }
}
Code examples: JavaScript, Python, PHP

JavaScript (Node 18+)

const res = await fetch("https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests/REQUEST_ID", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.COMPLISARTHI_API_KEY}`,
  },
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
console.log(data);

Python (requests)

import os, requests

res = requests.request(
    "GET",
    "https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests/REQUEST_ID",
    headers={"Authorization": "Bearer " + os.environ["COMPLISARTHI_API_KEY"]},
    timeout=30,
)
payload = res.json()
if not res.ok:
    raise RuntimeError(payload["error"]["code"] + ": " + payload["error"]["message"])
print(payload["data"])

PHP (cURL)

<?php
$ch = curl_init('https://complisarthi.com/api/v1/clients/CLIENT_ID/data-requests/REQUEST_ID');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('COMPLISARTHI_API_KEY'),
    ],
]);
$payload = json_decode(curl_exec($ch), true);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($payload['error']['code'] . ': ' . $payload['error']['message']);
}
print_r($payload['data']);

Webhooks

Complisarthi can notify your server when something happens in a workspace. Endpoints are set up per workspace in the app (open the client, then Consent → Webhooks). Each endpoint has a signing secret and a list of events. Delivery is a single attempt with a 5-second timeout, and each outcome is logged in the app; there are no automatic retries yet, so make your handler fast and idempotent. URLs must be public HTTPS.

Delivery

POST https://your-server.example/hooks/complisarthi
Content-Type: application/json
X-Complisarthi-Event: request.created
X-Complisarthi-Signature: sha256=<hex HMAC-SHA256 of the raw body, key = your endpoint secret>

{
  "event": "request.created",
  "at": "2026-11-15T10:00:00.000Z",
  "data": {
    "id": "…",
    "type": "erasure",
    "due_at": "2026-12-15T10:00:00.000Z"
  }
}

Events

consent.recordedA person gave, changed or withdrew consent.{"property_id":"…","subject_id":"cust_88213","action":"accept_all","purposes":{"marketing":true},"source":"web","event_id":"…"}
request.createdA data request was logged (in the portal, in the app, or through the API).{"id":"…","type":"erasure","due_at":"2026-12-15T10:00:00.000Z"}
request.updatedA data request changed status.{"id":"…","status":"completed"}
incident.createdA breach incident was recorded.{"id":"…","ref":"INC-0001","severity":"high","detected_at":"2026-11-15T08:00:00.000Z"}
ai_incident.createdAn AI-system incident was logged.{"id":"…","ref":"AI-0001","system_id":"…","severity":"medium"}

Verify the signature

Compute the HMAC over the raw body (before JSON parsing) and compare in constant time. Reject requests that do not match.

JavaScript

import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody must be the exact request body string, before any JSON parsing.
export function verify(rawBody, signatureHeader, secret) {
  const expected = "sha256=" + createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(signatureHeader ?? "");
  return a.length === b.length && timingSafeEqual(a, b);
}

Python

import hmac, hashlib

def verify(raw_body: bytes, signature_header: str, secret: str) -> bool:
    expected = "sha256=" + hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, signature_header or "")

PHP

<?php
function verify(string $rawBody, ?string $signatureHeader, string $secret): bool {
    $expected = 'sha256=' . hash_hmac('sha256', $rawBody, $secret);
    return hash_equals($expected, $signatureHeader ?? '');
}

Getting access

API access is part of the Enterprise plan. Platform partners, such as accounting, audit and practice-management software, get a firm account so each of their customers becomes an isolated client workspace. We review partner requests manually, and per-client fees apply as set out in your agreement. A free sandbox is not available yet.

Request API access

The compliance results from this API are guidance, not legal advice. Changelog: v1, 15 November 2026, initial release.