Context Images

Upload, list, and delete context images that provide visual context for translators working on text segments.

Context images are screenshots or visual references that help translators understand where and how text appears in the application UI. All endpoints are served under /v1/{workspaceUrl}/projects/{projectUrl}/contextImages and return application/json responses.

Authentication is required. Read operations require contextImagesView permission; write/delete operations require contextImagesManage permission.


Connection Types

When creating a context image, you choose how it connects to text segments:

TypeDescription
KEY_BASEDExplicitly connect to segments by their file path and key
TEXT_BASEDConnect to segments by matching the exact text content
IMAGE_BASEDAutomatically detect and connect text using OCR (optical character recognition)

Endpoints

GET /v1/{workspaceUrl}/projects/{projectUrl}/contextImages -- List context images

Returns a paginated list of context images for the specified project.

Query Parameters

ParameterTypeRequiredDescription
searchstringNoFilter criteria. Use "segments_not_present" to find images not connected to any segments
pageintNoPage number (standard Spring pagination)
sizeintNoPage size (standard Spring pagination)
DetailValue
AuthcontextImagesView permission on the project
Response200 — paginated PageResponse<V1ContextImageResponse>

POST /v1/{workspaceUrl}/projects/{projectUrl}/contextImages -- Create a context image

Uploads a new context image and optionally connects it to text segments. Accepts multipart/form-data with two parts:

Form Parts

PartTypeRequiredDescription
filebinaryYesThe image file. Supported formats: PNG, JPG, JPEG, WEBP
requestJSON (V1CreateContextImageRequest)YesConnection configuration and segment mappings

Request JSON — V1CreateContextImageRequest

FieldTypeRequiredDescription
connectTypestringYes"KEY_BASED", "TEXT_BASED", or "IMAGE_BASED"
languageCodestringYesISO 639-1 code (e.g. "en", "de") of the text on the image
autoConnectSuggestionsbooleanYesAuto-accept OCR suggestions. Only meaningful for IMAGE_BASED.
descriptionstringYesDescription of what the image shows (nullable)
segmentsarrayYesSegment connections with highlight boxes (nullable, required for KEY_BASED/TEXT_BASED)

Segment Object — V1ConnectSegment

FieldTypeDescription
filePathAndKeyobject | null{ "filePath": "...", "key": "..." }required for KEY_BASED
textstring | nullExact text content — required for TEXT_BASED
highlightBoxobject | null{ "left", "top", "width", "height" } — pixel coordinates on the image

Example — KEY_BASED

{
  "connectType": "KEY_BASED",
  "autoConnectSuggestions": true,
  "description": "Screenshot of the edit screen",
  "languageCode": "en",
  "segments": [
    {
      "filePathAndKey": { "filePath": "strings.xml", "key": "action_edit" },
      "text": "Edit",
      "highlightBox": { "left": 500, "top": 500, "width": 100, "height": 100 }
    }
  ]
}

Example — IMAGE_BASED

{
  "connectType": "IMAGE_BASED",
  "autoConnectSuggestions": false,
  "description": "Screenshot with text to auto-connect",
  "languageCode": "de",
  "segments": null
}
DetailValue
AuthcontextImagesManage permission on the project
Response201V1ContextImageResponse with image metadata

DELETE /v1/{workspaceUrl}/projects/{projectUrl}/contextImages/{id} -- Delete a context image

Permanently deletes the specified context image and all its segment connections. This action cannot be undone.

Path Parameters

ParameterTypeDescription
idstringUnique context image identifier (e.g. "ci_18USq6822XIv-19847171")
DetailValue
AuthcontextImagesManage permission on the project
Response200 — empty body

Response Object — V1ContextImageResponse

FieldTypeDescription
idstringUnique identifier
fileNamestringOriginal uploaded file name
descriptionstringUser-provided description
imageUrlstringCloudflare-hosted URL of the image
projectTitlestringTitle of the owning project
languageCodestringAssociated locale
connectedSegmentTextsCountlongNumber of connected segment texts
segmentTextSuggestionsCountlongNumber of suggested (unconfirmed) segment connections
uploadSourcestringHow the image was uploaded (e.g. "API")
uploadStatusstringUpload processing status
textDetectionStatusstringOCR text detection status
createdAttimestampCreation timestamp
updatedAttimestampLast update timestamp

Common Error Responses

StatusMeaning
400Bad Request — invalid parameters, filter criteria, or file format
401Unauthorized — authentication credentials are missing or invalid
403Forbidden — insufficient permissions for the requested operation
404Not Found — workspace, project, or context image does not exist