Skip to content
Get started

List experiences you can invoke

client.experiences.list(RequestOptionsoptions?): ExperienceListResponse { experiences }
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.

ReturnsExpand Collapse
ExperienceListResponse { experiences }
experiences?: Array<Experience>
actions?: Array<Action>
fields?: Record<string, Fields>

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

max?: number

Maximum length, for strings.

required?: boolean
type?: "string" | "cents" | "int" | "url"
One of the following:
"string"
"cents"
"int"
"url"
name?: string
summary?: string
display_name?: string
experience?: string

List experiences you can invoke

import LinqAPIV3 from '@linqapp/sdk';

const client = new LinqAPIV3({
  apiKey: process.env['LINQ_API_V3_API_KEY'], // This is the default and can be omitted
});

const experiences = await client.experiences.list();

console.log(experiences.experiences);
{
  "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"
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}
Returns Examples
{
  "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"
    }
  ]
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token",
    "doc_url": "https://docs.linqapp.com/error/codes/2xxx/2004/"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error",
    "doc_url": "https://docs.linqapp.com/error/codes/3xxx/3006/"
  },
  "success": false
}