A public, auth-free JSON:API for creating and verifying blockchain stamps on Gridcoin.
Overview
The Gridcoin Blockchain Stamping API is a public, read-mostly HTTP service that lets you create SHA-256 stamps on the Gridcoin blockchain, look up existing stamps, and inspect the service wallet. Responses follow the JSON:API specification.
Base URL
https://stamp.gridcoin.club/api
Content-Type
application/vnd.api+json
Authentication
None. All endpoints are public by design.
CORS
Open to all origins. Safe to call directly from the browser.
The fastest way to confirm the service is reachable is a GET /api/status call:
Request
curl https://stamp.gridcoin.club/api/status
Response — 200 OK
{
"data":{
"type":"status",
"attributes":{
"name":"grc-stamp",
"version":"1.2.1",
"maintenance":false
}
}
}
A note on curl and JSON:API brackets
JSON:API query parameters use literal square brackets — for example page[size]=10 or filter[block][gt]=0. By default curl interprets […] in a URL as a URL globbing range and fails with bad range in URL position …. Every example on this page uses the -g (also spelled --globoff) flag to disable that behaviour. If you prefer, you can also URL-encode the brackets as %5B and %5D, or use the -G --data-urlencode form — whichever is the most convenient inside your tooling.
JSON:API Conventions
Collection endpoints support the standard JSON:API query parameters for pagination, sorting, sparse fieldsets, and filtering. Every parameter is optional; omitting all of them returns the first page of results in default order.
Pagination
page[size] — items per page
Default 25, maximum 100. Values above 100 are silently capped. A value of 0 falls back to the default of 25.
page[number] — zero-indexed page number
Offset is computed as page[number] × page[size]. Mutually exclusive with page[offset].
page[offset] — absolute record offset
Skip N records before returning results.
Every list response includes a top-level meta.count field with the total number of records matching the query.
Sorting
Pass sort=field for ascending order or sort=-field for descending. Multiple fields can be comma-separated (e.g. sort=-block,-id). Unspecified sort falls back to ascending id.
Sparse Fieldsets
Restrict the returned attributes with fields[stamps]=id,hash,block to reduce payload size. Keep id in the list — JSON:API requires it on every resource object.
Filtering
Simple exact-match filtering works on any field with filter[field]=value. Comparison operators are available via filter[field][op]=value. Supported operators: eq, ne, gt, gte, lt, lte.
Comparison operators are for numeric fields
The gt / gte / lt / lte / ne / eq operators are only meaningful on numeric fields like id, block, and time. Filtering a string field like hash by exact match works with the simple form (filter[hash]=<64 hex chars>), but comparison operators on strings will return an empty result or an error.
Example
Fetch the 10 most recent confirmed stamps, returning only id, hash, block, and time:
All error responses follow the JSON:API error format: a top-level errors array containing one or more objects with a numeric status, a human-readable title, and an optional detail.
Example — 400 Bad Request
{
"errors":[
{
"status":400,
"title":"\"hash\" length must be at least 64 characters long"
}
]
}
You can reliably trigger this shape by posting an invalid hash:
Reproduce the 400
curl -X POST 'https://stamp.gridcoin.club/api/stamps' \
Request body or query string failed validation (wrong hash length, unsupported hashType, malformed JSON:API envelope).
404 Not Found
No stamp with the requested id or hash.
406 Not Acceptable
The service wallet does not hold enough GRC to create a new stamp. Try again later.
500 Internal Server Error
Database, Redis, or Gridcoin RPC failure. Usually transient — retry after a short delay.
About the 406: the service wallet is currently shared across every caller of this public instance, and the operator tops it up as needed. If you hit a 406 and don't want to wait, you can keep the queue moving by sending a small amount of GRC to the wallet address returned by GET /api/wallet. Any GRC you contribute funds stamps for everyone, including you — there is no per-sender accounting.
Status
Returns the service name, version, and whether the stamping service is currently in maintenance mode. A cheap call — use it for health checks.
GET/api/status
Service health
Request
curl https://stamp.gridcoin.club/api/status
Response — 200 OK
{
"data":{
"type":"status",
"attributes":{
"name":"grc-stamp",
"version":"1.2.1",
"maintenance":false
}
}
}
The status resource has no id — it represents the service as a whole.
When maintenance is true, new stamps cannot be created; read endpoints remain available.
Stamps
A stamp is a SHA-256 hash that has been (or is about to be) embedded in a Gridcoin transaction via OP_RETURN. Once the transaction is confirmed, the stamp becomes a permanent, publicly verifiable proof that the hash existed at a specific block height.
About the numeric id
The numeric id returned in every stamp response is a local auto-increment key from this particular server's database. It is not stored on the Gridcoin blockchain, it is not portable between stamp server instances, and the same hash stamped through a different server will almost certainly have a different id. Treat it as an opaque handle for talking to this server only. The durable, universal identifier for any stamp is its SHA-256 hash — use GET /api/hashes/:hash whenever you need to look a stamp up in a portable way.
List stamps
GET/api/stamps
Paginated list
Returns a JSON:API collection. Supports all conventions described in the JSON:API Conventions section.
The id is the internal auto-incrementing identifier returned by the list endpoint or by POST /api/stamps. To look up by hash instead, use /api/hashes/:hash.
A stamp that has not yet been mined into a block returns null for block, tx, rawTransaction, and time. Unknown ids return 404 Not Found with the standard error envelope.
Create a stamp
POST/api/stamps
Create a new stamp
Submit a SHA-256 hash to be queued for stamping. The server batches queued hashes and embeds up to two at a time in a single OP_RETURN transaction, which is broadcast to the Gridcoin network.
Request body
data.attributes.hash — required
Exactly 64 hex characters matching /^[a-fA-F0-9]{64}$/ — lower- or upper-case both work. The SHA-256 digest of the document you want to stamp.
data.attributes.hashType — optional
Only "sha256" is currently accepted. Defaults to "sha256".
data.attributes.protocol — optional
Stamping protocol version. Only "0.0.1" is currently accepted. Defaults to "0.0.1".
Request
curl -X POST 'https://stamp.gridcoin.club/api/stamps' \
For a brand-new hash the response is the same shape with block, tx, rawTransaction, and time set to null until the scraper confirms the transaction on-chain.
Status codes
201 Created
A new stamp was queued. The attributes for block / tx / rawTransaction / time are null until the transaction is mined.
200 OK
The hash was already stamped. The existing record is returned instead of creating a duplicate.
400 Bad Request
Validation failed — most commonly an incorrect hash length or an unsupported hashType.
406 Not Acceptable
The service wallet is below the minimum balance and cannot broadcast new stamping transactions.
Hashes
Look up a stamp by its SHA-256 hash instead of its internal id. If the same hash has been stamped more than once (for example, by different callers), the endpoint returns the earliest record — the one with the smallest time.
Returns 404 Not Found if the hash has never been stamped by this service. The lookup is case-insensitive — upper- and lower-case hex both resolve to the same record.
Wallet
The service wallet is a dedicated Gridcoin address that holds the GRC used to pay transaction fees when stamping. These endpoints are useful for monitoring dashboards, funding alerts, and confirming that the scraper is keeping up with the blockchain.
Wallet info
GET/api/wallet
Address, balance, last block
Request
curl https://stamp.gridcoin.club/api/wallet
Response — 200 OK
{
"data":{
"id":"S16teVjxKNaptDLFnPwxkjQE3aiHRcgpr5",
"type":"wallet",
"attributes":{
"address":"S16teVjxKNaptDLFnPwxkjQE3aiHRcgpr5",
"balance":3001.73952722,
"block":3940586
},
"links":{"self":"/wallet/"}
}
}
The id on a wallet resource is the Gridcoin address itself (the same value as attributes.address). balance is returned as a JSON number and block is the last Gridcoin block the scraper has processed.