✏️ Update Custom Glossary
This API updates existing glossary entries for a user. Multiple items can be updated in a single request.
📋 Basic Information
- Method:
POST
- Path:
https://api.bluente.com/api/20250924/blu_translate/glossary/update
- Authentication: Required —
Authorization: Bearer $BLUENTE_API_KEY
📝 Request Parameters (Query)
Query String: none
Request Body
- Content-Type:
application/json
- Body is an array of glossary entries to update:
[
{
"id": 242,
"source_lang": "English",
"source_text": "hello",
"target_lang": "Chinese",
"target_text": "你好啊"
},
{
"id": 243,
"source_lang": "English",
"source_text": "Hi",
"target_lang": "Chinese",
"target_text": "你好"
}
]
💡 Example
curl -X POST "https://api.bluente.com/api/20250924/blu_translate/glossary/update" \
-H "Authorization: Bearer $BLUENTE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"id": 242,
"source_lang": "English",
"source_text": "hello",
"target_lang": "Chinese",
"target_text": "你好啊"
},
{
"id": 243,
"source_lang": "English",
"source_text": "Hi",
"target_lang": "Chinese",
"target_text": "你好"
}
]'
or
fetch("https://api.bluente.com/api/20250924/blu_translate/glossary/update", {
method: "POST",
headers: {
"Authorization": "Bearer $BLUENTE_API_KEY"
},
body: JSON.stringify([
{
id: 242,
source_lang: "English",
source_text: "hello",
target_lang: "Chinese",
target_text: "你好啊"
},
{
id: 243,
source_lang: "English",
source_text: "Hi",
target_lang: "Chinese",
target_text: "你好"
}
])
})
✅ Success Response Example
{
"message": "success",
"code": 0,
"data": {
"failed": [],
"success": [
{
"id": 242,
"user_id": "",
"organization_id": "",
"source_lang": "English",
"source_text": "hello",
"target_lang": "Chinese",
"target_text": "你好啊",
"namespace": "Bluente Partner",
"app_id": 0,
"updated_by": "",
"updated_at": null,
"created_at": null
},
{
"id": 243,
"user_id": "",
"organization_id": "",
"source_lang": "English",
"source_text": "Hi",
"target_lang": "Chinese",
"target_text": "你好",
"namespace": "Bluente Partner",
"app_id": 0,
"updated_by": "",
"updated_at": null,
"created_at": null
}
]
}
}
📊 Response Fields
Field | Type | Description |
---|---|---|
message | string | Response message, usually "success" |
code | int | Status code, 0 means success |
data.success | array | List of successfully updated glossary entries |
data.failed | array | List of glossary entries that failed to update |
success[].id | int | Glossary item ID |
success[].source_lang | string | Source language of the entry |
success[].source_text | string | Source term text |
success[].target_lang | string | Target language of the entry |
success[].target_text | string | Target term text |
success[].namespace | string | Namespace (client or partner) |
success[].app_id | int | Application ID |
success[].updated_by | string | Last updated by (user) |
success[].updated_at | string/null | Last update timestamp |
success[].created_at | string/null | Creation timestamp |
❌ Error Response Example
{
"message": "some entries failed to update",
"code": 400,
"data": {
"failed": [242, 243],
"success": []
}
}
📌 Notes
- Each item in the request array must have a valid
id
corresponding to an existing glossary entry. namespace
is inherited from the existing glossary entry and cannot be changed via this API.- If an entry fails to update, its ID will appear in the
failed
array; successful entries appear insuccess
. - Multiple entries can be updated at once to reduce the number of API calls.