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 Common Papago Translation headers.
Request body
Pass the list of terms (replacer) to be added. Up to 20 can be registered for a single request.
| Field | Type | Required | Description |
|---|---|---|---|
replacers |
Array | Required | List of terms to add (up to 20): replacers |
replacers
It defines each term registration entry within the replacers array of the request body.
| 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 following describes the response body for replacerList (array).
| Field | Type | 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) |
Response status codes
For information about the HTTP status codes common to all Papago Translation APIs, see Common 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"
}
]
}