---
title: "List consent records"
method: GET
path: "/api/v1/consent"
tags: ["Consent"]
---

# List consent records

`GET /api/v1/consent`

## Request

- Base URL: `https://policyforge.co`
- URL: `https://policyforge.co/api/v1/consent`
- Auth: HTTP bearer

List all consent records for the authenticated API key owner, paginated and filterable. Returns consents recorded via both the embeddable banner (`source: "banner"`) and the POST /api/v1/consent API (`source: "api"`). Use the cursor returned in `next_cursor` to page.

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `end_user_id` string
- `policy_version` string
- `policy_id` string, uuid
- `banner_config_id` string, uuid
- `source` 'banner' | 'api'
- `limit` integer
- `cursor` string

## Response `200`

Paginated list of consent records

- object
  - `consent_records` ConsentRecord[]
    - `id` string, uuid
    - `user_id` string: End-user / visitor identifier (this is `end_user_id` in the database).
    - `policy_version` string: Policy version stamp captured at consent time.
    - `consents` object
    - `ip_address` string, nullable
    - `user_agent` string, nullable
    - `source` 'banner' | 'api': `banner` = recorded via the embeddable cookie banner. `api` = recorded via POST /api/v1/consent or a hosted-policy 'I Agree' click.
    - `banner_config_id` string, uuid, nullable: Set when `source` is `banner`. `null` for API-recorded consents.
    - `policy_id` string, uuid, nullable: Set when the consent is tied to a specific PolicyForge policy (cookie banner with a linked policy, hosted-policy 'I Agree', or API consent that included a policy_id).
    - `recorded_at` string, date-time
  - `page_size` integer: Number of records returned in this page.
  - `limit` integer: Limit applied to this query.
  - `total_count` integer, nullable: Total matching records across all pages.
  - `next_cursor` string, nullable: Cursor to pass back as `?cursor=` for the next page. `null` when there are no more pages.

## Other responses

- `401`: Missing or invalid API key
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/policyforge/apis/policyforge-api.md) · [All operations](https://skmtc.dev/policyforge/apis/policyforge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/policyforge/apis/policyforge-api/revisions/d00d4dbf458e?raw)
