curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_import' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","importMode":"merge","rows":[{"rowNumber":1,"sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}]}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
importMode: 'merge',
rows: [
{
rowNumber: 1,
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
},
],
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_import', {
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_import",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "importMode": "merge", "rows": [{"rowNumber": 1, "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",
"importedCount": 1,
"entryCount": 1,
"invalidRows": [],
"importMode": "merge"
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"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"
}
용어집
용어집 항목 가져오기
기존 항목을 지우지 않고 용어집 행을 가져옵니다. Merge는 일치하는 용어를 갱신하고 ignore는 유지합니다.
POST
/
v1
/
actions
/
glossary_import
curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_import' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","importMode":"merge","rows":[{"rowNumber":1,"sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}]}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
importMode: 'merge',
rows: [
{
rowNumber: 1,
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
},
],
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_import', {
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_import",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "importMode": "merge", "rows": [{"rowNumber": 1, "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",
"importedCount": 1,
"entryCount": 1,
"invalidRows": [],
"importMode": "merge"
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"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"
}
기존 항목을 지우지 않고 용어집 행을 가져옵니다. Merge는 일치하는 용어를 갱신하고 ignore는 유지합니다.
필요한 권한:
POST https://api.voicecheap.ai/v1/actions/glossary_import
인증 및 권한
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
텍스트 값입니다.허용값: “merge”, “replace”, “ignore”. 기본값: “merge”.
array
필수
값 목록입니다. 항목 구조는 전체 입력 스키마를 참고하세요.최소 항목 수: 1. 최대 항목 수: 500.
전체 입력 스키마
전체 입력 스키마
아래 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
},
"importMode": {
"default": "merge",
"type": "string",
"enum": ["merge", "replace", "ignore"]
},
"rows": {
"minItems": 1,
"maxItems": 500,
"type": "array",
"items": {
"type": "object",
"properties": {
"rowNumber": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"sourceText": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"targets": {
"type": "object",
"propertyNames": {
"type": "string",
"minLength": 2,
"maxLength": 64
},
"additionalProperties": {
"type": "object",
"properties": {
"text": {
"type": "string",
"maxLength": 2000
},
"mode": {
"type": "string",
"enum": ["translate", "keep"]
},
"applicationMode": {
"type": "string",
"enum": ["smart", "strict"]
}
},
"required": ["text", "mode"],
"additionalProperties": false
}
}
},
"required": ["rowNumber", "sourceText", "targets"],
"additionalProperties": false
}
}
},
"required": ["sourceLanguage", "rows"],
"additionalProperties": false
}
멱등성
각 변경 작업에 대해 requestId 또는 Idempotency-Key HTTP 헤더에 UUID v4를 사용하세요. 네트워크 오류 후에는 동일한 식별자와 동일한 인수를 재사용하세요. 둘 다 제공하는 경우 값이 일치해야 합니다. 저장된 요청을 재전송해도 작업이 반복되거나 월간 호출이 추가로 차감되지 않습니다. 실패하거나 중단된 요청은 자동으로 다시 시작되지 않습니다. 첫 실행이 일반적으로 동기식인 경우에도, 재시도 시 동일한 요청이 아직 실행 중이면 모든 변경 작업에서 HTTP 202를 반환할 수 있습니다. 실행은 완료되었지만 resultStored가 false이면, 재시도 시 원래 결과 대신 저장된 요청 상태를 HTTP 200으로 반환합니다. 해당 영역의 기록, 결과 또는 다운로드 액션으로 출력을 조회하세요.요청 예제
예제의 리소스 식별자와 미디어 키를 계정에서 반환된 값으로 바꾸세요. 동일한 변경 작업을 재시도할 때는 요청 식별자를 유지하세요.curl --request POST 'https://api.voicecheap.ai/v1/actions/glossary_import' \
--header "x-api-key: $VOICECHEAP_API_KEY" \
--header 'Content-Type: application/json' \
--data '{"requestId":"58d5bb53-00d0-4692-bdaf-c6650ee87e30","sourceLanguage":"english","importMode":"merge","rows":[{"rowNumber":1,"sourceText":"Product","targets":{"french":{"text":"Produit","mode":"translate","applicationMode":"smart"}}}]}'
const input = {
requestId: '58d5bb53-00d0-4692-bdaf-c6650ee87e30',
sourceLanguage: 'english',
importMode: 'merge',
rows: [
{
rowNumber: 1,
sourceText: 'Product',
targets: {
french: {
text: 'Produit',
mode: 'translate',
applicationMode: 'smart',
},
},
},
],
};
const response = await fetch('https://api.voicecheap.ai/v1/actions/glossary_import', {
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_import",
headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
json={"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30", "sourceLanguage": "english", "importMode": "merge", "rows": [{"rowNumber": 1, "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",
"importedCount": 1,
"entryCount": 1,
"invalidRows": [],
"importMode": "merge"
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"status": "running",
"pollAfterSeconds": 5
},
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30"
}
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"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.importedCount | 가져오기 저장 작업에 전달된 유효한 행의 수입니다. |
data.entryCount | 가져오기 후 용어집에 저장된 총 항목 수입니다. |
data.invalidRows | rowNumber, 선택적 sourceText 및 reason이 포함된 유효하지 않거나 건너뛴 행입니다. |
data.invalidRows[].rowNumber | 제출한 페이로드의 행 식별자입니다. |
data.invalidRows[].sourceText | 사용 가능한 경우의 원본 용어입니다. |
data.invalidRows[].reason | 행이 유효하지 않거나 건너뛴 이유입니다. |
data.importMode | 요청한 모드이며, 기본값은 merge입니다. |
이 요청 복구 및 폴링
연결이 끊어진 후에도 동일한 식별자를 사용하세요. 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_import"}'
HTTP 200
{
"data": {
"requestId": "58d5bb53-00d0-4692-bdaf-c6650ee87e30",
"operation": "glossary_import",
"status": "completed",
"createdAt": 1792144800000,
"updatedAt": 1792144820000,
"resultStored": true,
"result": {
"glossaryId": "user_123__english",
"sourceLanguage": "english",
"importedCount": 1,
"entryCount": 1,
"invalidRows": [],
"importMode": "merge"
}
}
}
작업 참고 사항
- 1–500개의 구조화된 행을 받으며, 행마다 1–200개의 대상 언어를 포함할 수 있습니다. 각 대상 객체에는 text와 mode가 필요합니다.
- 기본값은 merge입니다. ignore는 이미 존재하는 원본 용어를 건너뛰고 invalidRows에 보고합니다.
- 현재 구현은 replace를 허용하지만 동일한 merge 작업으로 저장하므로 페이로드에서 생략된 항목을 제거하지 않습니다. 기존 용어집을 비우는 데 replace를 사용하지 마세요.
- 중복된 원본 용어와 알 수 없는 대상 언어는 유효하지 않은 행으로 보고됩니다. 유효한 행이 남아 있지 않으면 요청이 실패합니다.
- 행의 대상에 applicationMode가 없으면 현재 가져오기 처리는 해당 대상에 strict를 할당합니다. 원하는 모드가 중요한 경우 smart 또는 strict를 명시적으로 제공하세요.
사용량
성공한 호출마다 월간 API/MCP 호출 1회가 차감됩니다. 미디어 크레딧과 해당 작업의 생성 허용량도 적용됩니다.오류
| HTTP 상태 | 코드 | 의미 또는 복구 방법 |
|---|---|---|
| 400 | BAD_REQUEST | 검증 후 유효한 용어집 행이 남아 있지 않습니다. |
| 400 | CREDENTIAL_IN_QUERY | 자격 증명이 access_token 또는 api_key 쿼리 매개변수로 제공되었습니다. 자격 증명은 헤더로 보내세요. |
| 400 | GLOSSARY_IMPORT_UNKNOWN_LANGUAGE | 가져오기 원본 언어가 지원되지 않습니다. |
| 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"]
}
}
이 페이지가 도움이 되었나요?

