Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions src/pages/management/configuration-api/v3.7/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ All configurations set by this API will have action in system after max 2 minute
| **Tags** | [`create_tag`](#create-tag) [`delete_tag`](#delete-tag) [`list_tags`](#list-tags) [`update_tag`](#update-tag) |
| **Webhooks** | [`register_webhook`](#register-webhook) [`list_webhooks`](#list-webhooks) [`unregister_webhook`](#unregister-webhook) [`list_webhook_names`](#list-webhook-names) [`enable_license_webhook`](#enable-license-webhooks) [`disable_license_webhook`](#disable-license-webhooks) [`get_license_webhooks_state`](#get-license-webhooks-state) |
| **Canned responses** | [`create_canned_response`](#create-canned-response) [`list_canned_responses`](#list-canned-responses) [`update_canned_response`](#update-canned-response) [`delete_canned_response`](#delete-canned-response) |
| **Translations** | [`list_translations`](#list-translations) [`update_translations`](#update-translations) |
| **Other** | [`list_channels`](#list-channels) [`check_product_limits_for_plan`](#check-product-limits-for-plan) [`reactivate_email`](#reactivate-email) [`update_company_details`](#update-company-details) |

## Batch requests
Expand Down Expand Up @@ -163,6 +164,12 @@ curl -X POST \
| [Update Bot](#update-bot) | `https://api.livechatinc.com/v3.7/configuration/action/batch_update_bots` |
| [Delete Bot](#delete-bot) | `https://api.livechatinc.com/v3.7/configuration/action/batch_delete_bots` |

#### Batch support for Translations

| Method | Batch method URL |
| ------------------------------------------- | --------------------------------------------------------------------------------- |
| [Update Translations](#update-translations) | `https://api.livechatinc.com/v3.7/configuration/action/batch_update_translations` |

# Agents

An agent is a type of user who communicates with customers. You can look up the sample agent data structure in the [response of Get Agent](#get-agent).
Expand Down Expand Up @@ -4507,6 +4514,136 @@ curl -X POST \

</Section>

# Translations

<Section>

### Update Translations

Updates existing translations.

#### Specifics

| | |
| -------------------------------- | ------------------------------------------------------------------------------ |
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/update_translations` |
| Required scopes | `languages_write` |
| [Batch support](#batch-requests) | Yes |

#### Request

| Parameter | Required | Data type | Notes |
| ---------------------------- | -------- | ------------ | ------------------------------------------------ |
| `group_id` | Yes | `number` | ID of the group |
| `language` | Yes | `string` | Language identifier |
| `phrases`<sup>**1**</sup> | Yes | `object` | List of phrases to update as key-value pairs |

**1)** Possible values for the `phrases` object keys:

| Possible value | Notes |
| ----------------------------------- | --------------------------------|
| `Welcome_title` | Welcome message |
| `Agents_not_available_continuous` | Contact card message |
| `User_in_queue` | Queued customer info |
| `Client` | Default customer name |
| `Embedded_textarea_placeholder` | Message placeholder |
| `Offline_message_sent` | Ticket confirmation message |

The examples given above are illustrative only and do not represent the complete set of supported keys.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The examples given above are illustrative only and do not represent the complete set of supported keys.

I'd remove this — if we don't want users to access the rest, this is fine for the docs to just list what we give access to without overexplaining


#### Response

Empty response object `{}`.

<Code>

<CodeSample path={'REQUEST'}>

```shell
curl -X POST \
https://api.livechatinc.com/v3.7/configuration/action/update_translations \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"group_id": 0,
"language": "en",
"phrases": {
"Welcome_title": "Welcome to chat!"
}
}'
```

</CodeSample>

<CodeResponse>

```json
{}
```

</CodeResponse>

</Code>

### List Translations

Returns a list of translations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it return only those that were edited by the user?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question remains :D Does it return only those translations that were edited by the user?


#### Specifics

| | |
| -------------------------------- | ----------------------------------------------------------------------------- |
| Method URL | `https://api.livechatinc.com/v3.7/configuration/action/list_translations` |
| Required scopes | `languages_read` |
| [Batch support](#batch-requests) | No |

#### Request

| Parameter | Required | Data type | Notes |
| ------------ | -------- | ------------ | ----------------------------- |
| `group_id` | Yes | `number` | ID of the group |
| `language` | Yes | `string` | Language identifier |

#### Response

| Parameter | Data type | Notes |
| --------------- | ------------ | ------------------------------------- |
| `phrases` | `object` | List of phrases as key-value pairs |

<Code>

<CodeSample path={'REQUEST'}>

```shell
curl -X POST \
https://api.livechatinc.com/v3.7/configuration/action/list_translations \
-H 'Authorization: Bearer <your_access_token>' \
-H 'Content-Type: application/json' \
-d '{
"group_id": 0,
"language": "en"
}'
```

</CodeSample>

<CodeResponse>

```json
{
"phrases": {
"Welcome_title": "Welcome to chat",
"Offline_form": "Thank you for contacting us"
}
}
```

</CodeResponse>

</Code>

</Section>

# Other

## Methods
Expand Down