1. List Documents
Retrieve a list of your documents, with options to filter by status and paginate the results.
- Endpoint:
GET /api/proof/document
- Description: This endpoint fetches a batch of documents based on their status. You can filter documents by their processing status and paginate through the results.
Headers
x-access-token
(string, required): Your API token.
Query Parameters
status
(string, required): Filter documents by status. Possible values:confirmed
pending
pending_stamp
page
(number, required): The page number to retrieve (starting from0
).limit
(number, required): The number of results per page.
Response
-
200 OK
The request was successful, and a list of documents is returned.
{ "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" } ] } }
-
400 Bad Request
The request was invalid or cannot be otherwise served.
{ "ok": false, "msg": "Something went wrong." }
2. Upload a Document
Upload a file to SimpleProof for verification and timestamping on the Bitcoin blockchain.
- Endpoint:
POST /api/proof/document
- Description: This endpoint allows you to send files for verification. Upon successful processing, you'll receive the file's hash as a response.
Headers
x-access-token
(string, required): Your API token.
Query Parameters
stagemode
(string, optional): Processing mode. Defaults tocomplete
if left empty.
Request Body
-
Content-Type:
application/json
-
Schema:
{ "name": "example.txt", "file": "VGhpcyBhIGxpdHRsZSB0ZXh0IGVuY29kZWQgaW4gYmFzZTY0Lg==" }
name
(string, required): The name of the file, including its extension.file
(string, required): The base64-encoded content of the file. Note: Remove the MIME type prefix from the base64 string.
Response
-
201 Created
The file was received and processed successfully.
{ "ok": true, "hash": "7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069" }
-
400 Bad Request
The request was invalid.
{ "ok": false, "msg": "Something went wrong." }
-
500 Internal Server Error
The server encountered an error processing the file.
{ "ok": false, "msg": "Internal server error, can't continue processing the file." }
3. Submit Hashes for Timestamping
Send one or more SHA256 hashes to be timestamped on the Bitcoin blockchain. This endpoint supports up to 25 hashes per request.
- Endpoint:
POST /api/proof/timestamp/hashes
- Description: Use this endpoint to timestamp an array of hashes on the Bitcoin blockchain. The hashes must be in hexadecimal format and 64 characters long.
Headers
x-access-token
(string, required): Your API token.
Request Body
-
Content-Type:
application/json
-
Schema:
[ "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "1a8c3743df10869051e093753221651d69e9f556345492398daf0a944f4fe4a4", "149d5f7d5d3622f0495ab57f0646405946bf47f14831a7c9b1a69c41948de000" ]
hashes
(array of strings, required): An array of up to 25 SHA256 hexadecimal hashes.
Response
-
200 OK
The hashes were successfully submitted for timestamping.
{ "ok": true, "files": [ "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", "1a8c3743df10869051e093753221651d69e9f556345492398daf0a944f4fe4a4", "149d5f7d5d3622f0495ab57f0646405946bf47f14831a7c9b1a69c41948de000" ] }
-
400 Bad Request
The request was invalid or violated the endpoint's constraints (e.g., exceeding the hash limit).
{ "ok": false, "msg": "A maximum of 25 hashes per request is allowed." }
-
500 Internal Server Error
The server encountered an unexpected issue while processing the request.
{ "ok": false, "msg": "Internal server error. Please try again later." }
Example Request (Using curl
)
curl
)curl -X POST https://app.simpleproof.com/api/proof/timestamp/hashes \
-H "Content-Type: application/json" \
-H "x-access-token: YOUR_TOKEN" \
-d '[
"ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
"1a8c3743df10869051e093753221651d69e9f556345492398daf0a944f4fe4a4",
"149d5f7d5d3622f0495ab57f0646405946bf47f14831a7c9b1a69c41948de000"
]'
Notes
- Each hash MUST TO BE exactly 64 characters long and in SHA256 hexadecimal hashes format.
- If you need to timestamp more than 25 hashes, divide them into multiple requests.
- Timestamps are recorded on the Bitcoin blockchain, ensuring immutable verification.