Integration Guide
Backend Verification
Verify evidence on your server using the REST API. Node.js and Python examples.
20 minIntermediate
1
Get API key
Generate an API key from your Immutis dashboard: 1. Go to Settings → API Keys 2. Click "Generate New Key" 3. Copy and store securely
2
Verify with Node.js
const axios = require('axios');
async function verifyEvidence(evidenceId, apiKey) {
try {
const response = await axios.post(
'https://api.immutis.com/v1/evidence/' + evidenceId + '/verify',
{},
{
headers: {
'Authorization': 'Bearer ' + apiKey,
'Content-Type': 'application/json'
}
}
);
return response.data;
} catch (error) {
console.error('Verification failed:', error.message);
throw error;
}
}
// Usage
const result = await verifyEvidence('ev_abc123', process.env.IMUTIS_API_KEY);
console.log('Valid:', result.valid);
console.log('Checks:', result.checks);3
Verify with Python
import requests
def verify_evidence(evidence_id: str, api_key: str) -> dict:
response = requests.post(
f"https://api.immutis.com/v1/evidence/{evidence_id}/verify",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
)
response.raise_for_status()
return response.json()
# Usage
result = verify_evidence("ev_abc123", os.environ["IMUTIS_API_KEY"])
print(f"Valid: {result['valid']}")
print(f"Checks: {result['checks']}")4
Generate certificate
After verification, generate a forensic certificate:
const certificate = await axios.post(
'https://api.immutis.com/v1/evidence/' + evidenceId + '/certificate',
{ format: 'forensic' },
{ headers: { 'Authorization': 'Bearer ' + apiKey } }
)
// Returns download URL for PDF certificate5
Webhook verification
For real-time updates, set up webhooks:
// Register webhook
await axios.post(
'https://api.immutis.com/v1/webhooks',
{
url: 'https://yourapp.com/webhooks/immutis',
events: ['evidence.captured', 'evidence.verified']
}
)
// Verify webhook signature
const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return signature === expected;
}API Reference
- Base URL: https://api.immutis.com/v1
- Auth: Bearer token
- Full reference: /developers/api