Skip to main content

Verify Attestation

Retrieve and verify an attestation by its ID.

Endpoint

GET /v1/verify/{attestation_id}

Authentication

Not required. This is a public endpoint.

Path Parameters

ParameterDescription
attestation_idThe UUID of the attestation

Response

Status: 200 OK
{
  "valid": true,
  "attestation_id": "abc123-def456-ghi789-jkl012",
  "agent_slug": "my-agent",
  "action": "Processed customer request #12345",
  "inputs_hash": "a1b2c3d4e5f6...",
  "payload_hash": "sha256-of-canonical-payload",
  "signature": "base64-ed25519-signature",
  "key_id": "abc123def456",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "has_zk_proof": false,
  "zk_proof": null,
  "metadata": null,
  "independent_verification": {
    "curl_pubkey": "curl https://api.treeship.dev/v1/pubkey",
    "verify_signature": "openssl pkeyutl -verify ...",
    "recreate_payload": "{\"action\":\"...\",\"agent_slug\":\"...\"}"
  }
}

Response Fields

FieldTypeDescription
validbooleanWhether the signature is valid
attestation_idstringUnique attestation ID
agent_slugstringAgent identifier
actionstringAction description
inputs_hashstringHash of inputs
payload_hashstringHash of the signed payload
signaturestringBase64-encoded Ed25519 signature
key_idstringID of the signing key
timestampstringISO 8601 timestamp
has_zk_proofbooleanWhether a ZK proof is attached
independent_verificationobjectCommands for offline verification

Example

curl https://api.treeship.dev/v1/verify/abc123-def456-ghi789-jkl012

Errors

StatusErrorDescription
404Attestation not foundNo attestation with this ID

Independent Verification

The response includes instructions for verifying without trusting Treeship:
  1. Get the public key: curl https://api.treeship.dev/v1/pubkey
  2. Save the payload: The recreate_payload field contains the exact JSON that was signed
  3. Verify: Use OpenSSL or any Ed25519 library to verify the signature