API Reference

This endpoint takes a hash and verify if its confirmated on Bitcoin blockchain.

Verify a Document

Check if a document's hash has been confirmed on the Bitcoin blockchain.

  • Endpoint: POST /proof/verification
  • Description: This endpoint verifies if a provided hash corresponds to a document that has been confirmed on the blockchain.

Headers

  • x-access-token (string, required): Your API token.

Request Body

  • Content-Type: application/json

  • Schema:

    {
      "hash": "5ce32a6ce7fa488d055c2eb5e19bf2f5de7454af28bb951b96ad6d833be873c2"
    }
    
    • hash (string, required): The hexadecimal hash string of the file you want to verify.

Response

  • 200 OK

    The specified hash was found, and its verification status is returned.

    {
      "ok": true,
      "totalDocuments": 1,
      "documents": [
        {
          "hash": "870c8bcd4278ddfc1f8bd5769190b5513f05bed50f32b52f711ffbdf4f544d45",
          "name": "source-simpleproof.png",
          "creation_date": "2024-03-27T18:29:17.684Z",
          "confirmed": false,
          "confirmed_at": null,
          "url": "<VERIFICATION_PAGE_URL>",
          "file_download_url": "",
          "ots_download_url": "https://simple-proof-demos-q1y7tx8r8yso.s3.us-east-2.amazonaws.com/...",
          "download_url_expiration_time": 1800
        }
      ]
    }
    
  • Important Notes

    • The cost is calculated per hash, not per request. You can optimize costs by sending multiple hashes in a single request.
    • All timestamps are returned in ISO 8601 format
    • Hash verification URLs are valid for 1800 seconds (30 minutes)
  • 400 Bad Request

    The request was invalid.

    {
      "ok": false,
      "msg": "Something went wrong."
    }
    
  • 500 Internal Server Error

    The server encountered an error during verification.

    {
      "ok": false,
      "msg": "Internal server error, can't continue processing the file."
    }
    

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.
Language
Click Try It! to start a request and see the response here!