Skip to content

POST /notarize

Request notarization of given hash, return requestId of queued request. 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:

ParamTypeDescriptionRequired
hashstringHash of document to notarizeYes
webhookUrlstringHash of document to notarizeNo
metadataobjectObject with metadata fieldsNo
verboseboolVerbose response on webhookNo

Return

The POST request return an object containing the follow properties:

ParamTypeDescription
requestIdstringId of notarization requeste, usefull to request status
statusstringStatus of
errorstringObject with metadata fields

Usage

const axios = require('axios');

const endpoint = https://pablock-api-dev.bcode.cloud
const authToken = '<your-token>'

const optionals = {
    webhookUrl: "https://example.com/webhook",
    metadata: {},
    verbose: true,
}

const hash = "0xb133a0c0e9bee3be20163d2ad31d6248db292aa6dcb1ee087a2aa50e0fc75ae2"

let { status, data } = await axios.post(
    `${endpoint}/notarize/`,
    {   hash, ...optionals  },
    {
        headers: {
            Authorization : `Bearer ${authToken}`
        }
    }
);

const requestId = data.requestId