Proofs
A consent proof is a file serving as a proof of the consent of a user. It can be a signature, a form, etc. that gets attached to a consent event.
The /consents/proofs endpoint of the API exposes the proofs of consent managed by Didomi for your organizations. For a full reference of the endpoint and the resources that it returns, visit https://api.didomi.io/docs/.

Get a proof

To retrieve a proof from an existing proof ID, send a GET /consents/proofs request.
Example
1
GET /consents/proofs/c1cda26362828b69266512052b97cb3729e3b052e4ade47c0a1e3383defe73c7.png?organization_id={organization_id}
Copied!
The proof will be returned as a base64-encoded data URI along with its ID and size:
Example response
1
{
2
"id": "c1cda26362828b69266512052b97cb3729e3b052e4ade47c0a1e3383defe73c7.png",
3
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",
4
"size": 123
5
}
Copied!

Upload a proof

Proofs can be uploaded as part of a consent event. You will usually want to upload proofs that way rather than directly through this endpoint.
To upload a proof, send a POST /consents/proofs request with the file to upload as a base64-encoded data URI in the proof property of the JSON body.
Example:
1
POST /consents/proofs?organization_id={organization_id}
2
3
BODY
4
{
5
"file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="
6
}
Copied!
Files must be smaller than 15mb when encoded in base64 and their type must be one of the following formats: PDF, PNG, JPG, GIF, DOCX, DOC, MSG.
Last modified 1yr ago
Copy link