Consent Docs

Activity

The endpoint that reports a person's use of your service and restarts the inactivity erasure clock, with parameters, an example and errors.

Reference1 min readFor developers calling the REST API

One endpoint tells the service that a person used your service. Paths are relative to https://console.dpconsent.com/consent/sdk/v1. It matters only when Erase after inactivity is on; see Inactivity erasure.

Endpoints#

POST /activity#

Restarts the inactivity erasure clock on every live record of the person, linked records included, and cancels a notice already sent.

Key Scope Idempotency-Key Webhook sent
Secret consent:write Ignored None

Parameters

Name Type Required Description
subjectId string, up to 320 Yes The person's identifier.
subjectType string No EMAIL, PHONE, USER_ID, DEVICE_ID, SESSION_ID or COOKIE_ID. Without it, a value that contains @ is treated as an email address.

Request

cURLShell
curl -X POST https://console.dpconsent.com/consent/sdk/v1/activity \
  -H "Authorization: Bearer $PIEDAP_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "subjectId": "usr_8f2K1xQz", "subjectType": "USER_ID" }'
Node.jsJavaScript
await client.recordActivity('usr_8f2K1xQz', 'USER_ID');
Python
client.record_activity("usr_8f2K1xQz", "USER_ID")

Response

200:

JSON
{ "records": 2, "activeOn": "2026-09-24T10:12:03.000Z" }
Field Type Description
records integer How many live records were marked active. Test records have no inactivity clock.
activeOn time The time the activity was recorded.

The call is safe to repeat. Once a day for each person is plenty.

Errors

Status Code When
401 None. The message is Unauthorized The call was made with a publishable key.
400 None. The message is subjectId is required subjectId is missing, empty or longer than 320 characters.

Also the errors every call can return.

↑↓ to move, Enter to open