Gestion de API Keys
Todos los endpoints de admin requieren autenticacion. Rate limit: 10 requests/min por IP.
Solo tier
internal. Estos endpoints son para el equipo de eCondor Digital, no para clientes SaaS. Una API key de plan Trial, Starter o Pro recibe403 Forbiddencon el mensaje"Admin endpoints require an internal-tier API key"al llamarlos. Si sos cliente y necesitas una key nueva, contacta a eCondor (ver Planes y Precios) en vez de usar este endpoint.
POST /admin/keys
Genera una nueva API key.
curl -X POST http://localhost:4000/api/v1/admin/keys \ -H "Content-Type: application/json" \ -H "x-api-key: sk_tu_key" \ -d '{ "name": "wordygo-frontend" }'Respuesta 201:
{ "key": "sk_a1b2c3d4e5f6...", "message": "Save this key securely. It will not be shown again."}La raw key se muestra una vez. Las keys generadas en caliente se pierden al reiniciar el proceso. La unica key persistente entre reinicios es
API_KEYdel.env.
GET /admin/keys
Lista todas las keys registradas.
curl http://localhost:4000/api/v1/admin/keys \ -H "x-api-key: sk_tu_key"Respuesta 200:
[ { "keyPreview": "sk_test_...ocal", "name": "Default (from .env)", "createdAt": "2026-05-09T20:00:00.000Z", "lastUsedAt": "2026-05-09T21:00:00.000Z", "isActive": true }]DELETE /admin/keys
Revoca una key.
curl -X DELETE http://localhost:4000/api/v1/admin/keys \ -H "Content-Type: application/json" \ -H "x-api-key: sk_tu_key" \ -d '{ "rawKey": "sk_a1b2c3d4e5f6..." }'Respuesta 200:
{ "revoked": true }