Skip to main content
GET
/
v1
/
api_keys
JavaScript
import Charcoal from '@charcoalhq/sdk';

const client = new Charcoal({
  apiKey: process.env['CHARCOAL_API_KEY'], // This is the default and can be omitted
});

const apiKeys = await client.apiKeys.list();

console.log(apiKeys.api_keys);
{
  "api_keys": [
    {
      "id": "<string>",
      "name": "<string>",
      "key_prefix": "<string>",
      "key_suffix": "<string>",
      "created_by": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "last_used_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Successful response

api_keys
object[]
required