Skip to content

Consent link history

GET /api/v1/external/public/consent-link/history

Use this endpoint to retrieve a full list of consent link requests your organization has created, ordered from most recent to oldest. Each entry includes the current state of the request — whether consent has been completed, the link has been regenerated, and how many regenerations have occurred. Phone numbers are masked in all responses to minimize personal data exposure.

Authentication

Both headers are required.

HeaderTypeRequiredDescription
X-Org-IdstringYesYour organization slug
X-API-KeystringYesYour tenant API key

Query parameters

ParameterTypeRequiredDescription
asset_idstringYesFilter history to this asset ID
collection_point_idstringNoFilter by collection point UUID or display_id
event_idstringNoFilter to a specific event ID
dp_idstringNoFilter by data principal ID
fromstringNoISO 8601 start timestamp. Must be in the past.
tostringNoISO 8601 end timestamp. Defaults to current UTC time.
limitintegerNoNumber of records to return. Between 1 and 200. Default: 50.
offsetintegerNoNumber of records to skip for pagination. Default: 0.

Response

200 OK

FieldTypeDescription
dataarrayArray of consent link request objects
countintegerTotal number of records matching the filters
summaryobjectAggregate counts across the filtered result set
collectionPointSummaryobjectPer-collection-point breakdown of counts, keyed by collection point ID
filtersobjectEcho of the filters applied to this request

data[] fields:

FieldTypeDescription
request_idstringStable identifier for this consent request
event_idstringIdentifier of the most recently issued link instance
collection_point_idstringUUID of the associated collection point
asset_idstringUUID of the associated asset
phonestringMasked phone number — only last 3–4 digits visible
statusstringactive, complete, or expired
created_atstringISO 8601 timestamp of when the request was created
expires_atstringISO 8601 timestamp of when the link expires
completed_atstringISO 8601 timestamp of consent submission. null if not yet completed.
consent_actionstringThe action chosen by the data principal, or null
regeneration_countintegerNumber of times this request has been duplicated

summary fields:

FieldTypeDescription
total_linksintegerTotal links created
activeintegerLinks currently active
completedintegerLinks where consent was submitted
expiredintegerLinks that expired without consent

Errors

StatusDescription
400X-Org-Id could not be resolved, asset_id is missing, or timestamp format is invalid
401X-API-Key is invalid or missing
403API key lacks the admin scope
500Internal server error

Example

Terminal window
curl --request GET \
--url 'https://truapi-dev.truconsent.io/api/v1/external/public/consent-link/history?asset_id=ast_xxxxxxxxxxxx&limit=50&offset=0' \
--header 'X-Org-Id: acme' \
--header 'X-API-Key: tck_live_xxxxxxxxxxxx'
{
"data": [
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"event_id": "11223344-5566-7788-99aa-bbccddeeff00",
"collection_point_id": "a0b1c2d3-1111-2222-3333-444455556666",
"asset_id": "ast_xxxxxxxxxxxx",
"phone": "+*******4311",
"status": "expired",
"created_at": "2026-04-21T08:30:00+00:00",
"expires_at": "2026-04-22T08:30:00+00:00",
"completed_at": null,
"consent_action": null,
"regeneration_count": 1
},
{
"request_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"event_id": "aabbccdd-eeff-0011-2233-445566778899",
"collection_point_id": "b7c8d9e0-aaaa-bbbb-cccc-111122223333",
"asset_id": "ast_xxxxxxxxxxxx",
"phone": "+*******7890",
"status": "complete",
"created_at": "2026-04-19T15:00:00+00:00",
"expires_at": "2026-04-20T15:00:00+00:00",
"completed_at": "2026-04-19T16:22:10+00:00",
"consent_action": "approved",
"regeneration_count": 0
}
],
"count": 2,
"summary": {
"total_links": 2,
"active": 0,
"completed": 1,
"expired": 1
},
"collectionPointSummary": {
"a0b1c2d3-1111-2222-3333-444455556666": { "total": 1, "active": 0, "completed": 0, "expired": 1 },
"b7c8d9e0-aaaa-bbbb-cccc-111122223333": { "total": 1, "active": 0, "completed": 1, "expired": 0 }
},
"filters": {
"assetId": "ast_xxxxxxxxxxxx",
"collectionPointId": null,
"eventId": null,
"dpId": null,
"from": null,
"to": "2026-04-22T10:00:00+00:00",
"limit": 50,
"offset": 0
}
}