> For the complete documentation index, see [llms.txt](https://developers.quickley.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.quickley.com/chat-api/methods.md).

# Methods

Through JS API you can manage Quickley Live Chat windows behavior. Methods can be called by using global object `Quickley` that  available anywhere after the widget code.&#x20;

Global object `Quickley` accepts two arguments. The first is the method name. The second is the parameters of callable method.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('sendAutoMessage', 'Hello! Can i help you?');
```

## `show`

Displays Quickley Chat button if it was previously hidden by configuration param `hidden`.

```markup
<script>
	window.QCHAT_CFG = {
  	hidden: true
	}
</script>

<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

setTimeout(() => {
	Quickley('show');
}, 1000);
```

## `hide`

Hides Quickley Chat button if it visible.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('hide');
```

## `open`

Opens Quickley Chat Window. Calling of this method is similar to clicking Quickley Chat button.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('open');
```

## `close`

Closes the Quickley Сhat window. Calling this method is similar to clicking the Quickley Chat button while the Сhat window is open.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('close');
```

## `sendAutoMessage`

Sends message to a visitor. This method works only if a visitor doesn't have any active conversation.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('sendAutoMessage', 'Hello! Can i help you?');
```

## `updateClientData`

Specifies any information about visitors like email, phone or any kind of data. This info displays in the right panel in Quickley. This method is similar to the `client_data` parameter in the Quickley Chat configuration, but can be used at any time after Chat is initialized.

```markup
<!-- Quickley.Chat -->
...
<!-- /Quickley.Chat -->

Quickley('updateClientData', {
  name: "John Dorian"
	email: "jd@thescrubs.com",
  "Any kind of information's title": "Any kind of information's value"
});
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.quickley.com/chat-api/methods.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
