curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_entry_upsert' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_entry_upsert', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/glossary_entry_upsert",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "sourceText": "Product", "targets": {"french": {"text": "Produit", "mode": "translate", "applicationMode": "smart"}}},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"glossaryId": "user_123__english",
"sourceLanguage": "english",
"entry": {
"entryId": "a8792157cb4f27fb949c035f45518c61e884bb86",
"sourceText": "product",
"targets": {
"french": {
"text": "Produit",
"mode": "translate",
"applicationMode": "smart"
}
},
"createdAt": 1792152000000,
"updatedAt": 1792152000000
}
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
용어집
용어집 항목 생성 또는 수정
원문 용어와 번역을 생성하거나 교체합니다. 용어집 소유자만 항목을 수정할 수 있습니다.
POST
/
v1
/
actions
/
glossary_entry_upsert
curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_entry_upsert' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_entry_upsert', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/glossary_entry_upsert",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "sourceText": "Product", "targets": {"french": {"text": "Produit", "mode": "translate", "applicationMode": "smart"}}},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
{
"data": {
"glossaryId": "user_123__english",
"sourceLanguage": "english",
"entry": {
"entryId": "a8792157cb4f27fb949c035f45518c61e884bb86",
"sourceText": "product",
"targets": {
"french": {
"text": "Produit",
"mode": "translate",
"applicationMode": "smart"
}
},
"createdAt": 1792152000000,
"updatedAt": 1792152000000
}
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
원문 용어와 번역을 생성하거나 교체합니다. 용어집 소유자만 항목을 수정할 수 있습니다.
필요한 권한:
POST https://api.voicecheap.ai/v1/actions/glossary_entry_upsert
인증 및 권한
string
필수
이 헤더에 VoiceCheap API 키를 전달하세요. 동일한 API 키를 사용하는 Authorization: Bearer도 지원합니다. OAuth 액세스 토큰은 MCP에서만 허용되며, 이
REST 엔드포인트에서는 사용할 수 없습니다.
glossary:write.
활성 유료 구독이 필요합니다. 권한은 팀 역할, 리소스 소유권, 미디어 크레딧 또는 요금제 한도를 변경하지 않습니다.
매개변수
string
전송 계층에서는 선택 사항입니다. 생략하면 서버가 유효성 검사 전에 식별자를 추가합니다. 응답이 유실된 경우 안전하게 복구할 수 있도록 고정된 UUID v4를 직접 제공하세요.형식: “uuid”. 패턴:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$.string
필수
텍스트 값입니다.최소 길이: 2. 최대 길이: 64.
string
필수
텍스트 값입니다.최소 길이: 1. 최대 길이: 500.
object
필수
JSON 객체입니다. 중첩 필드는 전체 입력 스키마를 참고하세요.
전체 입력 스키마
전체 입력 스키마
아래 JSON Schema는 검색을 통해 제공되는 정확한 필드 이름, 중첩 유형, 기본값, 범위 및 허용값을 유지합니다. 추가적인 필드 간 규칙은 작업 참고 사항에 나와 있습니다.
{
"type": "object",
"properties": {
"requestId": {
"type": "string",
"format": "uuid",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "UUID v4 for this action. Reuse the same ID with identical arguments on retries."
},
"sourceLanguage": {
"type": "string",
"minLength": 2,
"maxLength": 64
},
"sourceText": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"targets": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 2,
"maxLength": 64
},
"additionalProperties": {
"anyOf": [
{
"type": "string",
"maxLength": 2000
},
{
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 2000
},
"mode": {
"type": "string",
"enum": ["translate", "keep"]
},
"applicationMode": {
"type": "string",
"enum": ["smart", "strict"]
}
},
"required": ["text"],
"additionalProperties": false
}
]
}
}
},
"required": ["sourceLanguage", "sourceText", "targets"],
"additionalProperties": false
}
멱등성
각 변경 작업에 대해 requestId 또는 Idempotency-Key HTTP 헤더에 UUID v4를 사용하세요. 네트워크 오류 후에는 동일한 식별자와 동일한 인수를 재사용하세요. 둘 다 제공하는 경우 값이 일치해야 합니다. 저장된 요청을 재전송해도 작업이 반복되거나 월간 호출이 추가로 차감되지 않습니다. 실패하거나 중단된 요청은 자동으로 다시 시작되지 않습니다. 첫 실행이 일반적으로 동기식인 경우에도, 재시도 시 동일한 요청이 아직 실행 중이면 모든 변경 작업에서 HTTP 202를 반환할 수 있습니다. 실행은 완료되었지만 resultStored가 false이면, 재시도 시 원래 결과 대신 저장된 요청 상태를 HTTP 200으로 반환합니다. 해당 영역의 기록, 결과 또는 다운로드 액션으로 출력을 조회하세요.요청 예제
예제의 리소스 식별자와 미디어 키를 계정에서 반환된 값으로 바꾸세요. 동일한 변경 작업을 재시도할 때는 요청 식별자를 유지하세요.curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_entry_upsert' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_entry_upsert', {
method: 'POST',
headers: {
'x-api-key': process.env.VOICECHEAP_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify(input),
});
const body = await response.json();
if (!response.ok) throw new Error(body.code + ': ' + body.message);
console.log(body);
import os
import requests
response = requests.post(
"https://api.voicecheap.ai/v1/actions/glossary_entry_upsert",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "sourceText": "Product", "targets": {"french": {"text": "Produit", "mode": "translate", "applicationMode": "smart"}}},
timeout=120,
)
body = response.json()
if not response.ok:
raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
print(body)
응답
성공한 첫 실행은 작업 결과를 data 아래에 포함하여 HTTP 200을 반환합니다. 재전송 시에는 저장된 요청 상태를 대신 반환할 수 있습니다. 예제는 지원되는 응답 중 하나를 보여주며 모든 선택 필드를 포함하지는 않습니다. 정규화된 원본 용어와 대상 규칙을 포함한 저장된 항목을 반환합니다.{
"data": {
"glossaryId": "user_123__english",
"sourceLanguage": "english",
"entry": {
"entryId": "a8792157cb4f27fb949c035f45518c61e884bb86",
"sourceText": "product",
"targets": {
"french": {
"text": "Produit",
"mode": "translate",
"applicationMode": "smart"
}
},
"createdAt": 1792152000000,
"updatedAt": 1792152000000
}
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "completed",
"resultStored": false,
"message": "The action completed. Retrieve its output from the corresponding history or resource action."
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
결과 필드
| 필드 | 설명 |
|---|---|
data.glossaryId | 워크스페이스 소유자와 정규화된 원본 언어에 대한 용어집 식별자입니다. |
data.sourceLanguage | 정규화된 원본 언어 이름입니다. |
data.entry.entryId | 저장된 항목의 식별자입니다. 원본 용어가 변경되면 식별자도 변경될 수 있습니다. |
data.entry.sourceText | 용어집이 반환한, 앞뒤 공백을 제거하고 소문자로 변환한 원본 용어입니다. |
data.entry.targets | 정규화된 대상 언어 이름을 번역 규칙에 연결하는 맵입니다. |
data.entry.targets.<language>.text | 해당 대상 언어에 사용할 텍스트입니다. |
data.entry.targets.<language>.mode | translate 또는 keep입니다. |
data.entry.targets.<language>.applicationMode | 대상 규칙에 저장된 경우 smart 또는 strict입니다. |
data.entry.createdAt | 저장 작업이 반환한 항목 생성 시각의 밀리초 단위 타임스탬프입니다. |
data.entry.updatedAt | 밀리초 단위의 항목 저장 타임스탬프입니다. |
이 요청 복구 및 폴링
연결이 끊어진 후에도 동일한 식별자를 사용하세요. resultStored가 false이면 해당 기록, 결과 또는 다운로드 액션을 통해 출력을 조회하세요. 진행 상황을 확인하기 위해 두 번째 생성을 시작하지 마세요.curl --request POST 'https://api.voicecheap.ai/v1/actions/action_request_get' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","operation":"glossary_entry_upsert"}'
HTTP 200
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_entry_upsert",
"status": "completed",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"resultStored": true,
"result": {
"glossaryId": "user_123__english",
"sourceLanguage": "english",
"entry": {
"entryId": "a8792157cb4f27fb949c035f45518c61e884bb86",
"sourceText": "product",
"targets": {
"french": {
"text": "Produit",
"mode": "translate",
"applicationMode": "smart"
}
},
"createdAt": 1792152000000,
"updatedAt": 1792152000000
}
}
}
}
작업 참고 사항
- 1–200개의 대상 언어를 받습니다. 대상은 문자열이거나 text, 선택적 mode 및 선택적 applicationMode를 포함하는 객체일 수 있습니다.
- 원본 용어는 1–500자이고, 대상 텍스트는 최대 2,000자입니다.
- 저장 및 항목 식별을 위해 원본 용어의 앞뒤 공백을 제거하고 소문자로 변환합니다. 이후 업데이트나 삭제에는 반환된 entryId를 사용하세요.
- 빈 대상은 무시됩니다. 비어 있지 않은 대상이 하나 이상 남아 있어야 합니다. 원본 용어와 같은 대상 텍스트는 keep 모드로 저장됩니다.
사용량
성공한 호출마다 월간 API/MCP 호출 1회가 차감됩니다. 미디어 크레딧과 해당 작업의 생성 허용량도 적용됩니다.오류
| HTTP 상태 | 코드 | 의미 또는 복구 방법 |
|---|---|---|
| 400 | BAD_REQUEST | 원본 또는 대상 언어가 지원되지 않거나, 정규화 후 비어 있지 않은 대상 번역이 남아 있지 않습니다. |
| 400 | CREDENTIAL_IN_QUERY | 자격 증명이 access_token 또는 api_key 쿼리 매개변수로 제공되었습니다. 자격 증명은 헤더로 보내세요. |
| 400 | IDEMPOTENCY_CONFLICT | Idempotency-Key 헤더와 본문의 requestId 필드가 일치해야 합니다. |
| 400 | INVALID_REQUEST_ID | UUID v4인 requestId 또는 Idempotency-Key를 제공하세요. |
| 400 | VALIDATION_ERROR | JSON 객체에 지원되지 않는 필드, 유효하지 않은 값 또는 누락된 필수 인수가 있습니다. |
| 401 | API_KEY_EXPIRED | API 키가 만료되었습니다. |
| 401 | INVALID_API_KEY | 유효하고 만료되지 않은 API 키를 제공하세요. |
| 401 | INVALID_CREDENTIAL | Authorization 헤더의 형식이 잘못되었거나 x-api-key와 충돌합니다. |
| 401 | MISSING_CREDENTIAL | 사용 가능한 헤더 자격 증명이 전달되지 않았거나 4096자를 초과했습니다. |
| 401 | USER_NOT_FOUND | 이 자격 증명에 연결된 계정이 더 이상 존재하지 않습니다. |
| 403 | ACCOUNT_UNAVAILABLE | 작업을 수행하는 계정 또는 결제 계정을 사용할 수 없거나 해당 계정이 삭제 중입니다. |
| 403 | AMBIGUOUS_TEAM_API_KEY | 이 자격 증명의 사용자가 둘 이상의 팀에 속해 있어 청구 컨텍스트가 모호합니다. |
| 403 | FORBIDDEN | 유료 워크스페이스의 소유자만 용어집을 편집할 수 있습니다. 팀원에게는 읽기 권한만 있습니다. |
| 403 | INSUFFICIENT_SCOPE | 필요한 모든 권한을 부여하거나 다른 자격 증명을 사용하세요. |
| 403 | INTEGRATION_PLAN_UNSUPPORTED | 계정의 통합 한도를 확인할 수 없습니다. |
| 403 | SUBSCRIPTION_REQUIRED | 활성 유료 구독을 사용하세요. |
| 403 | TEAM_MEMBERSHIP_INVALID | 계정의 현재 팀 멤버십이 이 연결의 워크스페이스와 일치하지 않습니다. 멤버십을 새로 조회하고 다시 연결하세요. |
| 403 | TEAM_OWNER_NOT_FOUND | 실제로 적용되는 팀 소유자 계정을 찾을 수 없습니다. |
| 404 | ACCOUNT_NOT_FOUND | 계정 또는 활성 워크스페이스 계정을 찾을 수 없습니다. |
| 409 | CONCURRENT_ACTION_LIMIT_REACHED | 이 계정에서는 이미 10개의 연동 액션이 실행 중입니다. 새 액션을 시작하기 전에 기존 요청을 폴링하세요. |
| 409 | IDEMPOTENCY_CONFLICT | 동일한 작업과 인수에 대해서만 식별자를 재사용하세요. |
| 429 | INTEGRATION_MONTHLY_LIMIT_REACHED | 월간 한도가 초기화될 때까지 기다리거나 요금제를 변경하세요. |
| 429 | INTEGRATION_RATE_LIMIT_REACHED | Retry-After가 있으면 지정된 시간만큼 기다리고 백오프를 적용하세요. |
| 500 | INTERNAL_ERROR | 변경 작업을 재시도하기로 결정하기 전에 저장된 요청 상태와 리소스 기록을 확인하세요. |
| 503 | ACTION_RESULT_UNAVAILABLE | 액션은 실행되었지만 결과를 저장할 수 없습니다. 새 생성을 시작하기 전에 저장된 요청 상태와 리소스 기록을 확인하세요. |
| 503 | SERVER_RESTARTING | 서버가 다시 시작 중입니다. 잠시 후 재시도하고, 변경 작업의 경우 동일한 요청 식별자를 유지하세요. |
{
"code": "INSUFFICIENT_SCOPE",
"message": "This credential does not permit the requested action.",
"status": 403,
"details": {
"requiredScopes": ["glossary:write"]
}
}
이 페이지가 도움이 되었나요?

