Add term

Prev Next

Available in Classic and VPC

Add a new term in a glossary.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /glossary/v1/replacer

Request headers

For information about the headers common to all Papago Translation APIs, see Papago Translation request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
replacers Array Required List of terms to add (up to 20): replacers

replacers

The following describes replacers.

Field Type Required Description
glossaryKey String Required Glossary ID
source String Required Source language code
  • Example: ko, en
target String Required Translation language code
  • Example: ko, en
triggerText String Required Source text
replaceText String Required Translated text

Request example

The request example is as follows:

curl --location --request POST "https://papago.apigw.ntruss.com/glossary/v1/replacer" \
  --header "Content-Type: application/json" \
  --header "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
  --header "x-ncp-iam-access-key: {x-ncp-iam-access-key}" \
  --header "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}" \
  --data '{
    "replacers": [
      {
        "glossaryKey": "7f3c2a91-8b5e-4d7b-9e32-1c0f4e7e59ad",
        "source": "ko",
        "target": "en",
        "triggerText": "Test term 1",
        "replaceText": "Test Term 1"
      },
      {
        "glossaryKey": "7f3c2a91-8b5e-4d7b-9e32-1c0f4e7e59ad",
        "source": "ko",
        "target": "en",
        "triggerText": "Test term 2",
        "replaceText": "Test Term 2"
      }
    ]
  }'
 

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
id Long - Term ID
glossaryKey String - Glossary ID
source String - Source language code
  • Example: ko, en
target String - Translation language code
  • Example: ko, en
triggerText String - Source text
replaceText String - Translated text
createdDateTime String - Creation date and time
  • yyyy-MM-dd kk:mm:ss format

Response status codes

For information about the HTTP status codes common to all Papago Translation APIs, see Papago Translation response status codes.

Response example

The response example is as follows:

{
    "replacers": [
        {
            "id": 12345,
            "glossaryKey": "7f3c2a91-8b5e-4d7b-9e32-1c0f4e7e59ad",
            "source": "ko",
            "target": "en",
            "triggerText": "Test term",
            "replaceText": "Test Term",
            "createdDateTime": "2025-01-24 10:30:00"
        }
    ]
}