Launch Week 02 wrapped — explore all five launches

Create Organization API Key

POSThttps://api.confident-ai.com/v1/organization/api-keys

Mints a new organization-scoped API key. The raw value is returned exactly once in this response and can never be retrieved again — store it securely.

POST/v1/organization/api-keys
curl -X POST "https://api.confident-ai.com/v1/organization/api-keys" \
  -H "CONFIDENT_API_KEY: <ORGANIZATION-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "CI/CD key"
}'
200
{
  "success": true,
  "data": {
    "apiKey": {
      "id": 12,
      "name": "CI/CD key",
      "valid": true,
      "value": "confident_org_a3f1c9e2b7d84f06a1c2e3d4f5a6b7c8",
      "created_at": "2024-12-04T23:00:00.000Z",
      "lastUsed": null
    }
  }
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The organization API key for your Confident AI organization.

Request body

  • namestringRequired

    Human-readable label for the API key

  • expiresInDaysinteger

    Number of days from now until the key expires. Omit for a key that never expires.

Response

  • successboolean

    Indicates if the request was successful

  • dataobject

    Show 1 propertyHide 1 property
    • apiKeyobject

      Show 9 propertiesHide 9 properties
      • idinteger

        Unique identifier for the API key

      • namestring

        Human-readable label for the API key

      • validboolean

        Whether the key is active. A deactivated key is rejected on authentication.

      • valuestring

        The API key value. This is redacted (only the last 6 characters are shown, prefixed with asterisks) on every response except the create response — and the rotate response when rotating without a grace period — where the full value is returned exactly once.

      • shadowValuestring

        The replacement value while a rotation's grace period is running, or null when no rotation is pending. Redacted on every response except the rotate response that issued it, where the full value is returned exactly once.

      • rotatesAtstring

        ISO 8601 timestamp of when a pending rotation completes and shadowValue replaces value, or null when no rotation is pending

      • expiresAtstring

        ISO 8601 timestamp of when the key expires, or null if it never expires

      • created_atstring

        ISO 8601 timestamp of when the key was created

      • lastUsedstring

        ISO 8601 timestamp of when the key was last used to authenticate, or null if never used

Built byConfident AI