POST
/api/v1/merchant/merchants/:merchantId/api-keysPermission · merchant.api_keys.manageCréer une clé API
Génère une clé secrète izzi_mk_sandbox_… ou izzi_mk_live_…. Le secret n'est retourné qu'une fois.
Paramètres de chemin
| Nom | Type | Requis | Description |
|---|---|---|---|
| merchantId | string | Oui | UUID marchand |
Corps de requête
| Nom | Type | Requis | Description |
|---|---|---|---|
| label | string | Oui | Nom affiché de la clé |
| environment | SANDBOX | PRODUCTION | — | SANDBOX ou PRODUCTION |
| scopes | string[] | — | Permissions (défaut: *) |
Exemple requête
json
{
"label": "Backend production",
"environment": "SANDBOX"
}Réponse (data)
| Nom | Type | Requis | Description |
|---|---|---|---|
| secret | string | — | Secret complet (une seule fois) |
| keyPrefix | string | Oui | Préfixe affiché ensuite |
Exemple réponse
json
{
"success": true,
"data": {
"id": "mk_abc123",
"keyPrefix": "izzi_mk_sandbox_ab",
"environment": "SANDBOX",
"secret": "izzi_mk_sandbox_…"
}
}Exemples
bash
curl -X POST https://api.dev.izzi-finance.com/api/v1/api/v1/merchant/merchants/:merchantId/api-keys \
-H "Authorization: Bearer izzi_mk_sandbox_…" \
-H "Content-Type: application/json" \
-d '{
"label": "Backend production",
"environment": "SANDBOX"
}'