Api reference
Générer un certificat
Génère un certificat à partir d'un template. Consomme **1 crédit**. Le rendu PDF est asynchrone — utilisez l'endpoint `GET /certificates/:id` ou un webhook `certificate.ready` pour savoir quand le PDF est disponible.
Authorization
ApiKeyAuth AuthorizationBearer <token>
Clé API au format cm_live_..., générée depuis Paramètres > Clés API.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3000/api/v1/certificates" \ -H "Content-Type: application/json" \ -d '{ "templateId": "550e8400-e29b-41d4-a716-446655440000", "variables": { "nom_complet": "Amadou Diallo", "formation": "Gestion de projet agile", "date_fin": "31 mars 2026" } }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"verificationHash": "string",
"verificationUrl": "http://example.com",
"recipientName": "string",
"recipientEmail": "string",
"status": "GENERATED",
"renderStatus": "PENDING",
"createdAt": "2019-08-24T14:15:22Z",
"credits": {
"consumed": 1,
"remaining": 49
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"status": 0
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"status": 0
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"status": 0
}
}