DocsTranslation APIGlossaryUpload

    ✏️ 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

    FieldTypeDescription
    messagestringResponse message, usually "success"
    codeintStatus code, 0 means success
    data.successarrayList of successfully updated glossary entries
    data.failedarrayList of glossary entries that failed to update
    success[].idintGlossary item ID
    success[].source_langstringSource language of the entry
    success[].source_textstringSource term text
    success[].target_langstringTarget language of the entry
    success[].target_textstringTarget term text
    success[].namespacestringNamespace (client or partner)
    success[].app_idintApplication ID
    success[].updated_bystringLast updated by (user)
    success[].updated_atstring/nullLast update timestamp
    success[].created_atstring/nullCreation 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 in success.
    • Multiple entries can be updated at once to reduce the number of API calls.