attest Docs

Reference

Errors

Map every status code and error message to its cause and fix.

Error shape #

Every error response is JSON with an error string. Witness endpoints add a stable code when one applies. Match on the status and code. The error text is for people and may be reworded.

StatusMeaningRetry?
400The request is malformed or failed validation.No. Fix the request.
401The API key is missing, unknown, revoked, or its environment is inactive.No. Fix the key.
404The witness pair does not exist in the key's environment.No.
409The witness state transition is not allowed.No.
413The body is larger than 1 MB.No. Send less.
500, 503attest could not complete the request.Yes, with the same eventId or the identical observation.
Response · 400
{
  "error": "invalid eventType"
}
Response · 409 · Witness
{
  "error": "conflicting duplicate witness observation",
  "code": "WITNESS_CONFLICT"
}

All endpoints #

StatuserrorCause
400Malformed JSON payloadThe body is not valid JSON.
401Invalid API keySee Failed authentication.
413JSON payload exceeds the configured limitThe body is over 1 MB.
500Request processing failedUnexpected server error.

POST /v1/events #

StatuserrorCause
400event must be an objectThe body is an array or a scalar.
400unknown event fieldA top-level field other than the ten accepted fields.
400invalid eventTypeMissing, empty, over 255 characters, or contains a character outside A-Z a-z 0-9 . _ : / -.
400invalid source, invalid action, invalid actorType, invalid model or toolNot a string, empty, over 128 characters, or contains a disallowed character.
400invalid eventIdNot a string, empty, over 256 characters, or contains a disallowed character.
400invalid outcomeNot one of ok, error, unset, unknown.
400invalid timestampNot YYYY-MM-DDTHH:mm:ssZ or YYYY-MM-DDTHH:mm:ss.sssZ, or not a real date.
400metadata must be an objectmetadata is an array or a scalar.
400metadata has too many top-level keysMore than 32 top-level keys.
400metadata exceeds 8KBSerialized metadata is over 8,192 bytes.
400metadata nesting exceeds 2 levelsAn object or array nested more than 2 levels below the top level.
400invalid metadata keyAn empty key, a key over 128 characters, or __proto__, constructor, or prototype.
500Event ingestion failedThe event could not be recorded.
503Attestation verification failedThe signed record failed attest's own check and was not stored.

POST /v1/witness #

Statuscodeerror
400INVALID_WITNESS_OBSERVATIONwitness observation must be an object, pairId is malformed, stage must be assembly or delivery, or <field> must be a non-empty string of at most 255 characters for eventType, eventId, action, source, destination, outcome.
400WITNESS_INVALID_TIMESTAMPtimestamp must be an ISO-8601 UTC string. Missing, offset (+00:00), no zone, or impossible dates.
400WITNESS_INVALID_EVIDENCEevidence must be a plain object, or a limit message such as evidence exceeds maximum nesting depth of 8. See Limits.
409WITNESS_CONFLICTconflicting duplicate witness observation. The stage already holds an observation with different content.
409WITNESS_FINALIZEDwitness pair is finalized.
500—Witness observation failed.

POST /v1/witness/{pairId}/finalize and GET /v1/witness/{pairId} #

StatuserrorCause
400pairId is malformedNot 16–128 characters of A-Z a-z 0-9 _ -.
404Witness pair not foundNo pair with that ID in the key's environment.
500Witness finalization failedFinalize only. The pair could not be finalized.

Other endpoints #

EndpointStatuserror
POST /v1/traces400Invalid OTLP payload
POST /v1/traces500Trace ingestion failed
POST /v1/traces503Attestation verification failed
GET /health503No error field. The body reports status: "unhealthy" and which component is unavailable.