POST/v2/projects/{projectId}/translation-memories/{translationMemoryId}

Assign a shared translation memory to a project

Assigns a shared translation memory to a project and configures its access and suggestion priority. Set readAccess and writeAccess to control whether the project reads from or writes to the memory; you can also set a penalty override and priority. The response provides the resulting assignment settings.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 4 body fields
translationMemoryIdintegerrequired
The numeric identifier of the shared translation memory to assign.
projectIdintegerrequired
The numeric identifier of the project to receive the assignment.

Access and suggestion settings for the shared translation memory assignment. Include both access flags; penalty and priority are optional.

penaltyintegeroptional
Per-assignment penalty override (0–100). When null, the TM's default penalty applies.
priorityintegeroptional
Priority in suggestion results (lower = higher priority). When null, the assignment is placed after every existing one (max + 1) so it stacks at the bottom of the list.
readAccessbooleanrequired
Whether this project can read from the TM
writeAccessbooleanrequired
Whether this project writes new translations to the TM

5 status codes
200Returns the assignment settings, including its identifier, name, type, source language, access flags, priority, default penalty, and write-only-reviewed setting.
defaultPenaltyintegerrequired
penaltyintegeroptional
priorityintegerrequired
readAccessbooleanrequired
sourceLanguageTagstringrequired
translationMemoryIdintegerrequired
translationMemoryNamestringrequired
typestringrequired
Allowed:PROJECTSHARED
writeAccessbooleanrequired
writeOnlyReviewedbooleanrequired
400Returned when a required access flag is missing or a supplied penalty or priority violates its constraint.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to assign the translation memory.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project or translation memory is not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the assignment request is invalid, a 401 when the request is unauthenticated, a 403 when the authenticated user cannot assign the memory, and a 404 when the project or translation memory is not found. The translationMemoryId and projectId path parameters must identify the memory and project. The body must include readAccess and writeAccess; penalty must be from 0 to 100 and priority must be at least 0 when supplied.