Skip to content

Regenerate consent link

POST /api/v1/external/public/consent-link/duplicate/{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

Both headers are required.

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

Path parameters

ParameterTypeRequiredDescription
request_idstringYesThe request_id returned when the original link was created

Body

FieldTypeDefaultDescription
expiryHoursinteger24How 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
sourceRequestIdstringThe original requestId that was duplicated
requestIdstringThe new requestId for this duplicate link
eventIdstringA new unique identifier for this link instance
consentLinkstringThe new magic link URL to share with the data principal
expiresAtstringISO 8601 timestamp of when the new link expires

Errors

StatusDescription
400X-Org-Id could not be resolved
401X-API-Key is invalid or missing
403API key lacks the admin scope
404No consent request found for the given request_id
409Link is still active — duplication is only allowed after the link expires
410The data principal has already completed consent for this request
422Request body failed validation
429Maximum duplication limit of 5 reached
500Internal server error

Example

Terminal window
curl --request POST \
--url 'https://truapi-dev.truconsent.io/api/v1/external/public/consent-link/duplicate/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'X-Org-Id: acme' \
--header 'X-API-Key: tck_live_xxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"expiryHours": 24
}'
{
"sourceRequestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"requestId": "b3c4d5e6-f7a8-9012-bcde-f12345678901",
"eventId": "11223344-5566-7788-99aa-bbccddeeff00",
"consentLink": "https://collect.truConsent.io/acme/cp_onboarding_v2/11223344-5566-7788-99aa-bbccddeeff00",
"expiresAt": "2026-04-22T10:00:00+00:00"
}