Integrate blockchain certificate verification into your application.
Verify a certificate with a single API call:
GET https://api.onchaincert.org/v1/certificates/verify?certId=OCC-ABC123-XYZ https://api.onchaincert.org/v1 Current API version: v1
/v1/certificates/verify Public Verify the authenticity of a certificate on the blockchain.
| Parameter | Type | Description |
|---|---|---|
| certId | string | Required. The certificate ID to verify. |
{
"success": true,
"valid": true,
"certId": "CERT-1234567890-ABC123",
"certHash": "0x7f83b1657ff1fc...",
"issuedAt": "2024-12-01T10:30:00.000Z",
"metadata": {
"recipientName": "John Doe",
"certificateTitle": "Web Development Bootcamp",
"issuerName": "TechAcademy"
}
} {
"success": true,
"valid": false,
"certId": "INVALID-ID",
"certHash": null,
"issuedAt": null,
"metadata": null
} /v1/certificates/issue Auth Required Issue a new certificate on the blockchain. Requires authentication.
| Header | Value |
|---|---|
| Authorization | Bearer <access_token> |
| Content-Type | application/json |
{
"certId": "CERT-1234567890-ABC123",
"certHash": "0x7f83b1657ff1fc...",
"metadata": {
"recipientName": "John Doe",
"certificateTitle": "Web Development Bootcamp",
"issuerName": "TechAcademy"
}
} {
"success": true,
"certId": "CERT-1234567890-ABC123",
"txHash": "0x123abc...",
"blockNumber": 12345678
} /v1/subscription Auth Required Get the current user's subscription status and quota.
{
"success": true,
"subscription": {
"plan": "starter",
"monthly_quota": 100,
"monthly_used": 25,
"status": "active"
}
} /v1/health Public Check API health status.
{
"status": "ok",
"version": "1",
"timestamp": "2024-12-02T12:00:00.000Z"
} API endpoints are rate limited to prevent abuse:
| Endpoint | Limit |
|---|---|
| /v1/certificates/verify | 30 requests/minute per IP |
| /v1/certificates/issue | 10 requests/minute per user |
| /v1/subscription | 20 requests/minute per IP |
| /v1/checkout | 5 requests/minute per IP |
When rate limited, you'll receive a 429 response with Retry-After header.
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid token |
| 429 | Too Many Requests - Rate limited |
| 500 | Internal Server Error |
const API_BASE = 'https://api.onchaincert.org/v1';
async function verifyCertificate(certId) {
const response = await fetch(
`${API_BASE}/certificates/verify?certId=${certId}`
);
const data = await response.json();
return data;
}
// Usage
const result = await verifyCertificate('OCC-ABC123-XYZ');
console.log(result.valid); // true or false import requests
API_BASE = "https://api.onchaincert.org/v1"
def verify_certificate(cert_id):
response = requests.get(
f"{API_BASE}/certificates/verify",
params={"certId": cert_id}
)
return response.json()
# Usage
result = verify_certificate("OCC-ABC123-XYZ")
print(result["valid"]) # True or False curl "https://api.onchaincert.org/v1/certificates/verify?certId=OCC-ABC123-XYZ" If you have questions or need assistance with the API, contact our support team.
Contact Developer Support