> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Other

> Reference of other methods for the Customer Chat RTM API v3.7.

## Get form

Returns an empty ticket form of a prechat or postchat survey.

**Specifics**

|                        |                                                      |
| ---------------------- | ---------------------------------------------------- |
| **Action**             | `get_form`                                           |
| **Web API equivalent** | [`get_form`](/api/customer-chat/v3.7/other/get-form) |
| **Push message**       | —                                                    |

**Request**

| Parameter  | Required | Type     | Notes                                                            |
| ---------- | -------- | -------- | ---------------------------------------------------------------- |
| `group_id` | Yes      | `number` | The ID of the group to get the form from.                        |
| `type`     | Yes      | `string` | The form type. Possible values: `prechat`, `postchat`, `ticket`. |

**Response**

| Field     | Type     | Notes                                                                                                     |
| --------- | -------- | --------------------------------------------------------------------------------------------------------- |
| `enabled` | `bool`   | If set to `false`: the `form` object is not returned; prechat/postchat survey is disabled in the Text UI. |
| `form`    | `object` | The [form](/api/customer-chat/v3.7/rtm/data-structures#forms) data structure.                             |

```json title="Request" theme={null}
{
  "action": "get_form",
  "payload": {
    "group_id": 0,
    "type": "prechat"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "get_form",
  "type": "response",
  "success": true,
  "payload": {
    "form": {},
    "enabled": true
  }
}
```

***

## Get URL info

Returns the info on a given URL.

**Specifics**

|                        |                                                              |
| ---------------------- | ------------------------------------------------------------ |
| **Action**             | `get_url_info`                                               |
| **Web API equivalent** | [`get_url_info`](/api/customer-chat/v3.7/other/get-url-info) |
| **Push message**       | —                                                            |

**Request**

| Parameter | Required | Type     | Notes                |
| --------- | -------- | -------- | -------------------- |
| `url`     | Yes      | `string` | A valid website URL. |

**Response**

| Field                | Type     | Notes                                                 |
| -------------------- | -------- | ----------------------------------------------------- |
| `image_url`          | `string` | The URL of the minified image hosted on the Text CDN. |
| `image_original_url` | `string` | The URL of the original image.                        |

```json title="Request" theme={null}
{
  "action": "get_url_info",
  "payload": {
    "url": "https://www.text.com"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "get_url_info",
  "type": "response",
  "success": true,
  "payload": {
    "title": "Text | AI Customer Service Engine that Drives Revenue",
    "description": "Text is an AI-powered customer service platform that helps businesses deliver faster, smarter support and drive revenue through every customer conversation.",
    "image_url": "https://example.com/image.png",
    "image_original_url": "https://example-original-url.com/image.png",
    "image_width": 200,
    "image_height": 200,
    "url": "https://www.text.com"
  }
}
```

***

## Mark events as seen

**Specifics**

|                        |                                                                            |
| ---------------------- | -------------------------------------------------------------------------- |
| **Action**             | `mark_events_as_seen`                                                      |
| **Web API equivalent** | [`mark_events_as_seen`](/api/customer-chat/v3.7/other/mark-events-as-seen) |
| **Push message**       | `events_marked_as_seen`                                                    |

**Request**

| Parameter    | Required | Type     | Notes                          |
| ------------ | -------- | -------- | ------------------------------ |
| `chat_id`    | Yes      | `string` |                                |
| `seen_up_to` | Yes      | `string` | The RFC 3339 date-time format. |

No response payload.

```json title="Request" theme={null}
{
  "action": "mark_events_as_seen",
  "payload": {
    "chat_id": "PJ0MRSHTDG",
    "seen_up_to": "2017-10-12T15:19:21.010200Z"
  }
}
```

***

## Accept greeting

Marks an incoming greeting as seen.

**How it's used in Text:** The Chat Widget uses this method to inform that a customer has seen a greeting. Based on that, Reports displays the greetings that were actually seen by customers, not all the sent greetings. If a customer started a chat from a greeting but this method wasn't called, the greeting is still counted as seen in Reports.

**Specifics**

|                        |                                                                    |
| ---------------------- | ------------------------------------------------------------------ |
| **Action**             | `accept_greeting`                                                  |
| **Web API equivalent** | [`accept_greeting`](/api/customer-chat/v3.7/other/accept-greeting) |
| **Push message**       | `greeting_accepted`                                                |

**Request**

| Parameter     | Required | Type     | Notes                                                                               |
| ------------- | -------- | -------- | ----------------------------------------------------------------------------------- |
| `greeting_id` | Yes      | `number` | The ID of the greeting configured within the license to accept.                     |
| `unique_id`   | Yes      | `string` | The ID of the greeting to accept. You can get it from the `incoming_greeting` push. |

No response payload.

```json title="Request" theme={null}
{
  "action": "accept_greeting",
  "payload": {
    "greeting_id": 7,
    "unique_id": "Q10X0W041P"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "accept_greeting",
  "type": "response",
  "success": true,
  "payload": {}
}
```

***

## Cancel greeting

Cancels a greeting (an invitation to the chat). For example, customers can cancel greetings by minimizing the chat widget.

**Specifics**

|                        |                                                                    |
| ---------------------- | ------------------------------------------------------------------ |
| **Action**             | `cancel_greeting`                                                  |
| **Web API equivalent** | [`cancel_greeting`](/api/customer-chat/v3.7/other/cancel-greeting) |
| **Push message**       | `greeting_canceled`                                                |

**Request**

| Parameter   | Required | Type     | Notes                                                                               |
| ----------- | -------- | -------- | ----------------------------------------------------------------------------------- |
| `unique_id` | Yes      | `string` | The ID of the greeting to cancel. You can get it from the `incoming_greeting` push. |

No response payload.

```json title="Request" theme={null}
{
  "action": "cancel_greeting",
  "payload": {
    "unique_id": "Q10X0W041P"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "cancel_greeting",
  "type": "response",
  "success": true,
  "payload": {}
}
```

***

## Send greeting button clicked

**Specifics**

|                        |                                                                                              |
| ---------------------- | -------------------------------------------------------------------------------------------- |
| **Action**             | `send_greeting_button_clicked`                                                               |
| **Web API equivalent** | [`send_greeting_button_clicked`](/api/customer-chat/v3.7/other/send-greeting-button-clicked) |
| **Push message**       | —                                                                                            |

**Request**

| Parameter            | Required | Type     | Notes                                                                 |
| -------------------- | -------- | -------- | --------------------------------------------------------------------- |
| `greeting_unique_id` | Yes      | `string` | Unique greeting ID. You can get it from the `incoming_greeting` push. |
| `button_id`          | Yes      | `string` | The greeting button ID.                                               |

No response payload.

```json title="Request" theme={null}
{
  "action": "send_greeting_button_clicked",
  "payload": {
    "greeting_unique_id": "Q10X0W041P",
    "button_id": "20ff0b3f-fbed-49f4-b13f-788c9ec66f03"
  }
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "send_greeting_button_clicked",
  "type": "response",
  "success": true,
  "payload": {}
}
```

***

## Request welcome message

Requests a welcome message from the system. The response contains the predicted agent the customer will chat with once the chat starts.

**Specifics**

|                        |                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------- |
| **Action**             | `request_welcome_message`                                                          |
| **Web API equivalent** | [`request_welcome_message`](/api/customer-chat/v3.7/other/request-welcome-message) |
| **Push message**       | `incoming_welcome_message`                                                         |

**Request**

| Parameter  | Required | Type     | Notes                   |
| ---------- | -------- | -------- | ----------------------- |
| `id`       | No       | `string` | The welcome message ID. |
| `group_id` | No       | `number` | The ID of the group.    |

**Response**

| Field                       | Type     | Notes                                      |
| --------------------------- | -------- | ------------------------------------------ |
| `id`                        | `string` | The welcome message ID.                    |
| `predicted_agent`           | `object` | The predicted agent info.                  |
| `predicted_agent.id`        | `string` |                                            |
| `predicted_agent.name`      | `string` |                                            |
| `predicted_agent.avatar`    | `string` |                                            |
| `predicted_agent.is_bot`    | `bool`   |                                            |
| `predicted_agent.bot_type`  | `string` | Returned only for bots.                    |
| `predicted_agent.job_title` | `string` |                                            |
| `predicted_agent.type`      | `string` |                                            |
| `queue`                     | `bool`   | If set to `true`: the chat will be queued. |

```json title="Request" theme={null}
{
  "action": "request_welcome_message",
  "payload": {}
}
```

```json title="Response" theme={null}
{
  "request_id": "<request_id>",
  "action": "request_welcome_message",
  "type": "response",
  "success": true,
  "payload": {
    "id": "540eb790-17c1-47f9-9e2c-dca5a0960ab5",
    "predicted_agent": {
      "id": "b5657aff34dd32e198160d54666df9d8",
      "name": "Agent Smith",
      "avatar": "https://example.avatar/example.com",
      "is_bot": false,
      "job_title": "support hero",
      "type": "agent"
    },
    "queue": false
  }
}
```
