Skip to content

POST /api/notarize

Request notarization of given hash with its attributes. Tha hash must be a SHA256 type with 0x prefix.

Params

The body of the request must be a JSON object with the following fields:

ParamDescriptionRequired
hashHash of document to notarizeYes
nameName of the documentYes
signatureSignature of the owner's walletYes
descriptionDescription of the fileNo
tagsArray of tags to improve researchNo

Return

The GET request return an object containing the follow properties:

ParamTypeDescription
msgstringResult message
idstringNotarization id usefull to request status data

Usage

const axios = require('axios');

const endpoint = https://api.demo.bcode.cloud
const authToken = '<your-jwt>'

const hash = "0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2"

const notarizationData = {
    hash,
    "name": "test notarization API",
    "signature": "0x63d2ad3b133a0c0e95hdbbe2011d6248cb1ee087a2aa50e0fc75ae2db292aa6d",
    "description": 'here it goes your description',
    "tags": ['test','important'],
}

let { status } = await axios.post(
    `${endpoint}/api/notarize`,
    notarizationData,
    {
        headers: {
            Authorization : `${authToken}`
        }
    }
);

if(status == 200) console.log('success');