Skip to main content
Version: v1.0

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:

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:

  1. 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 .ots file at this stage, it will be a pending proof — valid but not yet fully verifiable against the blockchain.

  2. Confirmed — The Bitcoin transaction has received at least 3 block confirmations (typically ~30 minutes after submission). The .ots file is now a complete, independently verifiable proof. At this point, the callback notification is triggered.

note

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 .ots proof.
  • After confirmation: The file is the complete .ots proof, 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/file
  • POST /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​

FieldTypeDescription
idintegerUnique identifier of the submitted document or hash.
confirmedbooleanAlways true when the callback is triggered, indicating the proof has received at least 3 block confirmations.
hashstringThe SHA-256 hash of the submitted document or file.
namestringThe filename of the submitted document (if applicable).
blockheightintegerThe Bitcoin block height where the proof was recorded.
verified_atstringISO 8601 timestamp of when the proof was confirmed on the blockchain.
verification_linkstringURL to view the verification details.

Handling the Callback​

Your server at the callback_url must:

  • Accept POST requests with application/json body.
  • 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).