{
  "info": {
    "name": "ConsentOS Consent Capture API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Consent capture API verified from app source on 15 October 2026. Available on Growth and above. See https://consentos.in/pricing/ for plan detail. Set api_key privately to an organisation-scoped API key minted in the app's Settings. Keep keys outside source control and shared exports. All example values are synthetic."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://app.consentos.in",
      "type": "string",
      "description": "ConsentOS app API origin. No trailing slash."
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string",
      "description": "Set privately to your organisation-scoped API key. Do not export credentials."
    }
  ],
  "item": [
    {
      "name": "Record consent",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Authorization",
            "value": "Bearer {{api_key}}"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Idempotency-Key",
            "value": "example-consent-0001",
            "disabled": true,
            "description": "Optional. Enable for safely retryable requests. Use 1 to 255 printable ASCII characters with no spaces. Scoped to the organisation for 24 hours. Use a new key for a different body."
          }
        ],
        "url": "{{baseUrl}}/api/v1/consent",
        "description": "Record consent on Growth and above using an organisation-scoped API key minted in the app's Settings. principal_email and purpose_code are required. purpose_code is one of marketing, analytics, service_delivery, legal_compliance, research, personalisation, third_party_sharing, profiling. expires_at is optional and must be an ISO 8601 date-time in the future; an invalid value returns 400 with a field error named expires_at. mechanism is fixed to api_call and may be omitted. Rate limits are 60 grants per minute per key, then 120 per minute across all keys of the organisation. Exceeded limits return 429 with {\"error\":\"Too many requests\"} and Retry-After in seconds. An invalid Idempotency-Key returns 400 with {\"error\":\"Idempotency-Key must be 1 to 255 printable ASCII characters with no spaces\"}. Reusing it for a different body returns 422 with {\"error\":\"This Idempotency-Key was already used for a different consent request\"}. A replay returns the original 201 body with Idempotent-Replayed: true. If a 503 indicates an unknown signing or ledger outcome, retry with the same Idempotency-Key. Missing or malformed authentication returns 401 with {\"error\":\"Unauthorized\"}; a revoked key returns 403 with {\"error\":\"Forbidden\"}; an unprovisioned key service returns 503 with {\"error\":\"Service unavailable\"}. Lower plans return 403 with {\"error\":\"This feature is not available on your plan.\"}. An ended trial returns 403 with {\"error\":\"Trial term ended. This workspace is read-only until a plan is activated.\"}. A 500 returns {\"error\":\"Failed to record consent event\"} or {\"error\":\"Failed to create consent artifact\"}.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"principal_email\": \"example@example.com\",\n  \"purpose_code\": \"marketing\",\n  \"expires_at\": \"2099-01-01T00:00:00Z\",\n  \"mechanism\": \"api_call\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "response": [
        {
          "name": "Consent recorded",
          "originalRequest": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{api_key}}"
              },
              {
                "key": "Accept",
                "value": "application/json"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "example-consent-0001",
                "disabled": true,
                "description": "Optional. Enable for safely retryable requests. Use 1 to 255 printable ASCII characters with no spaces. Scoped to the organisation for 24 hours. Use a new key for a different body."
              }
            ],
            "url": "{{baseUrl}}/api/v1/consent",
            "description": "Record consent on Growth and above using an organisation-scoped API key minted in the app's Settings. principal_email and purpose_code are required. purpose_code is one of marketing, analytics, service_delivery, legal_compliance, research, personalisation, third_party_sharing, profiling. expires_at is optional and must be an ISO 8601 date-time in the future; an invalid value returns 400 with a field error named expires_at. mechanism is fixed to api_call and may be omitted. Rate limits are 60 grants per minute per key, then 120 per minute across all keys of the organisation. Exceeded limits return 429 with {\"error\":\"Too many requests\"} and Retry-After in seconds. An invalid Idempotency-Key returns 400 with {\"error\":\"Idempotency-Key must be 1 to 255 printable ASCII characters with no spaces\"}. Reusing it for a different body returns 422 with {\"error\":\"This Idempotency-Key was already used for a different consent request\"}. A replay returns the original 201 body with Idempotent-Replayed: true. If a 503 indicates an unknown signing or ledger outcome, retry with the same Idempotency-Key. Missing or malformed authentication returns 401 with {\"error\":\"Unauthorized\"}; a revoked key returns 403 with {\"error\":\"Forbidden\"}; an unprovisioned key service returns 503 with {\"error\":\"Service unavailable\"}. Lower plans return 403 with {\"error\":\"This feature is not available on your plan.\"}. An ended trial returns 403 with {\"error\":\"Trial term ended. This workspace is read-only until a plan is activated.\"}. A 500 returns {\"error\":\"Failed to record consent event\"} or {\"error\":\"Failed to create consent artifact\"}.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"principal_email\": \"example@example.com\",\n  \"purpose_code\": \"marketing\",\n  \"expires_at\": \"2099-01-01T00:00:00Z\",\n  \"mechanism\": \"api_call\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "status": "Created",
          "code": 201,
          "_postman_previewlanguage": "json",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "cookie": [],
          "body": "{\n  \"id\": \"00000000-0000-0000-0000-000000000000\",\n  \"artifact_hash\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n  \"granted_at\": \"2026-10-15T00:00:00Z\"\n}"
        }
      ]
    }
  ]
}
