Certification Expiry Job
API Contract
REST
/api/v1/certifications
7 endpoints
GET
/api/v1/certifications/api/v1/certifications
List mentor certifications with optional filters
Public
Response Example
{
"data": [
{
"certification_id": "cert_04QR8TZ2",
"mentor_id": "mntr_01HX4V2K8P",
"certification_type": "peer_mentor_basic",
"issued_at": "2024-06-15T00:00:00Z",
"expires_at": "2027-06-15T00:00:00Z",
"status": "valid",
"auto_pause_applied": false
},
{
"certification_id": "cert_03PQ7SY1",
"mentor_id": "mntr_02BY7M3RL",
"certification_type": "peer_mentor_basic",
"issued_at": "2023-03-01T00:00:00Z",
"expires_at": "2026-03-01T00:00:00Z",
"status": "expired",
"auto_pause_applied": true
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 84
}
}
GET
/api/v1/certifications/api/v1/certifications/:id
Get a specific certification record
Public
Response Example
{
"certification_id": "cert_03PQ7SY1",
"mentor_id": "mntr_02BY7M3RL",
"certification_type": "peer_mentor_basic",
"issued_at": "2023-03-01T00:00:00Z",
"expires_at": "2026-03-01T00:00:00Z",
"status": "expired",
"auto_pause_applied": true,
"auto_pause_applied_at": "2026-03-02T01:00:00Z"
}
POST
/api/v1/certifications/api/v1/certifications
Record a new certification for a mentor
Public
Request Example
{
"mentor_id": "mntr_01HX4V2K8P",
"certification_type": "peer_mentor_advanced",
"issued_at": "2026-03-26T00:00:00Z",
"expires_at": "2028-03-26T00:00:00Z"
}
Response Example
{
"certification_id": "cert_09WX5AK7",
"mentor_id": "mntr_01HX4V2K8P",
"certification_type": "peer_mentor_advanced",
"issued_at": "2026-03-26T00:00:00Z",
"expires_at": "2028-03-26T00:00:00Z",
"status": "valid",
"auto_pause_applied": false,
"created_at": "2026-03-26T11:30:00Z"
}
PUT
/api/v1/certifications/api/v1/certifications/:id
Update a certification record (e.g. renew expiry date)
Public
Request Example
{
"expires_at": "2028-06-15T00:00:00Z",
"status": "valid"
}
Response Example
{
"certification_id": "cert_03PQ7SY1",
"expires_at": "2028-06-15T00:00:00Z",
"status": "valid",
"updated_at": "2026-03-26T11:35:00Z"
}
DELETE
/api/v1/certifications/api/v1/certifications/:id
Remove a certification record
Public
Response Example
{
"certification_id": "cert_03PQ7SY1",
"deleted": true,
"deleted_at": "2026-03-26T11:40:00Z"
}
POST
/api/v1/certifications/api/v1/certifications/expiry-job/run
Manually trigger the certification expiry auto-pause job
Public
Request Example
{
"dry_run": false
}
Response Example
{
"job_run_id": "job_26MAR2026_01",
"started_at": "2026-03-26T01:00:00Z",
"completed_at": "2026-03-26T01:00:04Z",
"mentors_scanned": 84,
"expired_found": 3,
"auto_paused": 3,
"failures": []
}
GET
/api/v1/certifications/api/v1/certifications/expiry-job/logs
List auto-pause event logs from expiry job runs
Public
Response Example
{
"data": [
{
"log_id": "log_01AAZ7BC",
"mentor_id": "mntr_02BY7M3RL",
"reason": "Certification peer_mentor_basic expired on 2026-03-01",
"job_run_id": "job_02MAR2026_01",
"applied_at": "2026-03-02T01:00:03Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 9
}
}