# Experiences

## List experiences you can invoke

**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

- `experiences: optional array of object { actions, display_name, experience }`

  - `actions: optional array of object { fields, name, summary }`

    - `fields: optional map[object { max, required, type } ]`

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

      - `max: optional number`

        Maximum length, for strings.

      - `required: optional boolean`

      - `type: optional "string" or "cents" or "int"`

        - `"string"`

        - `"cents"`

        - `"int"`

    - `name: optional string`

    - `summary: optional string`

  - `display_name: optional string`

  - `experience: optional string`

### Example

```http
curl https://api.linqapp.com/api/partner/v3/experiences \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
```

#### 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

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

Get one experience

### Path Parameters

- `experience: string`

### Returns

- `actions: optional array of object { fields, name, summary }`

  - `fields: optional map[object { max, required, type } ]`

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

    - `max: optional number`

      Maximum length, for strings.

    - `required: optional boolean`

    - `type: optional "string" or "cents" or "int"`

      - `"string"`

      - `"cents"`

      - `"int"`

  - `name: optional string`

  - `summary: optional string`

- `display_name: optional string`

- `experience: optional string`

### Example

```http
curl https://api.linqapp.com/api/partner/v3/experiences/$EXPERIENCE \
    -H "Authorization: Bearer $LINQ_API_V3_API_KEY"
```

#### 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

- `ExperienceListResponse object { experiences }`

  - `experiences: optional array of object { actions, display_name, experience }`

    - `actions: optional array of object { fields, name, summary }`

      - `fields: optional map[object { max, required, type } ]`

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

        - `max: optional number`

          Maximum length, for strings.

        - `required: optional boolean`

        - `type: optional "string" or "cents" or "int"`

          - `"string"`

          - `"cents"`

          - `"int"`

      - `name: optional string`

      - `summary: optional string`

    - `display_name: optional string`

    - `experience: optional string`

### Experience Retrieve Response

- `ExperienceRetrieveResponse object { actions, display_name, experience }`

  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 array of object { fields, name, summary }`

    - `fields: optional map[object { max, required, type } ]`

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

      - `max: optional number`

        Maximum length, for strings.

      - `required: optional boolean`

      - `type: optional "string" or "cents" or "int"`

        - `"string"`

        - `"cents"`

        - `"int"`

    - `name: optional string`

    - `summary: optional string`

  - `display_name: optional string`

  - `experience: optional string`
