Skip to content

Regenerate consent link

POST /api/outside-app/consent-link/regenerate/{request_id}

Use this endpoint to issue a new magic link when the original link has expired and the data principal has not yet completed consent. Regenerating a link preserves the original request_id, so any downstream tracking or status checks continue to work without changes. The expired link is marked as regenerated and is no longer accessible to the data principal.

Authentication

Path parameters

ParameterTypeRequiredDescription
request_idstringYesThe request_id returned when the original link was created

Body

FieldTypeDefaultDescription
expiry_hoursinteger24How many hours the new link remains valid. Between 1 and 24.
send_smsbooleantrueWhether to send the new link via SMS to the original phone number.

Response

201 Created

FieldTypeDescription
request_idstringThe same request_id from the original create request — unchanged across all regenerations
event_idstringA new unique identifier for this link instance
consent_linkstringThe new magic link URL to share with the data principal
expires_atstringISO 8601 timestamp of when the new link expires
delivery_statusobjectDelivery outcome for this regeneration attempt
regeneration_countintegerTotal number of times this request has been regenerated, including this one
previous_event_idstringThe event_id of the link that was just superseded

Errors

StatusDescription
404No consent request found for the given request_id
409The current link is still active and has not expired. Regeneration is only allowed after the link expires.
410The data principal has already completed consent for this request
422Request body failed validation
429The maximum regeneration limit of 5 has been reached

Example

Terminal window
curl --request POST \
--url https://api.truConsent.io/api/outside-app/consent-link/regenerate/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"expiry_hours": 24,
"send_sms": true
}'
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"event_id": "11223344-5566-7788-99aa-bbccddeeff00",
"consent_link": "https://collect.truConsent.io/acme/cp_onboarding_v2/11223344-5566-7788-99aa-bbccddeeff00",
"expires_at": "2026-04-22T10:00:00+00:00",
"delivery_status": {
"sms": "pending"
},
"regeneration_count": 1,
"previous_event_id": "f9e8d7c6-b5a4-3210-fedc-ba9876543210"
}