REST API · Swagger docs
What you can build
- CMS and blogs: timestamp every article or image on publish.
- Design and photo tools: register each export automatically.
- Document workflows: fix the exact version of a contract, offer or invoice.
- Code pipelines: fingerprint release artifacts in CI.
- Marketplaces: give sellers proof of authorship for each upload.
Get a key
- Open https://run.secureauthor.com and sign in with Google.
- Open the API key section and press Generate API key.
- Copy the key. Pass it as the
api-keyquery parameter.
Full reference: Swagger documentation.
Create a receipt
POST https://api.secureauthor.com/api/recipient/user-api/create-with-pdf?api-key=YOUR_KEY
— multipart/form-data, field media = the file.
curl -X POST "https://api.secureauthor.com/api/recipient/user-api/create-with-pdf?api-key=YOUR_KEY" \
-F "media=@artwork.png"
Response (shortened):
{
"code": 0,
"message": "Receipt created successfully",
"receipt": {
"id": "cm8ixlzwf0002pj42vqmvev62",
"hash": "26be856c7aa5748040bcf998b18d3081cacb2ab1e4e3b34aece9e86152f083aa",
"timeStamp": "2025-03-21T15:25:13.599Z",
"blockchainLink": null,
"fileName": "artwork",
"fileMimeType": "png",
"fileSize": 26106,
"nextEntryWritten": "2025-03-22T00:00:00.000Z"
}
}
code: 0— new receipt created.code: 1— this file was registered before; the original receipt is returned.blockchainLinkisnulluntil the next anchoring run, then contains the Polygonscan link.nextEntryWritten— when the record is expected on-chain.
Verify a file
POST https://api.secureauthor.com/api/recipient/user-api/compare-with-pdf?api-key=YOUR_KEY[&hash-id=RECEIPT_ID]
— field media = the file to check, optional field pdf = the certificate.
Pass either the certificate PDF or the receipt ID.
curl -X POST "https://api.secureauthor.com/api/recipient/user-api/compare-with-pdf?api-key=YOUR_KEY&hash-id=cm8j56xxh0007pj42mj8eg7rl" \
-F "media=@artwork.png"
{
"code": 0,
"fileHash": "a535b2b5…d0",
"receiptHash": "a535b2b5…d0",
"receiptId": "cm8j56xxh0007pj42mj8eg7rl",
"isEqual": true
}
isEqual: true (code 0) — the file matches the receipt; false (code 1) — it does not.
Errors
| Response | Meaning |
|---|---|
{"code": 3, "error": "API key is missing"} | Add ?api-key= to the URL |
{"code": 3, "error": "Invalid API key"} | Regenerate the key in the web app |
| HTTP 400 | No file in the media field or a malformed request |