Mint Attestation
https://sandbox-api.truthlocks.com/v1/attestations/mintAuth requiredCreates 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. Supports JSON claims, documents (PDF), images (PNG, JPEG, WebP, TIFF), and video/audio files up to 50 MB. For document integrity verification, you can pass the SHA-256 hash via the document_hash field or embed it in claims.document.sha256 within the payload. If neither is provided, the system auto-computes a hash of the payload bytes. This stored hash allows verifiers to confirm the original document has not been altered.
Header Parameters
Idempotency-KeystringrequiredEnsures safe retries in case of network failures
Defaults to key_7y8i2p_abc
Body Parameters
issuer_idstringrequiredThe UUID of the issuer creating the attestation
Defaults to 550e8400-e29b-41d4-a716-446655440000
kidstringrequiredKey identifier for the signing key
Defaults to ed-key-1
algstringrequiredCryptographic algorithm used for signing
Defaults to Ed25519
schemastringrequiredCredential schema type (e.g. verifiable-id, passport, degree, aml-kyc). See full list below.
Defaults to verifiable-id
claimsobjectrequiredThe structured claims for this credential. Fields depend on the selected schema. See schema catalogue below.
Defaults to { "full_name": "", "employee_id": "", "department": "", "title": "", "start_date": "" }
recipient_emailstringEmail 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_hashstringHex-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_idstringUUID 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_typestringMIME 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.
Defaults to application/json
Responses
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"issuer_id": "550e8400-e29b-41d4-a716-446655440000",
"kid": "ed-key-1",
"schema": "verifiable-id",
"status": "VALID",
"claims": {
"full_name": "Jane Doe",
"employee_id": "EMP-2024-001",
"department": "Engineering",
"title": "Senior Developer",
"start_date": "2024-01-15"
},
"signature": "U2lnbmF0dXJl...",
"log_index": 1056,
"created_at": "2026-02-18T19:00:00Z"
}Credential Schema Catalogue
The schema parameter determines the credential type and the expected claims JSON structure. Select a schema below to see its claims template and automatically update the request body in the code panel.
All Available Schemas
Supported Content Payloads
Attestations can be minted for any file type. Set the content_type parameter to match your payload. For file-based attestations, compute the SHA-256 hash of the original file and include it in the claims for integrity verification.
payload_b64url) must not exceed 50 MB after encoding. For larger files, consider splitting or compressing before minting.Document Attestation Example
For document/file attestations, provide the SHA-256 hash so verifiers can confirm the original file is unaltered. There are three ways the hash is stored (in priority order):
- claims.document.sha256 — Embed the hash inside the payload JSON (used by the console GUI).
- document_hash — Pass the hex-encoded SHA-256 as a top-level request field (recommended for API users).
- Auto-computed — If neither is provided, the system computes SHA-256 of the raw payload bytes automatically.
Consumer Portal Email Delivery
Use the optional recipient_email parameter to deliver credentials directly to end-users via email. This powers B2C credential delivery workflows where issuers mint attestations on behalf of individuals.
Example: Email Credential Delivery
recipient_email field is optional. If omitted, the attestation is created normally without email delivery. The issuer can still share the attestation link manually or via their own notification system./v1/attestations/mintClick Try It! to send a real request, or view sample responses: