🔑API Key Status API
This endpoint checks only whether the supplied API key is active.
Send the API key in the Authorization header using the Bearer scheme. Missing, invalid, revoked, and expired keys receive the same generic 401 Unauthorized response.
- 🔹 This API requires anAPI Keyfor authentication.
- 🔹 The API key must be sent viaheaderand query parameters are no longer used.
Backend integration examples
Choose your backend language. Every example reads secret credentials only from environment variables.
const response = await fetch("https://api.dinakel.com/api/gateway/v1/api-key/status", {
method: "GET"
headers: {
Authorization: `Bearer ${process.env.DINAKEL_API_KEY}`,
Accept: "application/json"
}
});
const result = await response.json();
if (!response.ok) throw new Error(result.message || "Dinakel request failed");
console.log(result);💡 Example Request
GET https://api.dinakel.com/api/gateway/v1/api-key/status
Headers:
Authorization: Bearer <your_api_key>
Only an active, unexpired key receives HTTP 200. Revoked, expired, and unknown keys intentionally receive the same generic 401 response.
🔍 Example Response
{
"status": true,
"statusCode": 200,
"data": {
"apiKeyStatus": "active"
}
}
⚠️ Error Handling
The API may return the following error responses:
{
"status": false,
"statusCode": 401,
"message": "Unauthorized"
}
401 Unauthorized:The api_key header is missing or invalid. Ensure a valid key is provided.
{
"status": false,
"statusCode": 401,
"message": "Unauthorized"
}
401 Unauthorized:The provided API key was not found. Double-check the key and try again.
{
"status": false,
"statusCode": 500,
"message": "Internal server error"
}
500 Internal Server Error:An unexpected server error occurred. Try again later or contact support.