# CredentialStackEntry

One place in a stack: a credential, plus this stack's own rules for it. The rules can only narrow what the credential allows, never widen it, so the same credential can sit in several stacks with different rules.

**Kind:** an object, used in requests and responses. In a request it is called `CredentialStackEntryInput`.

## In a request

| Field | Type | Required | Description |
|---|---|---|---|
| `credentialId` | `uuid` |  | A credential in the same tenant as the stack. |
| `allowedModels` | `string[] \| null` |  | Only these of the credential's models; null for all of them. |
| `allowedEndpointKinds` | [`CredentialEndpointKind`](https://docs.maitento.com/reference/types/credential-endpoint-kind.md)`[] \| null` |  | Only when the credential's endpoint is one of these kinds; null for any kind. |
| `enabled` | `boolean` |  | A disabled entry stays in place but is skipped. |

```json
{
  "credentialId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "allowedModels": [
    "..."
  ],
  "allowedEndpointKinds": [
    "Public"
  ],
  "enabled": false
}
```

## In a response

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

| Field | Type | Description |
|---|---|---|
| `credentialId` | `uuid` | A credential in the same tenant as the stack. |
| `allowedModels` | `string[] \| null` | Only these of the credential's models; null for all of them. |
| `allowedEndpointKinds` | [`CredentialEndpointKind`](https://docs.maitento.com/reference/types/credential-endpoint-kind.md)`[] \| null` | Only when the credential's endpoint is one of these kinds; null for any kind. |
| `enabled` | `boolean` | A disabled entry stays in place but is skipped. |

```json
{
  "credentialId": "3f2b8c1e-5d4a-4e6b-9c7d-2a1b0c9d8e7f",
  "allowedModels": [
    "..."
  ],
  "allowedEndpointKinds": [
    "Public"
  ],
  "enabled": false
}
```

## Where it's used

- Inside [`CredentialStack`](https://docs.maitento.com/reference/types/credential-stack.md)
- Inside [`CredentialStackRequest`](https://docs.maitento.com/reference/types/credential-stack-request.md)
