GOVERNMENT ACCESS

Public Sector API Documentation

Secure, read-only API access for Moroccan government ministries and agencies. All requests are audited and logged for compliance.

Authentication

All government API requests require a ministry-issued API key passed via the X-Gov-Api-Key header. Keys are issued by the certify Government Relations team after formal ministry verification.

curl -H "X-Gov-Api-Key: gov_men_xxxxx" \
     https://api.certify.ma/api/gov/v1/verify/{hash}
GET/api/gov/v1/verify/{hash}

Verify a credential by its SHA-256 hash. Returns verification status, institution, and credential metadata.

Auth: API Key (Header: X-Gov-Api-Key)Rate: 10,000 req/hour
{
  "verified": true,
  "credential": {
    "type": "Master",
    "field": "Informatique",
    "institution": "Université Mohammed V",
    "dateConferred": "2026-06-15",
    "status": "active"
  },
  "hash": "sha256:a8f2e1...",
  "verifiedAt": "2026-04-11T16:42:12Z"
}
GET/api/gov/v1/institution/{code}

Retrieve institution details and accreditation status by institution code.

Auth: API Key (Header: X-Gov-Api-Key)Rate: 1,000 req/hour
{
  "code": "UM5",
  "name": "Université Mohammed V",
  "city": "Rabat",
  "accredited": true,
  "totalCredentials": 12847,
  "totalVerifications": 98234
}
POST/api/gov/v1/batch-verify

Batch verify up to 500 credentials in a single request. Accepts array of hashes.

Auth: API Key (Header: X-Gov-Api-Key)Rate: 100 req/hour
{
  "results": [
    { "hash": "sha256:a8f2...", "verified": true },
    { "hash": "sha256:b3c1...", "verified": false }
  ],
  "total": 2,
  "verified": 1,
  "failed": 1
}
GET/api/gov/v1/statistics

Get aggregated national statistics: total credentials, verifications, institutions, and fraud detection metrics.

Auth: API Key (Header: X-Gov-Api-Key)Rate: 100 req/hour
{
  "totalCredentials": 245892,
  "totalVerifications": 1234567,
  "activeInstitutions": 127,
  "fraudsDetected": 342,
  "avgVerificationTime": "0.8s"
}
GET/api/gov/v1/apostille/{id}/status

Check the e-Apostille processing status for a specific document.

Auth: API Key (Header: X-Gov-Api-Key)Rate: 1,000 req/hour
{
  "id": "apo_2026_001",
  "status": "apostilled",
  "destination": "France",
  "submittedAt": "2026-04-08",
  "completedAt": "2026-04-10",
  "downloadUrl": "/api/gov/v1/apostille/apo_2026_001/pdf"
}