# CredentialTestResult

What a test of a credential found: each key was used to list the provider's models at the credential's endpoint. The test passes when every key does; a passing test switches a credential its circuit breaker turned off back on.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `credentialId` | `uuid` |  |
| `succeeded` | `boolean` |  |
| `errorCode` | `string \| null` | The first failing key's code (`CredentialErrorCodes`); null when the test passed. |
| `testedAtUtc` | `datetime` |  |
| `keys` | [`CredentialKeyTestResult`](https://docs.maitento.com/reference/types/credential-key-test-result.md)`[]` |  |

## Example

```json
{
  "credentialId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "succeeded": false,
  "errorCode": "...",
  "testedAtUtc": "2026-10-26T12:00:00.0000000Z",
  "keys": [
    {
      "keyId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
      "keyHint": "...",
      "succeeded": false,
      "errorCode": "...",
      "statusCode": 0
    }
  ]
}
```

## Where it's used

- [`credentials.testUnsaved`](https://docs.maitento.com/reference/api/credentials.md) (`POST /credentials/test`)
- [`credentials.test`](https://docs.maitento.com/reference/api/credentials.md) (`POST /credentials/by-id/{id}/test`)
