## Validate

`zones.providers.validate(strid, ProviderValidateParams**kwargs)  -> ValidationResult`

**post** `/zones/{zoneId}/providers/{id}/validate`

Runs on-demand OIDC connection checks (issuer reachability, metadata retrieval, endpoint consistency, authorization endpoint reachability, and a demonstration client_credentials exchange) against the provider and returns a per-check result. Results are not persisted.

### Parameters

- `zone_id: str`

- `id: str`

### Returns

- `class ValidationResult: …`

  Result of running the provider OIDC connection checks on demand. Not persisted.

  - `checks: List[Check]`

    Per-check results, in execution order

    - `check: Literal["issuer_reachability", "metadata_retrieval", "endpoint_consistency", 2 more]`

      Identifier of an individual provider validation check

      - `"issuer_reachability"`

      - `"metadata_retrieval"`

      - `"endpoint_consistency"`

      - `"authorization_endpoint_reachability"`

      - `"credential_exchange"`

    - `status: Literal["pass", "fail", "skipped_with_reason", "not_applicable"]`

      Outcome of a single check. `pass`/`fail` mean the check ran. `skipped_with_reason` means it could not run because a prerequisite is missing on our side (e.g. no credential stored). `not_applicable` means the check does not apply to this provider class (e.g. a login-flow-only provider that does not advertise the `client_credentials` grant) — render as a neutral state, distinct from a failure. Neither `skipped_with_reason` nor `not_applicable` fails the overall run.

      - `"pass"`

      - `"fail"`

      - `"skipped_with_reason"`

      - `"not_applicable"`

    - `detail: Optional[str]`

      Human-readable explanation, present on `fail`, `skipped_with_reason`, and `not_applicable`.

  - `provider_id: str`

    Provider that was validated

  - `status: Literal["pass", "fail"]`

    Overall outcome. `fail` when any individual check failed; skipped checks do not fail the run.

    - `"pass"`

    - `"fail"`

  - `validated_at: datetime`

    When the validation run completed

### Example

```python
import os
from keycardai_api import KeycardAPI

client = KeycardAPI(
    api_key=os.environ.get("KEYCARD_API_API_KEY"),  # This is the default and can be omitted
)
validation_result = client.zones.providers.validate(
    id="id",
    zone_id="zoneId",
)
print(validation_result.provider_id)
```
