API Reference

Complete technical reference for all Compliable API endpoints.

Base URL

https://api.compliable.dev

Authentication

All API requests require an API key passed via the Authorization header as a Bearer token.

Example
Authorization: Bearer comp_sk_live_1234567890abcdef
Important: Never expose your API key in client-side code. All requests should be made from your backend.
POST

/v1/check

Check AI-generated content for compliance violations against GDPR, CCPA, HIPAA, or the EU AI Act.

Request Body

ParameterTypeRequiredDescription
contentstringYesThe AI-generated text to check for compliance violations. Max length: 50,000 characters.
contextstringYesThe type of content being checked. Valid values: privacy_policy, terms_of_service, user_disclosure, email, chatbot_response, marketing_copy
jurisdictionstringYesThe regulatory jurisdiction to check against. Valid values: EU (GDPR + EU AI Act), US_CA (CCPA), US_HIPAA
metadataobjectNoOptional metadata object for tracking purposes. Keys: user_id, request_id, tags

Response Schema

200 OK
{
  "pass": boolean,
  "violations": [
    {
      "regulation": "GDPR" | "CCPA" | "HIPAA" | "EU_AI_ACT",
      "article": string,
      "severity": "critical" | "high" | "medium" | "low",
      "issue": string,
      "context": string,
      "suggestion": string,
      "line_number": number | null
    }
  ],
  "jurisdiction": string,
  "checked_at": string (ISO 8601),
  "request_id": string
}

Example Request

cURL
curl -X POST https://api.compliable.dev/v1/check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "We use cookies to enhance your experience. By continuing to use our site, you agree to our use of cookies.",
    "context": "user_disclosure",
    "jurisdiction": "EU",
    "metadata": {
      "user_id": "user_123",
      "request_id": "req_abc456"
    }
  }'

Example Response

JSON
{
  "pass": false,
  "violations": [
    {
      "regulation": "GDPR",
      "article": "Art. 4(11) & Art. 7",
      "severity": "critical",
      "issue": "Implied consent through continued use",
      "context": "GDPR requires explicit, freely-given consent. 'By continuing to use our site' is not valid consent under GDPR Art. 7.",
      "suggestion": "Implement an explicit opt-in mechanism (checkbox, button) before setting cookies. Users must actively agree, not passively accept.",
      "line_number": null
    },
    {
      "regulation": "EU_AI_ACT",
      "article": "Art. 52.1",
      "severity": "medium",
      "issue": "Potential AI-generated content not disclosed",
      "context": "If this disclosure was generated by AI, it should be labeled as such per EU AI Act Article 52 transparency requirements.",
      "suggestion": "Add a note indicating if this content was AI-generated (e.g., 'This notice was generated with AI assistance').",
      "line_number": null
    }
  ],
  "jurisdiction": "EU",
  "checked_at": "2025-04-06T14:23:11Z",
  "request_id": "req_abc456"
}

Error Responses

Status CodeError CodeDescription
400invalid_requestMissing required parameters or invalid parameter values
401invalid_api_keyThe API key is invalid or expired
402quota_exceededMonthly API quota exceeded. Upgrade your plan or wait until next billing cycle.
413content_too_largeContent exceeds 50,000 character limit
429rate_limit_exceededToo many requests. Rate limit: 100 requests/minute.
500internal_errorInternal server error. Contact support if persists.

Error Response Schema

Error Response
{
  "error": {
    "code": "invalid_request",
    "message": "Missing required parameter: 'content'",
    "param": "content"
  }
}

Rate Limits

Rate limits are applied per API key and vary by plan:

PlanRequests/MinuteMonthly Quota
Free10100 checks
Starter6010,000 checks
Pro100100,000 checks
EnterpriseCustomUnlimited

Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Webhooks

Set up webhooks to receive notifications when compliance violations are detected in batch processing or scheduled checks.

Coming soon. Webhooks will be available in the Pro and Enterprise plans.