Skip to main content

api_key_malformed_prefix

HTTP Status: 401 Category: Authentication

When you see this

API key prefix is not sk_live_, sk_test_, or ma_live_.

How to fix it

Re-copy the full key from Settings > Developer. Check error.details.detected_prefix for what the server parsed.

Example response

{
"error": {
"code": "api_key_malformed_prefix",
"message": "API key prefix is not sk_live_, sk_test_, or ma_live_.",
"hint": null,
"doc_url": "https://docs.valara.cloud/api-reference/errors/api_key_malformed_prefix",
"request_id": "req_01H...",
"details": {
"errors": [],
"field_count": 0
}
}
}