Documentation
Overview of the Simple Proof REST API v1: its endpoints, the shared error format, and how proofs are confirmed and notified through callbacks.
The Simple Proof REST API v1 lets you list your files, submit hashes and files for timestamping on the Bitcoin blockchain, and verify them. Each endpoint has its own page:
- List your files:
GET /api/proof/document - Submit Hashes:
POST /api/proof/timestamp/hashes - Upload files:
POST /api/proof/file - Verify files:
POST /api/proof/verification - List proof categories:
GET /api/entity/proofCategories
This page covers the error format shared by all endpoints and how proofs are confirmed and notified.
Error Handling
All error responses follow a standard format:
{
"ok": false,
"msg": "Error message describing what went wrong."
}
- 400 Bad Request: The request was invalid or malformed.
- 401 Unauthorized: Authentication failed due to invalid or missing API token.
- 429 Too Many Requests: Rate limit exceeded. Reduce the frequency of requests.
- 500 Internal Server Error: An error occurred on the server.
Proof Lifecycle & Callback Notification
How a Proof is Confirmed
When you submit a file or hash, the proof goes through two stages:
-
Pending — The hash has been received and included in a Bitcoin transaction, but the transaction has not yet received enough confirmations. If you download the
.otsfile at this stage, it will be a pending proof — valid but not yet fully verifiable against the blockchain. -
Confirmed — The Bitcoin transaction has received at least 3 block confirmations (typically ~30 minutes after submission). The
.otsfile is now a complete, independently verifiable proof. At this point, the callback notification is triggered.
Simple Proof also submits hashes to the Alice and Bob calendars from opentimestamps.org, so the resulting .ots files are compatible with the standard OpenTimestamps ecosystem.
Downloading the OTS File
The .ots file available for download reflects the current state of the proof:
- Before confirmation: The file is a pending
.otsproof. - After confirmation: The file is the complete
.otsproof, fully verifiable against the Bitcoin blockchain.
You can use the confirmed field in the API response or the callback notification to determine when the complete file is ready.
Callback URL Notification
If you provide a callback_url when submitting a proof, the server will send a POST request to that URL once the proof has been confirmed (3+ block confirmations). This allows you to automate workflows — for example, updating a local .ots file, committing to an archive, or notifying a user that the proof is ready.
The callback applies to proofs submitted via:
POST /api/proof/filePOST /api/proof/timestamp/hashes
Callback Request Format
- Method: POST
- Content-Type: application/json
Example Callback Payload
{
"id": 5598842,
"confirmed": true,
"hash": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
"name": "source-simpleproof.png",
"blockheight": 889906,
"verified_at": "2025-03-29T01:42:39.000Z",
"verification_link": "https://verify.simpleproof.com/SP/..."
}
Callback JSON Fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier of the submitted document or hash. |
confirmed | boolean | Always true when the callback is triggered, indicating the proof has received at least 3 block confirmations. |
hash | string | The SHA-256 hash of the submitted document or file. |
name | string | The filename of the submitted document (if applicable). |
blockheight | integer | The Bitcoin block height where the proof was recorded. |
verified_at | string | ISO 8601 timestamp of when the proof was confirmed on the blockchain. |
verification_link | string | URL to view the verification details. |
Handling the Callback
Your server at the callback_url must:
- Accept
POSTrequests withapplication/jsonbody. - Respond with an appropriate HTTP status code.
Example Response
{
"ok": true,
"msg": "Notification received and processed successfully."
}
- 200 OK — The notification was received and processed successfully.
- 400 Bad Request — There was an issue processing the notification (e.g., invalid payload).