Register Consent API

Introduction

The Register Consent API is the first mandatory step before performing any KYC verification or personal data processing through the Attestr Platform

Before initiating a verification request, the client (acting as the Data Fiduciary) must first obtain lawful and explicit consent from the end user (the Data Principal) for the intended data processing activity. Once the consent has been collected, the client is required to register the consent with Attestr (acting as the Data Processor) using this API.

Upon successful registration, Attestr generates a unique consent id that serves as a reference for the consent transaction. This consent id must subsequently be passed in all related verification and KYC API requests to establish a valid consent trail and enable compliant data processing on the Attestr platform.

The Register Consent API helps ensure:

  • Consent traceability and auditability
  • Regulatory compliance for personal data processing
  • Proper linkage between consent records and verification requests
  • Secure and accountable KYC workflows

Every consent registration is associated with specific:

  • Data categories
  • Data types
  • Purpose of processing
  • Verification services requested
  • Consent validity and metadata

Clients must ensure that the consent obtained from the Data Principal is lawful, informed, specific, and compliant with applicable data protection regulations before invoking this API.

API Details

Request

TypeURLVersion
POSThttps://api.attestr.com/api/{version/public/consent/registerUse "v3" for DPDA compliant version

Request Body Parameters

TypeNameDescriptionOptional (default)Min VersionMax Version
StringconsentPurpose

Purpose for which consent has been obtained from the Data Principal. Allowed values are -

kyc_verification background_verification

Refer to Consent Purpose to read more.

Requiredv3
StringconsentPurposeDescOptional text describing the consent purpose in detailOptionalv3
Array<Service Object>servicesList of services/products for which this consent is intended to be used for the specified purpose. Depending on the services provided, appropriate data categories are required to be passed in the data categories input below. Refer Service object definition below.Requiredv3
Array <DataCategory Object>consentDataCategoriesList of data categories and associated data types are needed for the specified input services. See Data Category Object definition below. Refer to Consent Data Categories to know more.Requiredv3
StringconsentType

Allowed values are - single_use multi_use

Refer to Consent Type to read more.

Requiredv3
StringconsentMode

Allowed values are - checkbox email_otp mobile_otp digilocker ivr physical_form offline

Refer to Consent Mode to read more.

Requiredv3
StringconsentModeDescOptional text describing how the consent was collectedOptionalv3
StringconsentTimestamp

ISO Date and timestamp of the time when consent was obtained from the Data Principal. Eg. "2026-05-22T00:00:00+0000"

Refer to Consent Validity to know more.

Requiredv3
StringconsentValidFrom

ISO Timestamp from which the consent becomes valid for processing operations.

Eg. "2026-05-22T00:00:00+0000"

Refer to Consent Validity to know more.

Requiredv3
StringconsentValidTill

ISO Timestamp until which the consent remains valid for processing operations.

Refer to Consent Validity to know more.

Requiredv3
StringconsentReferenceIdUnique client internal reference ID assigned to the consent. Refer to Consent Reference ID to know more.Requiredv3
StringconsentPrincipalUserIdData Principal user ID as assigned by client in its internal systems. Refer to Consent Principal User ID to know more.Optionalv3
StringclientPrivacyPolicyUrlLink to client's privacy policy. Refer to Client Privacy Policy URL and VersionOptionalv3
StringclientPrivacyPolicyVersionVersion of the client's privacy policy. Refer to Client Privacy Policy URL and VersionOptionalv3
BooleanclientDeclarationMust be declared as True always. Refer to Client Declaration to know more.Requiredv3
StringclientObtainedByID of the client's internal user, app, system through which the consent was obtained. Refer to Client Obtained By to read more.Optionalv3
Array <String>consentOperationsList of allowed data processing operations for the consent. Allowed values are -VERIFY FETCH EXPORT STORE SHARE REPORT Multiple values can be provided Refer to Consent Operations to read more.Requiredv3
BooleanwebhookBoolean flag indicating if webhooks must be triggered for consent lifecycle events. Refer to Webhooks to know more.Optionalv3

Service Object Definition

TypeNameDescriptionOptional (default)Min VersionMax Version
StringserviceProvide the Service code. Attestr assigns a unique service code to each product and service it offers. For example, the service code for Bank Account Verification is BANK_ACC. Please refer to the relevant product documentation to identify the correct service code for the service you intend to use.Requiredv3
ObjectoptionsReserved for future use. Used for specifying service specific options which helps to decide the associated data categories.Optionalv3

Data Category Object Definition

TypeKeyDescriptionMin VersionMax Version
StringcategoryData category for the provided servicev3
Array<String>valuesAssociated data types as mapped to the provided servicev3

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv3
StringAuthorizationBasic {authToken}Requiredv3

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

Sample Request Payload

JSON
Copy

Response

Http Status 200

TypeKeyDescriptionMin VersionMax Version
String_idUnique consent Id as assigned by Attestr Platformv3
StringnumberUnique human readable consent number for reference as assigned by Attestr platformv3

Sample Response

Sample response for valid input

JSON
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
httpStatusCodeStringStandard HTTP status code for the error
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed

Sample Error Response

JSON
Copy

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches