# LiveChat

> Work with your LiveChat inbox: list, read and search chats, send messages and private notes, start, close and transfer chats, tag threads, and manage agents' availability, groups, tags and canned responses.

App · 29 actions. Web page: https://docs.lodol.com/docs/integrations/livechat

## Actions

### Close chat

Close a chat's open thread. Nobody can write to it afterwards until it is reopened.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Close even if you are not in the chat (`ignore_requester_presence`, true/false): Turn on to close a chat that your agent has not joined, such as one that was transferred away. Default: `false`.

**Outputs**

- `chat_id` (text): The chat's id
- `deactivated` (true/false): Always true once closed

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "deactivated": true
}
```

### Create canned response

Save a reply agents can insert while chatting.

**Inputs**

- Text (`text`, text, required): The reply agents insert.
- Group (`group_id`, text, required): The group whose agents can use it.
- Shortcuts (`tags`, list): Words agents type after # to find this response. Type a word and press Enter.
- Private (`is_private`, true/false): Turn on so only you see this canned response.

**Outputs**

- `canned_response_id` (number): The new canned response's id

**Example output**

```json
{
  "canned_response_id": 12345
}
```

### Create group

Create a group from some agents, all with the same routing priority. Changes take up to two minutes to apply.

**Inputs**

- Name (`name`, text, required): The group's name, up to 180 characters.
- Agents (`agent_ids`, list, required): The agents in the group. Pick them from the list.
- Routing priority (`priority`, text): How chats are given to these agents. Defaults to normal. One of: `normal` (Normal (default)), `first` (First: gets chats before the others), `last` (Last: gets chats only when nobody else is free), `supervisor` (Supervisor: never gets chats assigned).

**Outputs**

- `group_id` (number): The new group's id
- `name` (text): The group's name

**Example output**

```json
{
  "group_id": 19,
  "name": "Sales"
}
```

### Create tag

Create a tag agents can put on threads, optionally limited to some groups. Matching an existing name ignores letter case.

**Inputs**

- Name (`name`, text, required): The tag's name.
- Groups (`group_ids`, list): The groups that can use the tag. Leave empty for none yet.

**Outputs**

- `created` (true/false): Always true once created
- `group_ids` (list): The groups it belongs to
- `name` (text): The tag's name

**Example output**

```json
{
  "created": true,
  "group_ids": [
    0
  ],
  "name": "docs_feedback"
}
```

### Delete canned response

Delete a canned response.

**Inputs**

- Canned response ID (`canned_response_id`, text, required): The canned response's id, from 'List canned responses'.

**Outputs**

- `canned_response_id` (number): The canned response deleted
- `deleted` (true/false): Always true once deleted

**Example output**

```json
{
  "canned_response_id": 12345,
  "deleted": true
}
```

### Delete group

Delete a group. The agents stay in the account.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `group_id` (number): The group deleted

**Example output**

```json
{
  "deleted": true,
  "group_id": 19
}
```

### Delete tag

Delete a tag. The name is case sensitive.

**Inputs**

- Tag (`name`, text, required): The tag. Pick one, or give its name from an earlier step. It is case sensitive.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `name` (text): The tag deleted

**Example output**

```json
{
  "deleted": true,
  "name": "docs_feedback"
}
```

### Get agent

Get one agent with their role, groups, job title and chat limit.

**Inputs**

- Agent (`agent_id`, text, required): The agent. Pick one, or give their email address.

**Outputs**

- `agent` (object): The agent

**Example output**

```json
{
  "agent": {
    "account_id": "d24fa41e-bc16-41b8-a15b-9ca45ff7e0cf",
    "avatar": null,
    "avatar_path": null,
    "groups": [
      {
        "id": 0,
        "priority": "normal"
      }
    ],
    "id": "smith@example.com",
    "job_title": "Support Hero",
    "last_logout": null,
    "login_status": "accepting chats",
    "max_chats_count": 6,
    "name": "Agent Smith",
    "role": "owner",
    "suspended": false
  }
}
```

### Get chat

Get one chat with its users and one thread (the latest unless you name one), including the thread's events.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Thread ID (`thread_id`, text): The thread to read. Defaults to the latest.

**Outputs**

- `chat` (object): The chat

**Example output**

```json
{
  "chat": {
    "access": {
      "group_ids": [
        0
      ]
    },
    "id": "PJ0MRSHTDG",
    "is_followed": false,
    "properties": null,
    "thread": {
      "access": {
        "group_ids": [
          0
        ]
      },
      "active": true,
      "created_at": "2026-10-15T09:00:00.000000Z",
      "events": [
        {
          "author_id": "smith@example.com",
          "created_at": "2026-10-15T09:00:00.000000Z",
          "id": "Q20N9CKRX2_1",
          "text": "Hello",
          "type": "message",
          "visibility": "agents"
        }
      ],
      "id": "K600PKZON8",
      "next_thread_id": null,
      "previous_thread_id": null,
      "properties": null,
      "summary": null,
      "user_ids": [
        "smith@example.com"
      ]
    },
    "users": [
      {
        "avatar": null,
        "email": "smith@example.com",
        "id": "smith@example.com",
        "name": "Agent Smith",
        "present": true,
        "type": "agent",
        "visibility": "all"
      }
    ]
  }
}
```

### Get group

Get one group with its agents' priorities and routing status.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.

**Outputs**

- `group` (object): The group

**Example output**

```json
{
  "group": {
    "agent_priorities": {
      "smith@example.com": "normal"
    },
    "id": 19,
    "language_code": "en",
    "name": "Sales",
    "routing_status": "offline"
  }
}
```

### Get thread transcript

Get a thread as plain text: who said what and when, including files and forms.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Thread ID (`thread_id`, text, required): The thread's id, from 'Get chat', 'List threads' or 'Start chat'.

**Outputs**

- `chat_id` (text): The chat's id
- `thread_id` (text): The thread's id
- `transcript` (text): The conversation as plain text

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "thread_id": "K600PKZON8",
  "transcript": "Conversation transcript:\n----------\nAgent Smith (Thu, 10/15/2026, 09:00:00 am UTC)\nHello"
}
```

### List agent availability

See which agents (and bots) are accepting chats, optionally within some groups.

**Inputs**

- Groups (`group_ids`, list): Only agents in these groups. Leave empty for everyone.

**Outputs**

- `count` (number): How many came back on this page
- `statuses` (list): Each agent's status

**Example output**

```json
{
  "count": 1,
  "statuses": [
    {
      "agent_id": "smith@example.com",
      "status": "accepting_chats"
    }
  ]
}
```

### List agents

List the account's agents with their role, groups, job title, chat limit and whether they are suspended.

**Inputs**

- Groups (`group_ids`, list): Only agents in these groups. Leave empty for everyone.
- Agents (`state`, text): Active agents, suspended ones, or both. One of: `all` (Active and suspended (default)), `active` (Active only), `suspended` (Suspended only).

**Outputs**

- `agents` (list): The agents
- `count` (number): How many came back on this page

**Example output**

```json
{
  "agents": [
    {
      "account_id": "d24fa41e-bc16-41b8-a15b-9ca45ff7e0cf",
      "avatar": null,
      "avatar_path": null,
      "groups": [
        {
          "id": 0,
          "priority": "normal"
        }
      ],
      "id": "smith@example.com",
      "job_title": "Support Hero",
      "last_logout": null,
      "login_status": "accepting chats",
      "max_chats_count": 6,
      "name": "Agent Smith",
      "role": "owner",
      "suspended": false
    }
  ],
  "count": 1
}
```

### List canned responses

List canned responses (saved replies) in your groups. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Groups (`group_ids`, list): Only responses in these groups. Leave empty for yours.
- Include private ones (`include_private`, true/false): Turn on to include your private canned responses. Default: `false`.
- Page size (`limit`, number): How many to return, 1 to 1000. LiveChat's default is 100. From 1 to 1000.
- Page ID (`page_id`, text): The 'next_page_id' from an earlier page, to get the page after it. Leave the other fields empty: LiveChat repeats the first search.

**Outputs**

- `canned_responses` (list): The canned responses
- `count` (number): How many came back on this page
- `found_canned_responses` (number): How many match in all
- `next_page_id` (text): Pass as 'Page ID' for the next page; empty on the last one

**Example output**

```json
{
  "canned_responses": [
    {
      "author_id": "smith@example.com",
      "created_at": "2026-10-15T09:00:00.000000Z",
      "group_id": 0,
      "id": 12345,
      "is_private": false,
      "tags": [
        "greeting"
      ],
      "text": "Thank you for contacting us! How can I help you today?",
      "updated_at": "2026-10-15T09:00:00.000000Z"
    }
  ],
  "count": 1,
  "found_canned_responses": 1,
  "next_page_id": ""
}
```

### List chats

List chats with their latest message, filtered by whether they are active and by group. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Chats (`status`, text): Only active chats, only inactive ones, or both. One of: `all` (Active and inactive (default)), `active` (Active only), `inactive` (Inactive only).
- Groups (`group_ids`, list): Only chats in these groups. Leave empty for all groups.
- Order (`sort_order`, text): Which to list first. Defaults to newest first. One of: `desc` (Newest first (default)), `asc` (Oldest first).
- Page size (`limit`, number): How many to return, 1 to 100. From 1 to 100.
- Page ID (`page_id`, text): The 'next_page_id' from an earlier page, to get the page after it. Leave the other fields empty: LiveChat repeats the first search.

**Outputs**

- `chats` (list): The chats
- `count` (number): How many came back on this page
- `found_chats` (number): An estimate of how many chats match in all
- `next_page_id` (text): Pass as 'Page ID' for the next page; empty on the last one
- `previous_page_id` (text): The page id of the page before this one; empty on the first

**Example output**

```json
{
  "chats": [
    {
      "access": {
        "group_ids": [
          0
        ]
      },
      "id": "PJ0MRSHTDG",
      "is_followed": false,
      "last_event_per_type": {
        "message": {
          "event": {
            "author_id": "smith@example.com",
            "created_at": "2026-10-15T09:00:00.000000Z",
            "id": "Q20N9CKRX2_1",
            "text": "Hello",
            "type": "message",
            "visibility": "agents"
          },
          "thread_created_at": "2026-10-15T09:00:00.000000Z",
          "thread_id": "K600PKZON8"
        }
      },
      "last_thread_summary": {
        "access": {
          "group_ids": [
            0
          ]
        },
        "active": true,
        "created_at": "2026-10-15T09:00:00.000000Z",
        "id": "K600PKZON8",
        "user_ids": [
          "smith@example.com"
        ]
      },
      "properties": null,
      "users": [
        {
          "avatar": null,
          "email": "smith@example.com",
          "id": "smith@example.com",
          "name": "Agent Smith",
          "present": true,
          "type": "agent",
          "visibility": "all"
        }
      ]
    }
  ],
  "count": 1,
  "found_chats": 1,
  "next_page_id": "",
  "previous_page_id": ""
}
```

### List groups

List the account's groups (teams that chats are routed to) with their agents and whether they are online.

**Inputs**: None.

**Outputs**

- `count` (number): How many came back on this page
- `groups` (list): The groups

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "agent_priorities": {
        "smith@example.com": "normal"
      },
      "id": 19,
      "language_code": "en",
      "name": "Sales",
      "routing_status": "offline"
    }
  ]
}
```

### List tags

List the account's tags with the groups each belongs to.

**Inputs**

- Groups (`group_ids`, list): Only tags in these groups. Leave empty for all.

**Outputs**

- `count` (number): How many came back on this page
- `tags` (list): The tags

**Example output**

```json
{
  "count": 1,
  "tags": [
    {
      "author_id": "smith@example.com",
      "created_at": "2026-10-15T09:00:00.000000Z",
      "group_ids": [
        0
      ],
      "name": "docs_feedback"
    }
  ]
}
```

### List threads

List a chat's threads (its separate conversations) with their events, optionally within a time range.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Started after (`from_time`, date and time): Only threads from this time on.
- Started before (`to_time`, date and time): Only threads up to this time.
- Order (`sort_order`, text): Which to list first. Defaults to newest first. One of: `desc` (Newest first (default)), `asc` (Oldest first).
- Page size (`limit`, number): How many to return, 1 to 100. From 1 to 100.
- Page ID (`page_id`, text): The 'next_page_id' from an earlier page, to get the page after it. Leave the other fields empty: LiveChat repeats the first search.

**Outputs**

- `count` (number): How many came back on this page
- `found_threads` (number): An estimate of how many threads match in all
- `next_page_id` (text): Pass as 'Page ID' for the next page; empty on the last one
- `previous_page_id` (text): The page id of the page before this one; empty on the first
- `threads` (list): The threads

**Example output**

```json
{
  "count": 1,
  "found_threads": 1,
  "next_page_id": "",
  "previous_page_id": "",
  "threads": [
    {
      "access": {
        "group_ids": [
          0
        ]
      },
      "active": true,
      "created_at": "2026-10-15T09:00:00.000000Z",
      "events": [
        {
          "author_id": "smith@example.com",
          "created_at": "2026-10-15T09:00:00.000000Z",
          "id": "Q20N9CKRX2_1",
          "text": "Hello",
          "type": "message",
          "visibility": "agents"
        }
      ],
      "id": "K600PKZON8",
      "next_thread_id": null,
      "previous_thread_id": null,
      "properties": null,
      "summary": null,
      "user_ids": [
        "smith@example.com"
      ]
    }
  ]
}
```

### Remove tag from thread

Take a tag off a thread.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Thread ID (`thread_id`, text, required): The thread's id, from 'Get chat', 'List threads' or 'Start chat'.
- Tag (`tag`, text, required): The tag. Pick one, or give its name from an earlier step.

**Outputs**

- `chat_id` (text): The chat's id
- `tag` (text): The tag removed
- `thread_id` (text): The thread's id

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "tag": "docs_feedback",
  "thread_id": "K600PKZON8"
}
```

### Reopen chat

Reopen a deactivated chat in a new thread, optionally with a message from you.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- First message (`message`, text): A message to open the new thread with, written by you.
- Who sees it (`visibility`, text): Everyone in the chat, or agents only as a private note. One of: `all` (Everyone in the chat, customer included (default)), `agents` (Agents only (a private note)).

**Outputs**

- `chat_id` (text): The chat's id
- `event_ids` (list): Ids of the messages written when it started
- `thread_id` (text): The thread's id

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "event_ids": [],
  "thread_id": "Z8AGR5OUW"
}
```

### Search chat archive

Search past conversations by text, time, group, agent, tag or customer email. Each result is one thread of a chat.

**Inputs**

- Search text (`query`, text): Only threads whose messages contain this text.
- From (`from_time`, date and time): Only threads from this time on.
- Until (`to_time`, date and time): Only threads up to this time.
- Groups (`group_ids`, list): Only threads in these groups.
- Agents (`agent_ids`, list): Only threads these agents took part in.
- Tags (`tags`, list): Only threads with one of these tags.
- Customer email (`customer_email`, text): Only chats with the customer who has this email address.
- Order (`sort_order`, text): Which to list first. Defaults to newest first. One of: `desc` (Newest first (default)), `asc` (Oldest first).
- Page size (`limit`, number): How many to return, 1 to 100. From 1 to 100.
- Page ID (`page_id`, text): The 'next_page_id' from an earlier page, to get the page after it. Leave the other fields empty: LiveChat repeats the first search.

**Outputs**

- `chats` (list): The matching chats, one thread each
- `count` (number): How many came back on this page
- `found_chats` (number): An estimate of how many chats match in all
- `next_page_id` (text): Pass as 'Page ID' for the next page; empty on the last one
- `previous_page_id` (text): The page id of the page before this one; empty on the first

**Example output**

```json
{
  "chats": [
    {
      "access": {
        "group_ids": [
          0
        ]
      },
      "id": "PJ0MRSHTDG",
      "is_followed": false,
      "properties": null,
      "thread": {
        "access": {
          "group_ids": [
            0
          ]
        },
        "active": true,
        "created_at": "2026-10-15T09:00:00.000000Z",
        "events": [
          {
            "author_id": "smith@example.com",
            "created_at": "2026-10-15T09:00:00.000000Z",
            "id": "Q20N9CKRX2_1",
            "text": "Hello",
            "type": "message",
            "visibility": "agents"
          }
        ],
        "id": "K600PKZON8",
        "next_thread_id": null,
        "previous_thread_id": null,
        "properties": null,
        "summary": null,
        "user_ids": [
          "smith@example.com"
        ]
      },
      "users": [
        {
          "avatar": null,
          "email": "smith@example.com",
          "id": "smith@example.com",
          "name": "Agent Smith",
          "present": true,
          "type": "agent",
          "visibility": "all"
        }
      ]
    }
  ],
  "count": 1,
  "found_chats": 1,
  "next_page_id": "",
  "previous_page_id": ""
}
```

### Send message

Write a message in an active chat as the token's agent, to everyone in it or as a private note for agents. The agent must be in the chat.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Message (`text`, text, required): What to write.
- Who sees it (`visibility`, text): Everyone in the chat, or agents only as a private note. One of: `all` (Everyone in the chat, customer included (default)), `agents` (Agents only (a private note)).

**Outputs**

- `chat_id` (text): The chat's id
- `event_id` (text): The new message's event id

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "event_id": "Q20N9CKRX2_2"
}
```

### Set my availability

Set whether the agent the token belongs to is accepting chats.

**Inputs**

- Status (`status`, text, required): Accepting chats, or not. One of: `accepting_chats` (Accepting chats), `not_accepting_chats` (Not accepting chats).

**Outputs**

- `status` (text): The status now in effect

**Example output**

```json
{
  "status": "not_accepting_chats"
}
```

### Start chat

Start a chat with you in it, optionally with a first message. Customers are not added; use a private note to leave a record only agents see.

**Inputs**

- Group (`group_id`, text): The group the chat belongs to. Defaults to your own groups.
- First message (`message`, text): The chat's first message, written by you.
- Who sees it (`visibility`, text): Everyone in the chat, or agents only as a private note. One of: `all` (Everyone in the chat, customer included (default)), `agents` (Agents only (a private note)).
- Continuous chat (`continuous`, true/false): Turn on to start the chat as a continuous one, which needs no group online. Default: `false`.

**Outputs**

- `chat_id` (text): The chat's id
- `event_ids` (list): Ids of the messages written when it started
- `thread_id` (text): The thread's id

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "event_ids": [
    "Q20N9CKRX2_1"
  ],
  "thread_id": "K600PKZON8"
}
```

### Tag thread

Add a tag to a thread. The tag must exist and share a group with the chat.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Thread ID (`thread_id`, text, required): The thread's id, from 'Get chat', 'List threads' or 'Start chat'.
- Tag (`tag`, text, required): The tag. Pick one, or give its name from an earlier step.

**Outputs**

- `chat_id` (text): The chat's id
- `tag` (text): The tag added
- `thread_id` (text): The thread's id

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "tag": "docs_feedback",
  "thread_id": "K600PKZON8"
}
```

### Transfer chat

Hand an active chat to a group or to one agent. Give a group or an agent, not both.

**Inputs**

- Chat ID (`chat_id`, text, required): The chat's id, from 'List chats', 'Start chat' or an earlier step.
- Transfer to group (`group_id`, text): The group to hand the chat to. Give this or an agent, not both.
- Transfer to agent (`agent_id`, text): The agent to hand the chat to. Give this or a group, not both.
- Queue if nobody is free (`ignore_agents_availability`, true/false): Turn on to put the chat in the queue when no agent is available, instead of failing. Default: `false`.
- Transfer even if you are not in the chat (`ignore_requester_presence`, true/false): Turn on to transfer a chat that your agent has not joined. Default: `false`.

**Outputs**

- `chat_id` (text): The chat's id
- `target_id` (text): The group or agent it went to
- `target_type` (text): group or agent
- `transferred` (true/false): Always true once transferred

**Example output**

```json
{
  "chat_id": "PJ0MRSHTDG",
  "target_id": "19",
  "target_type": "group",
  "transferred": true
}
```

### Update canned response

Change a canned response. Only the fields given change.

**Inputs**

- Canned response ID (`canned_response_id`, text, required): The canned response's id, from 'List canned responses'.
- Text (`text`, text): The new reply text. Leave empty to keep it.
- Group (`group_id`, text): Move it to this group. Leave empty to keep it.
- Shortcuts (`tags`, list): Words agents type after # to find this response. Type a word and press Enter.
- Private (`is_private`, true/false): Turn on so only you see this canned response.

**Outputs**

- `canned_response_id` (number): The canned response's id
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "canned_response_id": 12345,
  "updated": true
}
```

### Update group

Rename a group or replace its agents. Only the fields given change; giving agents replaces the whole list.

**Inputs**

- Group (`group_id`, text, required): The group. Pick one, or give its id from an earlier step.
- New name (`name`, text): A new name for the group. Leave empty to keep it.
- Agents (`agent_ids`, list): Replaces the group's agents with these. Leave empty to keep them.
- Routing priority (`priority`, text): How chats are given to these agents. Defaults to normal. One of: `normal` (Normal (default)), `first` (First: gets chats before the others), `last` (Last: gets chats only when nobody else is free), `supervisor` (Supervisor: never gets chats assigned).

**Outputs**

- `group_id` (number): The group's id
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "group_id": 19,
  "updated": true
}
```

### Update tag

Replace the groups a tag belongs to.

**Inputs**

- Tag (`name`, text, required): The tag. Pick one, or give its name from an earlier step. It is case sensitive.
- Groups (`group_ids`, list, required): The groups that can use the tag from now on.

**Outputs**

- `group_ids` (list): The groups it belongs to now
- `name` (text): The tag's name
- `updated` (true/false): Always true once updated

**Example output**

```json
{
  "group_ids": [
    0
  ],
  "name": "docs_feedback",
  "updated": true
}
```
