Skip to main content
Version: v1.0

Examples

Example requests and responses for listing, uploading and verifying documents with the Simple Proof REST API v1.

List Documents Example​

Request:

GET /api/proof/document?status=confirmed&page=0&limit=10 HTTP/1.1
Host: app.simpleproof.com
x-access-token: YOUR_API_TOKEN

Response:

{
"ok": true,
"data": {
"totalPages": 1,
"totalCount": 1,
"documents": [
{
"id": 5198978,
"name": "source-simpleproof.png",
"extension": "png",
"storage_kb": "6.1",
"creation_date": "2024-03-27T18:29:17.684Z",
"document_hash": "870c8bcd4278ddfc1f8bd5769190b5513f05bed50f32b52f711ffbdf4f544d45",
"prefix": "lnvtest/simpleproof-kpaowlua53vp1/",
"blockchain": {},
"document_status": "COMPLETE"
}
]
}
}

Upload a Document Example​

Request:

POST /api/proof/document HTTP/1.1
Host: app.simpleproof.com
Content-Type: application/json
x-access-token: YOUR_API_TOKEN

{
"name": "example.txt",
"file": "VGhpcyBhIGV4YW1wbGUgZmlsZS4="
}

Response:

{
"ok": true,
"hash": "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069"
}

Verify a Document Example​

Request:

POST /api/proof/verification HTTP/1.1
Host: app.simpleproof.com
Content-Type: application/json
x-access-token: YOUR_API_TOKEN

{
"hash": "5ce32a6ce7fa488d055c2eb5e19bf2f5de7454af28bb951b96ad6d833be873c2"
}

Response:

{
"ok": true,
"totalDocuments": 1,
"documents": [
{
"hash": "5ce32a6ce7fa488d055c2eb5e19bf2f5de7454af28bb951b96ad6d833be873c2",
"name": "example.txt",
"creation_date": "2024-03-27T18:29:17.684Z",
"confirmed": true,
"confirmed_at": "2024-03-28T10:15:30.000Z",
"url": "https://app.simpleproof.com/verification/5ce32a6c...",
"file_download_url": "",
"ots_download_url": "https://simple-proof-demos-q1y7tx8r8yso.s3.us-east-2.amazonaws.com/...",
"download_url_expiration_time": 1800
}
]
}

Upload large files Example​

HTTP Request:

POST /api/proof/large-file HTTP/1.1
Host: app.simpleproof.com
x-access-token: YOUR_API_TOKEN
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="sourceFile"; filename="large_file.pdf"
Content-Type: application/pdf

<Binary content of the file>
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Note: Make sure to replace YOUR_API_TOKEN with your actual token and large_file.pdf with your file's name.

Successful Response Example​

{
"ok": true,
"hash": "e3b0c44298fc1c149afbf4c8996fb924..."
}

Additional Notes​

  • Maximum File Size: While this endpoint is designed to handle large files, there may be size limitations. Please refer to the documentation or contact support if you need to upload extremely large files.
  • Supported File Types: There are no restrictions on the file type; you can upload any type of file for verification.
  • File Hash: The hash provided in the response is the SHA-256 hash of the file's content. You can use this hash to check the file's status later.

Additional Information​

  • Base URL: All endpoints are relative to https://app.simpleproof.com/api.
  • Data Formats: Dates are in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ).
  • Hashing Algorithm: SHA-256 is used for generating document hashes.
  • Rate Limits: The API may enforce rate limits. If you receive a 429 Too Many Requests response, please wait before retrying.

Support​

For further assistance, please contact our support team:


By using the SimpleProof API, you can ensure the integrity and timestamping of digital documents on the Bitcoin blockchain, enhancing trust and transparency in your applications.