Track Consent Lifecycle API

AI Tools

The Track Consent Lifecycle API, also referred to as the Get Consent Details API, allows clients to retrieve the latest status, metadata, lifecycle events, validity information, and operational details associated with a registered consent on the Attestr Platform. Read about Register Consent API for more details.

This API enables clients to monitor and audit the complete lifecycle of a consent, including its registration, activation, usage, expiry, revocation, and associated processing activities. Using the unique consent id, clients can fetch detailed consent information required for compliance monitoring, workflow orchestration, audit logging, customer support, and regulatory reporting.

API Details


Request

Type

URL

Version

GET

https://api.attestr.com/api/{version/public/consent/{consentId}

Use "v3" for DPDA compliant version

Request URL Parameters

Type

Name

Description

Optional (default)

Min Version

Max Version

String

consentId

Consent ID as generated by the Attestr platform during register consent step

Required

v3


Sample Request URL

https://api.attestr.com/api/v3/public/consent/CX3oM_bNstq9xWxgRd

Request Header Parameters

Type

Name

Value / Description

Optional

Min Version

Max Version

String

Content-Type

application/json

Required

v3


String

Authorization

Basic {authToken}

Required

v3


Info

If you do not have the authentication token, please refer to Register App to generate one.

Response

Http Status 200

Type

Key

Description

Min Version

Max Version

String

_id

Unique consent Id as assigned by Attestr Platform

v3


String

number

Unique human readable consent number for reference as assigned by Attestr platform

v3


String

requestId

Unique internal request Id assigned by Attestr for debugging and logging purposes.

v3


String

status

Status of the consent. Refer to Consent Status to read more about status values.

v3


Object

data

Consent data object details as provided while registering the consent

v3


Object

metadata

Used to record browser metadata, IP address etc of the Data Principal. Populated only for hosted pages feature ie. when consent is collected on Attestr provided UI.

v3


Array<Object>

lifecycle

Sequence of lifecycle updates recorded on the consent Refer to Consent Lifecycle Events

v3


Number

created

Unix timestamp when the consent was registered

v3


String

client

If consent is registered using API, then this field is populated with the APP Id (ie. API client Id)

v3


String

createdBy

Member Id of the org member who registered the consent on the platform

v3


String

createdByOrg

Client Account ID / Organization ID in which the said consent is registered

v3


Number

updated

Unix timestamp when the consent was last modified

v3


String

updatedBy

Member Id of the org member who performed the last update on the consent object.

v3


Sample Response

Sample response for valid input

{ "_id": "CX3S-m5YMohWXqt7b-", "number": "3991-752664-8625", "requestId": "068de46f-6a39-403a-bcde-60997c3d396a", "status": "EXPIRED", "data": { "consentPurpose": "kyc_verification", "services": [ { "service": "BANK_ACC" } ], "consentTimestamp": "2026-05-22T00:00:00+0000", "consentMode": "email_otp", "consentType": "multi_use", "consentValidFrom": "2026-05-23T12:05:00+0000", "consentValidTill": "2026-05-23T12:07:00+0000", "consentReferenceId": "12341", "consentPrincipalUserId": "USER#1234", "clientDeclaration": true, "consentOperations": [ "VERIFY", "FETCH", "STORE", "REPORT" ], "consentDataCategories": [ { "category": "personal_information", "values": [ "name", "father_name" ] }, { "category": "financial", "values": [ "bank_account", "ifsc" ] } ], "clientObtainedBy": "client-user-1234" }, "metadata": null, "lifecycle": [ { "event": "STATUS_CHANGED", "operations": null, "details": { "oldStatus": null, "newStatus": "REGISTERED", "requestId": "068de46f-6a39-403a-bcde-60997c3d396a" }, "actor": { "client": "AC02zfeuvg8qksd36sou", "clientName": "Client_v1_1", "member": null, "memberName": null }, "ts": 1779538004575 }, { "event": "STATUS_CHANGED", "operations": null, "details": { "oldStatus": "REGISTERED", "newStatus": "ACTIVE", "requestId": "068de46f-6a39-403a-bcde-60997c3d396a" }, "actor": { "client": "AC02zfeuvg8qksd36sou", "clientName": "Client_v1_1", "member": null, "memberName": null }, "ts": 1779538004575 }, { "event": "ACCESSED", "operations": [ "VERIFY", "FETCH", "STORE" ], "details": { "status": "GRANTED", "reason": null, "service": "BANK_ACC", "requestId": "0ae7c204-7937-43bc-84c3-3a9d6768d303" }, "actor": { "client": "AC02zfeuvg8qksd36sou", "clientName": "Client_v1_1", "member": null, "memberName": null }, "ts": 1779625025906 }, { "event": "ACCESSED", "operations": [ "VERIFY", "FETCH", "STORE" ], "details": { "status": "DENIED", "reason": { "type": "INVALID_CONSENT", "message": "The consent expired on 2026-05-19T12:00:00+0000 and is no longer valid." }, "requestId": "fad4a32f-c431-43e6-96b2-5fd79b55d173" }, "actor": { "client": "AC02zfeuvg8qksd36sou", "member": null, "memberName": null }, "ts": 1779259292426 } ], "created": 1779538004575, "client": null, "createdBy": null, "createdByOrg": "OX02zfeuvt8akkilm7kpt", "updated": 1779538249986, "updatedBy": null }

Error Response

Parameter

Type

Description

code

Number

Unique error codes for different errors. Always available.

httpStatusCode

String

Standard HTTP status code for the error

message

String

Error message describing the error. Always Available.

details

String

Detail error message. Available only for certain types of errors.

Error Codes

HTTP Status

Error Code

Error Message

400

4001

Malformed data or missing required parameter values

400

4005

Operation could not be performed due to low credits balance

401

4016

Invalid client authorization

403

4031

Unauthorized access

403

4035

Requested service is not provisioned for your account

403

4039

Client's IP address is not whitelisted

403

4035

Requested service is not provisioned for your account

429

4291

Maximum account rate limit exceeded

429

4292

Maximum API rate limit exceeded

429

4293

Maximum account daily limit exceeded

429

4294

Maximum API daily limit exceeded

500

5001

Request could not be processed

Sample Error Response

{ "httpStatusCode": 400, "code": 4001, "message": "Malformed data or missing required parameter values", "appError": true }


  Last updated