# Article Language URLs

> Associate language-specific source links with articles so the chat widget can show the right URL for each language.

Language URLs let you associate language-specific source links with articles. When the AI references an article during a conversation, the chat widget displays the URL matching the conversation's detected language (`most_frequent_language`). This is useful for multilingual deployments where the same content has different URLs per locale (e.g., `example.com/en/returns` vs `example.com/es/devoluciones`).

## Get Language URL

**Scope: read_all**

`GET https://app.quickchat.ai/v1/api/knowledge_base/articles/{article_id}/lang_urls/{language}`

**Shell**

```shell
curl https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en \
  -H 'Authorization: Bearer <API_TOKEN>'
```

**Python**

```python
import requests

response = requests.get(
    url="https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en",
    headers={"Authorization": "Bearer <API_TOKEN>"},
)
data = response.json()
```

**Response** `200 OK`

```json
{
  "url": "https://example.com/en/return-policy"
}
```

## Create Language URL

**Scope: write_all**

`POST https://app.quickchat.ai/v1/api/knowledge_base/articles/{article_id}/lang_urls/{language}`

**Request Body**

| Parameter | Description |
|-----------|-------------|
| `url` <br/> string, required | URL for the language-specific version |

**Shell**

```shell
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en \
  -H 'Authorization: Bearer <API_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://example.com/en/return-policy"}'
```

**Python**

```python
import requests

response = requests.post(
    url="https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en",
    headers={"Authorization": "Bearer <API_TOKEN>"},
    json={"url": "https://example.com/en/return-policy"},
)
data = response.json()
```

**Response** `200 OK`

```json
{
  "url": "https://example.com/en/return-policy"
}
```

## Update Language URL

**Scope: write_all**

`PATCH https://app.quickchat.ai/v1/api/knowledge_base/articles/{article_id}/lang_urls/{language}`

**Request Body**

| Parameter | Description |
|-----------|-------------|
| `url` <br/> string, required | Updated URL |

**Response** `200 OK` — Returns the updated URL object.

## Delete Language URL

**Scope: write_all**

`DELETE https://app.quickchat.ai/v1/api/knowledge_base/articles/{article_id}/lang_urls/{language}`

**Shell**

```shell
curl -X DELETE https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en \
  -H 'Authorization: Bearer <API_TOKEN>'
```

**Python**

```python
import requests

response = requests.delete(
    url="https://app.quickchat.ai/v1/api/knowledge_base/articles/1234/lang_urls/en",
    headers={"Authorization": "Bearer <API_TOKEN>"},
)
```

**Response** `200 OK`

---
