/v1/sessions/{id}/consents

Prev Next
Post
/v1/sessions/{id}/consents

Uploads a consent (and specifies the type of the consent that is being uploaded) for a specific session id = {id}

Multiple consents can be uploaded per sessionId but only the latest will be consider binding

Note: always ensure that you use the correct API URL to send requests. See the API URL section for more info.


Security
API Key
Header parameter namex-auth-client

Your integration's API key (occasionally referred to the "Token", "API public key" or "Publishable key")

Header parameters
x-hmac-signature
stringRequired

Request body signed with the shared secret key

Path parameters
id
Required

Session id

Body parameters
object
type
string Required

Consent type

Valid values[ "ine", "bipa", "aadhaar" ]
Exampleine
approved
boolean Required

Indicates if the consent has been approved by the end-user or not

ExampleTrue
text
string Required

Consent text exactly (same language) as shown to the end-user

ExampleUser agrees to share their INE details
Responses
200
object
id
string

UUID v4 identifying the consent

Example123e4567-e89b-12d3-a456-426614174000
context
string

Context representing the type of consent

Valid values[ "consent" ]
Exampleconsent
sessionId
string

UUID v4 of the session the consent belongs to

Exampled69a07cf-4434-4d36-be6c-d22af7dc01fb
400

Bad request

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleValidation failed
401

Unauthorized

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleMandatory X-AUTH-CLIENT header containing the API key is missing from the request.
404

Session not found

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleResource not found
500

Internal server error

object
status
string
Valid values[ "fail" ]
Examplefail
code
string
Example1101
message
string
ExampleSomething went wrong