Prepare the next event on the live head, for integration in any language
POST
/v1/events/prepare
const url = 'https://api.hardstate.net/v1/events/prepare';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"issuer":"example","type":"example","case":"example","public":{},"docs":[{}],"actor":"example","ts":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.hardstate.net/v1/events/prepare \ --header 'Content-Type: application/json' \ --data '{ "issuer": "example", "type": "example", "case": "example", "public": {}, "docs": [ {} ], "actor": "example", "ts": "2026-04-15T12:00:00Z" }'Returns the exact event (with seq, prev and ts filled in), its RFC 8785 canonical form and the 32-byte hash to
sign with Ed25519. Nothing is stored. Compare event with what you sent, sign hash, then POST /v1/events.
See docs/integration/README.md.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
issuer
required
string
type
required
string
case
string
public
object
docs
Array<object>
object
actor
required
string
ts
string format: date-time
Example generated
{ "issuer": "example", "type": "example", "case": "example", "public": {}, "docs": [ {} ], "actor": "example", "ts": "2026-04-15T12:00:00Z"}Responses
Section titled “Responses”Prepared event
Media typeapplication/json
object
event
canonical
string
hash
string
challenge
Base64url of hash (the WebAuthn challenge for passkeys)
string
Example
{ "event": { "hss": 1 }}Unknown issuer (and type is not issuer.create)
Malformed event
HardState is a Zevlat Intelligence venture. © 2026 Zevlat Intelligence.