Api reference
Créer un batch
Génère des certificats en masse pour plusieurs destinataires. Consomme **N crédits** (1 par destinataire). Maximum 1000 destinataires par requête.
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
curl -X POST "http://localhost:3000/api/v1/batches" \ -H "Content-Type: application/json" \ -d '{ "templateId": "550e8400-e29b-41d4-a716-446655440000", "recipients": [ { "variables": { "nom_complet": "Fatou Sow", "formation": "Marketing digital" } } ] }'{
"batchId": "string",
"total": 0,
"queued": 0,
"credits": {
"consumed": 1,
"remaining": 49
},
"certificates": [
{
"id": "string",
"recipientName": "string",
"verificationHash": "string",
"renderStatus": "PENDING"
}
]
}{
"error": {
"code": "UNAUTHORIZED",
"message": "string",
"status": 0
}
}