Generate a new API key. The full key is only returned once — store it securely. Optionally set a webhook URL at creation time.
Request Body
Descriptive name for the key (e.g., “Production Server”, “CI Pipeline”). Max 64 characters.
Optional HTTPS URL to receive webhook events. A signing secret is auto-generated when set.
Response
The full API key. Only shown once. Format: mgp_ followed by 40 hex characters.
UUID of the created key. Use this for update/revoke operations.
First 8 characters of the key for identification.
ISO 8601 creation timestamp.
Signing secret for HMAC verification, or null if no webhook URL was set.
The full API key is only returned in this response. Store it immediately — you cannot retrieve it later.
curl -X POST https://api.magpipe.ai/functions/v1/manage-api-keys \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "generate",
"name": "Production Server",
"webhook_url": "https://your-server.com/webhook"
}'
{
"key": "mgp_fc059e03d5c97cbf328b4a1412c226625e9ae512",
"id": "fd5afe2f-1747-4ae2-9f41-9e1b3b4307b5",
"name": "Production Server",
"key_prefix": "mgp_fc05",
"created_at": "2026-02-18T10:40:36.561396+00:00",
"webhook_secret": "whsec_example0000000000000000000000000000000000000000000000000000000"
}