# Experiences

## List experiences you can invoke

`experiences.list()  -> ExperienceListResponse`

**get** `/v3/experiences`

The experiences enabled for your account, with the actions you may
invoke on each and the fields each action accepts. This is the
authoritative list — an action missing here cannot be sent.

### Returns

- `class ExperienceListResponse: …`

  - `experiences: Optional[List[Experience]]`

    - `actions: Optional[List[ExperienceAction]]`

      - `fields: Optional[Dict[str, ExperienceActionFields]]`

        Fields you may send in `params`, keyed by the exact name to use.

        - `max: Optional[int]`

          Maximum length, for strings.

        - `required: Optional[bool]`

        - `type: Optional[Literal["string", "cents", "int", "url"]]`

          - `"string"`

          - `"cents"`

          - `"int"`

          - `"url"`

      - `name: Optional[str]`

      - `summary: Optional[str]`

    - `display_name: Optional[str]`

    - `experience: Optional[str]`

### Example

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
experiences = client.experiences.list()
print(experiences.experiences)
```

#### Response

```json
{
  "experiences": [
    {
      "actions": [
        {
          "fields": {
            "foo": {
              "max": 0,
              "required": true,
              "type": "string"
            }
          },
          "name": "attach_card",
          "summary": "Ask the customer to add a card to their wallet."
        }
      ],
      "display_name": "Agentcard",
      "experience": "agentcard"
    }
  ]
}
```

## Get one experience

`experiences.retrieve(strexperience)  -> ExperienceRetrieveResponse`

**get** `/v3/experiences/{experience}`

Get one experience

### Parameters

- `experience: str`

### Returns

- `class ExperienceRetrieveResponse: …`

  What an experience offers you. Deliberately a projection: where its
  templates live and how they are built is not yours to depend on, so it
  is not here.

  - `actions: Optional[List[Action]]`

    - `fields: Optional[Dict[str, ActionFields]]`

      Fields you may send in `params`, keyed by the exact name to use.

      - `max: Optional[int]`

        Maximum length, for strings.

      - `required: Optional[bool]`

      - `type: Optional[Literal["string", "cents", "int", "url"]]`

        - `"string"`

        - `"cents"`

        - `"int"`

        - `"url"`

    - `name: Optional[str]`

    - `summary: Optional[str]`

  - `display_name: Optional[str]`

  - `experience: Optional[str]`

### Example

```python
import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
experience = client.experiences.retrieve(
    "experience",
)
print(experience.actions)
```

#### Response

```json
{
  "actions": [
    {
      "fields": {
        "foo": {
          "max": 0,
          "required": true,
          "type": "string"
        }
      },
      "name": "attach_card",
      "summary": "Ask the customer to add a card to their wallet."
    }
  ],
  "display_name": "Agentcard",
  "experience": "agentcard"
}
```

## Domain Types

### Experience List Response

- `class ExperienceListResponse: …`

  - `experiences: Optional[List[Experience]]`

    - `actions: Optional[List[ExperienceAction]]`

      - `fields: Optional[Dict[str, ExperienceActionFields]]`

        Fields you may send in `params`, keyed by the exact name to use.

        - `max: Optional[int]`

          Maximum length, for strings.

        - `required: Optional[bool]`

        - `type: Optional[Literal["string", "cents", "int", "url"]]`

          - `"string"`

          - `"cents"`

          - `"int"`

          - `"url"`

      - `name: Optional[str]`

      - `summary: Optional[str]`

    - `display_name: Optional[str]`

    - `experience: Optional[str]`

### Experience Retrieve Response

- `class ExperienceRetrieveResponse: …`

  What an experience offers you. Deliberately a projection: where its
  templates live and how they are built is not yours to depend on, so it
  is not here.

  - `actions: Optional[List[Action]]`

    - `fields: Optional[Dict[str, ActionFields]]`

      Fields you may send in `params`, keyed by the exact name to use.

      - `max: Optional[int]`

        Maximum length, for strings.

      - `required: Optional[bool]`

      - `type: Optional[Literal["string", "cents", "int", "url"]]`

        - `"string"`

        - `"cents"`

        - `"int"`

        - `"url"`

    - `name: Optional[str]`

    - `summary: Optional[str]`

  - `display_name: Optional[str]`

  - `experience: Optional[str]`
