Skip to main content
POST
Mint Attestation
Creates a new cryptographically signed attestation. The attestation is signed using the specified issuer key and recorded in the transparency log with a unique log index for auditability.

Supported Content Payloads

Attestations can be minted for any file type. Include the SHA-256 hash in the document_hash parameter to verify offline file integrity.
Maximum Payload Size: 50 MB. The base64url-encoded payload cannot exceed 50 MB after encoding.

Credential Schema Catalogue

The schema parameter determines the credential type and expected JSON claims structure.

Document hash for file integrity

When attesting a document or file, include the document_hash parameter with the hex-encoded SHA-256 hash of the original file. Verifiers can then confirm the file has not been altered by comparing their computed hash against the stored value — without needing the full payload. The platform resolves the document hash using the following priority:
  1. claims.document.sha256 inside the JSON payload
  2. The explicit document_hash field on the request body
  3. Auto-computed SHA-256 of the raw payload bytes (fallback)
For best results, always compute the hash client-side and pass it explicitly:
At verification time, pass the same hash as document_hash_hex to the Verify endpoint to confirm file integrity without re-uploading the file.
If you omit document_hash and don’t include claims.document.sha256 in your payload, the platform computes the hash automatically from the raw payload bytes. Passing it explicitly is recommended because it ensures the hash matches the original file before any base64url encoding.

Example: Email Credential Delivery (B2C)

1

Issuer mints via API

Include recipient_email in the request body
2

Account Lookup

System checks if email exists in consumer portal
3

Delivery & Notification

Existing users receive inbox notifications. New users receive a signup invite holding their pending attestations.
The recipient_email is entirely optional. If omitted, you must deliver the attestation URLs to your users manually.

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Headers

Idempotency-Key
string
required

Body

application/json
issuer_id
string<uuid>
required

The UUID of the issuer creating the attestation

Example:

"550e8400-e29b-41d4-a716-446655440000"

kid
string
required

Key identifier for the signing key

Example:

"es256-key-1"

alg
enum<string>
required

Cryptographic algorithm used for signing

Available options:
Ed25519,
ES256,
ES384,
ES512,
RS256,
RS384,
RS512,
PS256,
PS384,
PS512
Example:

"ES256"

schema
enum<string>
required

Credential schema type (e.g. verifiable-id, passport, degree, aml-kyc). See full list below.

Available options:
verifiable-id,
passport,
drivers-license,
government-id,
self-sovereign-id,
employment-verification,
professional-role,
membership-card,
professional-certification,
license,
accreditation,
degree,
completion-cert,
course-credit,
transcript,
micro-credential,
training-completion,
medical-license,
dea-registration,
board-certification,
health-credential,
vaccination-record,
aml-kyc,
security-clearance,
sam-gov,
jurisdiction-approval,
attestation-of-will,
bank-verification,
credit-attestation,
income-verification,
skill-badge,
competency,
industry-cert,
product-authenticity,
chain-of-custody,
origin-verification,
custom,
attestation
Example:

"verifiable-id"

claims
object
required

The structured claims for this credential. Fields depend on the selected schema. See schema catalogue below.

Example:
recipient_email
string<email>

Email address of the credential recipient. When provided, the platform sends a notification email with a link to view the attestation on the consumer portal (verify.truthlocks.com). If the recipient does not have a consumer portal account, they receive an invitation to sign up. This enables B2C credential delivery workflows.

document_hash
string

Hex-encoded SHA-256 hash of the document or file being attested. Used for document integrity verification — verifiers can recompute the hash of the original file and compare it against this stored value. If omitted, the system checks for claims.document.sha256 in the payload, and if that is also absent, auto-computes the SHA-256 of the raw payload bytes. For best results, compute the hash client-side before base64url-encoding the payload.

pack_id
string<uuid>

UUID of the verification pack to link this attestation to. The pack must be in 'active' status. When provided, the pack's verifications_count is automatically incremented. Use this to organize attestations by verification program and track analytics per pack.

content_type
string

MIME type of the payload. Supported: application/json (default), application/pdf, image/png, image/jpeg, image/webp, image/tiff, video/mp4, video/webm, audio/mpeg, audio/wav, application/octet-stream. Max payload size: 50 MB.

Example:

"application/json"

Response

Attestation minted

id
string<uuid>
issuer_id
string<uuid>
kid
string
status
enum<string>
Available options:
VALID,
REVOKED,
SUPERSEDED
payload
object
signature
string
log_index
integer
created_at
string<date-time>