API Keys

Manage your account's API keys

List API Keys

GET https://api.mckube.dev/account/api-keys

This endpoint lists all the information about API keys associated with the current account. Note: The API keys themselves are not returned, as they are only visible upon creation.

Headers

Name
Type
Description

Authorization

string

[
    {
        "createdAt": "2020-06-07T18:20:47.748715+01:00",
        "id": "b4cb6840-46b3-48de-9d2c-6c3b82a5e7b3",
        "isRevoked": false,
        "key": null,
        "name": "My CI Pipeline"
    },
    {
        "createdAt": "2020-06-07T17:15:25.764298+01:00",
        "id": "2056fbaf-63d4-4286-baf0-cc89010bd66e",
        "isRevoked": true,
        "key": null,
        "name": "Some Dodgy Application"
    }
]

Create API Key

POST https://api.mckube.dev/account/api-keys

This endpoint creates a new API key, with the given name. Note: The actual key itself (key) must be taken and stored appropriately when received, as this is the only time it is returned to the consumer/user.

Headers

Name
Type
Description

Authorization

string

Request Body

Name
Type
Description

name

string

A descriptive name for the API key

{
    "id": "d9be049a-68f9-4735-b5ee-c7064805863f",
    "key": "aDwas59JDNJZo6HouTBzYuYDEGwb5reW",
    "name": "Barry Scott"
}

Revoke API Key

DELETE https://api.mckube.dev/account/api-keys/:id

This endpoint instantly revokes an API key, meaning it can no longer be used successfully in API calls. Note: Keys cannot be un-revoked, so use this endpoint with caution.

Path Parameters

Name
Type
Description

id

string

The ID of the API key to revoke

Headers

Name
Type
Description

Authorization

string

A valid API key, prefixed with Bearer

Last updated

Was this helpful?