GoodMem
ReferenceAPIREST APIAPI Keys

List API keys

Retrieves a list of API keys belonging to the authenticated user. The list includes metadata about each key but not the actual key values or key hashes for security reasons. Requires LIST_APIKEY_OWN permission (or LIST_APIKEY_ANY for admin users to view keys from any user). This is a read-only operation with no side effects.

GET
/v1/apikeys
x-api-key<token>

In: header

Response Body

curl -X GET "http://localhost:8080/v1/apikeys"
{
  "keys": [
    {
      "apiKeyId": "550e8400-e29b-41d4-a716-446655440000",
      "userId": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2",
      "keyPrefix": "gm_12345...",
      "status": "ACTIVE",
      "labels": "{\"purpose\": \"production\", \"service\": \"recommendation-engine\"}",
      "expiresAt": "1672531200000",
      "lastUsedAt": "1640995200000",
      "createdAt": "1640908800000",
      "updatedAt": "1640908800000",
      "createdById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2",
      "updatedById": "b3303d0a-1a4a-493f-b9bf-38e37153b5a2"
    }
  ]
}
Empty
Empty