Launch Week 02 wrapped — explore all five launches

Get Key

GEThttps://api.confident-ai.com/v2/organization/api-keys/{apiKeyId}

Retrieves one organization-scoped API key by id. Its value is masked — the full value is only ever returned once, by the response that issues it. A rotatesAt in the past means the grace period is over and the outgoing value is already rejected on authentication, even though this endpoint still shows it; listing the keys completes the rotation.

GET/v2/organization/api-keys/{apiKeyId}
curl -X GET "https://api.confident-ai.com/v2/organization/api-keys/{apiKeyId}" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>"
200
{
  "success": true,
  "data": {
    "id": 1420,
    "name": "CI pipeline",
    "valid": true,
    "created_at": "2025-01-15T09:30:00.000Z",
    "expiresAt": "2025-04-15T09:30:00.000Z",
    "value": "***************LmNoPq",
    "shadowValue": "***************Tu6vWx",
    "rotatesAt": "2025-03-01T12:00:00.000Z",
    "lastUsed": "2025-02-28T18:45:12.000Z"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Path parameters

  • apiKeyIdintegerRequired

    The id of the API key.

Response

Get Key succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    An API key as it reads after it has been issued, with both secrets masked. Organization-scoped and project-scoped keys have the same shape; a key's scope is fixed when it is created and shows in the prefix of its value (confident_<region>_org_ or confident_<region>_proj_).

    Show 9 propertiesHide 9 properties
    • idinteger

      The id of the API key, generated by Confident AI.

    • namestring | null

      The label for the key, shown on the Confident AI platform.

    • validboolean

      Whether the key authenticates. A deactivated key is rejected on every request until it is reactivated.

    • created_atstring

      When the key was created.

    • expiresAtstring | null

      The instant the key stops authenticating, or null when it never expires. Confident AI computes it from the expiresInDays duration sent when the key was created or last rotated.

    • valuestring

      The key, masked: fifteen asterisks followed by its last six characters. The full value is returned only by the response that issues it — creating a key, or rotating one — and never again.

    • shadowValuestring | null

      The masked replacement value while a rotation's grace period is running, or null when no rotation is pending.

    • rotatesAtstring | null

      When a pending rotation completes — shadowValue becomes value and the old value stops authenticating — or null when no rotation is pending.

    • lastUsedstring | null

      When the key last authenticated a request, or null when it never has.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI