List consent history
GET
/consent/{collection_point_id}/consentsUse this endpoint to retrieve all consent log entries recorded for a specific user at a given collection point, ordered from newest to oldest. If the user has no consent records at all (across any collection point), the API returns 404.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_point_id | string | Yes | UUID or display_id of the collection point |
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
userId | string | — | Required. The user ID whose consent history you want to retrieve. |
limit | integer | 50 | Number of records to return per page. Maximum: 100. |
offset | integer | 0 | Number of records to skip before returning results. Use with limit to paginate. |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-Key | string | Yes | Your tenant API key |
Response
200 OK
| Field | Type | Description |
|---|---|---|
collection_point | object | Snapshot of the collection point at query time |
user_id | string | The user ID that was queried |
consents | array | Consent log entries, ordered newest first |
total_count | integer | Total number of consent records before pagination |
limit | integer | The effective page size for this response |
offset | integer | The effective offset for this response |
collection_point fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the collection point |
name | string | Display name |
description | string | Description, or null if not set |
consents[] fields:
| Field | Type | Description |
|---|---|---|
id | string | UUID of the consent log entry |
action | string | The recorded decision: approved, declined, partial_consent, revoked, or no_action |
purpose_consents | array | Per-purpose breakdown. See Record consent for structure. |
timestamp | string | ISO 8601 timestamp |
request_id | string | Request identifier supplied at record time, or a server-generated UUID |
collection_point_version | integer | Version of the collection point definition active when this entry was recorded |
metadata | object | Arbitrary key-value metadata attached to this consent entry |
status | string | Processing status of the consent log entry |
Errors
| Status | Description |
|---|---|
400 | userId query parameter is missing |
404 | No collection point found, or the user has no consent records |
500 | Internal server error |
Example
curl --request GET \ --url 'https://{your-truConsent-endpoint}/consent/cp_signup_form/consents?userId=usr_7f3a9b21&limit=10&offset=0' \ --header 'X-API-Key: tck_live_xxxxxxxxxxxx'{ "collection_point": { "id": "a0b1c2d3-1111-2222-3333-444455556666", "name": "Sign-up form", "description": "Consent collected at new user registration" }, "user_id": "usr_7f3a9b21", "consents": [ { "id": "c1d2e3f4-aaaa-bbbb-cccc-ddddeeeeeeee", "action": "partial_consent", "purpose_consents": [ { "purpose_id": "3d6e2f1a-bc74-4e9a-a801-123456789abc", "purpose_name": "Marketing emails", "status": "approved", "is_mandatory": false, "purpose_type": "marketing", "purpose_version": 1 }, { "purpose_id": "9a1b4c2d-ef56-7890-b234-abcdef012345", "purpose_name": "Analytics", "status": "declined", "is_mandatory": false, "purpose_type": "analytics", "purpose_version": 1 } ], "timestamp": "2026-04-21T10:34:52.123456", "request_id": "req_external_8821", "collection_point_version": 1, "metadata": { "ip_address": "203.0.113.42" }, "status": "pending" }, { "id": "b9c8d7e6-ffff-eeee-dddd-ccccbbbbaaaa", "action": "declined", "purpose_consents": [], "timestamp": "2026-03-10T08:12:00.000000", "request_id": "e2f3a4b5-0000-1111-2222-333344445555", "collection_point_version": 1, "metadata": {}, "status": "pending" } ], "total_count": 2, "limit": 10, "offset": 0}