v1.0.0OpenAPI 3.1.1

Document Translation API

Download OpenAPI Document

Translate Office documents one at a time or in batches, with their layout kept intact.

Translate Word, PowerPoint, Excel, CSV, PDF and InDesign files, structured text files (JSON, XML, HTML, XLIFF) and plain text, keeping each document's layout and formatting. Every translation runs through one of your translation memories: matches are reused, the rest is machine translated and stored back. New here? Read Document Translation for the whole flow.

Every request

Send your organization API key in the x-api-key header; it starts with uvk_. Create one in the Universe app under Settings → API keys. The key and organization limits count requests over a rolling minute. See Authentication and Rate limits.

The usual flow: send the file with Translate a document (for a file over 25 MB, first get an upload URL), poll Get a translation until status is DONE, then download the translated file. Each call translates into one language; call it again for each further language, or translate many files at once with Translate a batch of files.

Translations run in the background, so every call returns straight away. They are charged per source word when they start: Count billable words first if you want the count, and see the current rates on Translate a document. Without enough credits you get 402 and nothing is created. See Credits.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

Uploads

Files up to 25 MB go straight into Translate a document as the file part. For a Word, PowerPoint, Excel, PDF or InDesign file up to 500 MB, get a presigned upload URL, PUT the file to it, and translate it by its objectKey.

Get an upload URL

Get a text file upload URL

Get an edited picture upload URL

Batches

Translate many files in one call: up to 20 uploaded files into one language, or every matching file in a folder of your assets into several languages. Each file becomes its own translation, grouped in a batch you can follow. These endpoints must be turned on for your organization.

Translate a batch of files

Get a batch

List batches

Preview a folder translation

Translate a folder

List segments

Auth Required

The source and translated text of a translation, segment by segment (a paragraph, cell or string each), with each segment's review status. Paginated with page and size; filter with search and filter. counts covers the whole translation. Use layerIndex to edit a segment.

Permission: playground.document:read. An API key acts with the role of the member who created it.

Path Parameters

idstring · uuidrequired

Translation ID: the id returned by Translate a document (or listed by List translations).

Example: 7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60

Query Parameters

pagenumber

Page to return, from 1. A page past the end returns the last page.

Default: 1Example: 1
sizenumber

Segments per page, from 1. No upper limit.

Default: 12Example: 12
searchstring

Only segments whose source or target contains this text (case-insensitive).

Example: welcome
filterstring

Only segments with this review status, or untranslated: segments with source text and no translation yet (not counting text marked not for translation). Default all.

Enum values:allunverifiedverifiedapproveduntranslated
Default: allExample: unverified
sortstring

Order of segments in the document: asc (default) or desc.

Enum values:ascdesc
Default: ascExample: asc

Responses

200One page of segments.
application/json
statusCodenumberrequired

Always 200.

Example: 200
messagestringrequired

Always Segments fetched successfully.

Example: Segments fetched successfully
dataSegmentDto[]required

One page of segments.

Show child attributes
idstringrequired

Position in the document, from 01, zero-padded.

Example: 01
segmentIdstring · uuidrequired

Segment ID.

Example: 1f2e3d4c-5b6a-4987-8a6b-5c4d3e2f1a0b
layerIndexnumberrequired

Index of the segment, from 0. Pass it as layerIndex to Edit a segment, or in layers to Set review status.

Example: 0
sourcestringrequired

Source text. Office documents carry <span id=N> markers around formatted words.

Example: Welcome to our <span id=1>new</span> website
targetstringrequired

Translated text. Empty when not translated.

Example: हमारी <span id=1>नई</span> वेबसाइट पर आपका स्वागत है
statusstringrequired

Review status, in words.

Enum values:unverifiedverifiedapproved
Example: unverified
verificationstringrequired

Review status as a code: u unverified, v verified, a approved.

Enum values:uva
Example: u
dirtybooleanrequired

True when the segment has changes not yet sent to the translation memory (see Sync edits to the translation memory).

Example: false
locationSegmentLocationDto

Where the segment is. Only for Office, PDF and InDesign documents.

Show child attributes
labelstringrequired

Where the segment is, in words: Slide 3, Page 2, Header 1, Pages 2–3, …

Example: Slide 3
pagenumber

Page number (Word and PDF).

Example: 2
slidenumber

Slide number (PowerPoint).

Example: 3
notesboolean

PowerPoint: the segment is in the slide's speaker notes, not on the slide.

Example: true
anchorstring

Paragraph address inside an InDesign document.

Example: u1a2/p4
layoutOverflowboolean

PDF only, and only when true: the translation did not fit its space on the page and was shrunk or cut.

Example: true
paginationSegmentPaginationDtorequired

Paging.

Show child attributes
pagenumberrequired

The page returned (clamped to the last page).

Example: 1
sizenumberrequired

Segments per page.

Example: 12
totalnumberrequired

Segments matching the filters.

Example: 48
totalPagesnumberrequired

Pages, at least 1.

Example: 4
countsSegmentCountsDtorequired

Counts over the whole translation, whatever the filters.

Show child attributes
allnumberrequired

All segments.

Example: 48
unverifiednumberrequired

Unverified segments.

Example: 30
verifiednumberrequired

Verified segments.

Example: 15
approvednumberrequired

Approved segments.

Example: 3
flaggednumberrequired

Always 0. Kept for older clients.

Example: 0
lockednumberrequired

Segments the file marks not for translation (XLIFF translate="no"). Included in all; never translated, reviewed or scored by a QE report.

Example: 2
verificationStepsnumberrequired

Review steps in use: 3 (unverified → verified → approved) when the translation has a translation memory or your organization uses three steps, else 2.

Enum values:23
Example: 3
unsyncedCountnumberrequired

Segments with changes not yet sent to the translation memory.

Example: 2
400A path parameter is not a UUID (`Validation failed (uuid is expected)`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
404No translation with this ID in your organization (`Playground log not found`), or the key's role sees only its own work and this translation is not its own (`Process not found`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
GET/v1/galaxy/playground/document/logs/{id}/segments
curl '{{API_BASE_URL}}/v1/galaxy/playground/document/logs/7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60/segments?page=1&size=12&search=welcome&filter=unverified&sort=asc' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "statusCode": 200,
  "message": "Segments fetched successfully",
  "data": [
    {
      "id": "01",
      "segmentId": "1f2e3d4c-5b6a-4987-8a6b-5c4d3e2f1a0b",
      "layerIndex": 0,
      "source": "Welcome to our <span id=1>new</span> website",
      "target": "हमारी <span id=1>नई</span> वेबसाइट पर आपका स्वागत है",
      "status": "unverified",
      "verification": "u",
      "dirty": false,
      "location": {
        "label": "Slide 3",
        "page": 2,
        "slide": 3,
        "notes": true,
        "anchor": "u1a2/p4"
      },
      "layoutOverflow": true
    }
  ],
  "pagination": {
    "page": 1,
    "size": 12,
    "total": 48,
    "totalPages": 4
  },
  "counts": {
    "all": 48,
    "unverified": 30,
    "verified": 15,
    "approved": 3,
    "flagged": 0,
    "locked": 2
  },
  "verificationSteps": 3,
  "unsyncedCount": 2
}

Edit a segment

Set review status

Sync edits to the translation memory

Update from the translation memory

Explain a segment translation

Models

BatchDetailResponseDto
BatchListResponseDto
BatchStartFileDto
BatchStartResponseDto
BulkUpdatePlaygroundVerificationDto
BulkVerifyResponseDto
CosmosRunRefDto
CreateDocumentUploadPresignDto
CreateStagedUploadDto
DocumentImagePreviewDto
DocumentImagesPreviewResponseDto
DocumentImagesSummaryDto
DocumentUploadUrlResponseDto
FolderPreviewFileDto
FolderPreviewResponseDto
FolderPreviewTotalsDto
FolderRefDto
FolderRunBatchDto
FolderRunDto
FolderRunFailureDto
FolderRunResponseDto
FolderSkippedFileDto
InsufficientCreditsErrorDto
LogAssigneeDto
LogDetailConsumedDto
LogDetailDto
LogDetailResponseDto
LogImageDto
LogImagesResponseDto
LogListConsumedDto
LogListItemDto
LogListResponseDto
LogOwnerDto
LogTmDto
LogVerificationCountsDto
PdfUnreadablePageDto
PlaygroundBatchFileDto
PlaygroundBatchSummaryDto
PlaygroundSyncFromTmResponseDto
PlaygroundSyncToTmResponseDto
RenameDitaPackageDto
RenameLogResponseDto
RenamePlaygroundLogDto
SavePlaygroundOutputToAssetsDto
SaveToAssetsResponseDto
SegmentCountsDto
SegmentDto
SegmentLocationDto
SegmentPaginationDto
SegmentsResponseDto
StagedUploadTicketDto
SyncPlaygroundToTmDto
TextResultDto
TextResultResponseDto
TranslateBatchFormDto
TranslateDocumentFormDto
TranslateLogImagesDto
TranslationStartedResponseDto
UpdatePhraseResponseDto
UpdatePlaygroundPhraseDto
UseEditedLogImageFormDto
WordCountResponseDto