Management APIs/API Keys

List API Keys

GET

Overview

List API keys owned by the authenticated account. The response only includes masked previews, never the full plaintext key.

Authentication

All API requests require a Bearer token in the request header.

Authorization: Bearer YOUR_API_KEY

Create and manage API keys from API Keys or use https://www.apimall.ai/api-keys.

Request

API Information

  • URL: GET https://gateway.apimall.ai/api/v1/keys

Response Example

{
  "success": true,
  "data": [
    {
      "id": 12,
      "title": "Production backend",
      "status": "created",
      "created_at": "2026-03-10T08:00:00.000Z",
      "key_preview": "sk-abcd...wxyz"
    }
  ],
  "request_id": "req_01HQ9M7J7X9P7Y8T6W5V4U3S2R"
}

cURL Example

curl --request GET 'https://gateway.apimall.ai/api/v1/keys' \
  --header 'Authorization: Bearer YOUR_API_KEY'

JavaScript Example

const API_KEY = process.env.APIMALL_API_KEY;

const response = await fetch('https://gateway.apimall.ai/api/v1/keys', {
  headers: {
    Authorization: `Bearer ${API_KEY}`,
  },
});

if (!response.ok) {
  throw new Error(`Request failed: ${response.status} ${response.statusText}`);
}

const data = await response.json();
console.log(data);

Response Parameters

ParameterTypeDescription
success
boolean

Whether the request completed successfully.

data
array

Primary response payload. Task endpoints return an object with the documented task fields; list endpoints return an array of resources or a paginated object containing `items`.

data[].id
integer

Numeric identifier for a returned list item.

data[].title
string

Human-readable title for a returned list item.

data[].status
string

Status value for a returned list item.

data[].created_at
string

Creation timestamp for a returned list item.

data[].key_preview
string

Masked preview of an existing API key in list responses.

request_id
string

Request identifier for debugging and support.

Error Response Example

{
  "success": false,
  "error": {
    "code": "unauthorized",
    "message": "Unauthorized"
  },
  "request_id": "req_01HQ9M7J7X9P7Y8T6W5V4U3S2R"
}

Integration Notes

  • Store your API key on the server side only.

Error Codes

Common Error Codes

Status CodeDescription
200Request successful
401API key required or invalid API key
403API access not approved or request made on a non-gateway host
404Resource not found
429Rate limit exceeded
500Internal server error
List API Keys - API Reference | API Mall | API Mall