# Verify provider in project

`POST /v1/projects/{project}/providers/{provider}/verify`, operation `providers.VerifyProviderInProject`

Asks the provider's service whether it still accepts the key, and records its answer in state. Fails with unavailable, leaving the state as it was, when the service cannot be reached or is busy.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `project` | path | Yes | `string` | The project's ID. |
| `provider` | path | Yes | `string` | The provider's ID. |

## Responses

### 200

OK

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `availability` | `Availability` | Yes | For an organization's provider: the projects it is shared with, which may make models of their own through it; a project's own model whose provider isn't shared with it serves nothing. The organization's models, and what projects adopted of them, serve wherever the models are shared, whomever the provider is shared with. A project's own provider is shared with none. |
| `availability.allProjects` | `boolean` | Yes | Every project, including those created later. |
| `availability.projects` | `string[]` | Yes | Projects, projects/{project_id}, when not all of them; at most 500. Past that, make the resource available to every project. |
| `config` | `map<string, string>` | Yes | Settings, as the type's configFields describe them. |
| `createTime` | `string (date-time)` | No | When the provider was added; unset on one that was only validated. |
| `displayName` | `string` | Yes | Name shown in user interfaces. Defaults to the type's name. |
| `keyHint` | `string` | Yes | The last characters of the API key, to recognize it by; empty for providers connected by WORKLOAD_IDENTITY. |
| `name` | `string` | Yes | Resource name, organizations/{organization_id}/providers/{provider_id}, or projects/{project_id}/providers/{provider_id} for a project's own. |
| `state` | `string` | Yes | Whether the provider's service accepts the credential: ACTIVE, it accepted it when it was last verified; NEEDS_ATTENTION, it refused the credential or settings, or the provider isn't set up yet, and stateReason says why. Values: `ACTIVE`, `NEEDS_ATTENTION`. |
| `stateReason` | `string` | Yes | Why the provider needs attention. |
| `trust` | `ProviderTrust` | No | What the cloud trusts of kosem for this provider, for a type connected by WORKLOAD_IDENTITY. |
| `trust.attributeCondition` | `string` | No | For Google Cloud: the attribute condition that the workload identity provider must have, which takes the identity tokens of this organization's providers, its projects' own among them, and of no environment. kosem's issuer is every customer's, so a provider without it trusts them all; each service account then lets one provider's subject act as it. |
| `trust.issuer` | `string` | Yes | kosem's issuer of identity tokens, whose keys it publishes at /.well-known/jwks.json. |
| `trust.subject` | `string` | Yes | The subject of kosem's identity tokens for the provider: provider:{name}. Only kosem mints it, so trusting it trusts no other organization's provider and no environment. |
| `type` | `string` | Yes | The provider's type, such as providerTypes/openai. It never changes. |
| `updateTime` | `string (date-time)` | No | When the provider was last updated; unset on one that was only validated. |
| `verifyTime` | `string (date-time)` | Yes | When the provider's service last accepted or refused the credential. |

### default

Error

Base URL: `https://api.kosem.ai`. See [API conventions](https://docs.kosem.ai/reference/api-conventions.md) for authentication, pagination and errors, and [https://docs.kosem.ai/openapi.yaml](https://docs.kosem.ai/openapi.yaml) for the full OpenAPI document.