SOMA Next POSTs a JSON body to your endpoint when subscribed events occur.
{
"event": "simulation.created",
"data": { "simulation_id": "…", "name": "…" }
}
Each request includes an X-Soma-Signature: sha256=<hmac>
header — an HMAC-SHA256 of the raw request body using your endpoint's signing secret
(shown once when you create the endpoint). Compare it constant-time:
import hmac, hashlib
def verify(secret: str, body: bytes, header: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode(), body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, header)
2xx within 10s to acknowledge.X-Soma-Event header to route by type.