Create translation job
Changed onCreates a new translation job or fetches an existing one based on the specified criteria.
Purpose: This endpoint simplifies the common workflow where you need to obtain a translation job for file uploads without managing the full complexity of job creation. It's particularly useful in automation scripts (e.g., bash scripts) and integration scenarios where you have a desired job name and simply need to get a translationJobUid to proceed with file uploads. The job can be reviewed and configured later through the Smartling dashboard.
When to use this endpoint:
- You need a simple "get or create" job operation by name
- You're building file upload workflows and need a job quickly
- You're writing automation scripts or integrations
When to use the standard Jobs API instead: If you require full control over job creation with all available parameters (custom fields, reference numbers, due dates, etc.), please use the Jobs API Create Job endpoint. This endpoint intentionally provides a simplified interface focused on the most common use case.
Dynamic job naming: The nameTemplate parameter supports date pattern placeholders using Java DateTimeFormatter syntax (e.g., {yyyy}, {QQQ}). These patterns are evaluated at request time using the specified timeZoneName.
Job creation behavior depends on the mode parameter:
- REUSE_EXISTING: Returns an existing job if one matches the evaluated name template. If the matching job is closed, creates a new job with a unique name using the specified salt strategy.
- CREATE_NEW: Attempts to create a new job with the evaluated name. If a job with that name already exists, appends a unique identifier using the specified salt strategy to ensure creation succeeds.
Examples:
-
Quarterly localization job:
{ "nameTemplate": "Q{QQQ} {yyyy} Localization", "timeZoneName": "America/New_York", "mode": "REUSE_EXISTING" }Evaluates to: "Q1 2025 Localization" (when called in Q1 2025)
-
Daily content updates:
{ "nameTemplate": "Daily Update {yyyy-MM-dd}", "timeZoneName": "Europe/London", "mode": "REUSE_EXISTING" }Evaluates to: "Daily Update 2025-10-08"
-
Always unique jobs:
{ "nameTemplate": "Feature Release {yyyy}", "mode": "CREATE_NEW", "salt": "TIMESTAMP" }Creates: "Feature Release 2025 2025-10-08 02:34:15 PM" (if job already exists)
-
Job reuse with salt suffix: First request - Creates initial job:
POST /job-batches-api/v2/projects/abc123/jobs { "nameTemplate": "Daily Report {yyyy-MM-dd}", "mode": "REUSE_EXISTING", "salt": "RANDOM_ALPHANUMERIC", "targetLocaleIds": ["fr-FR", "de-DE"] }Response: {"jobName": "Daily Report 2025-12-09", "translationJobUid": "job001"}
After job is completed and closed...
Second request - Creates job with salt (original is closed):
POST /job-batches-api/v2/projects/abc123/jobs { "nameTemplate": "Daily Report {yyyy-MM-dd}", "mode": "REUSE_EXISTING", "salt": "RANDOM_ALPHANUMERIC", "targetLocaleIds": ["fr-FR", "de-DE"] }Response: {"jobName": "Daily Report 2025-12-09 a7x9k", "translationJobUid": "job002"}
Third request - Reuses job with salt (prevents duplicate):
POST /job-batches-api/v2/projects/abc123/jobs { "nameTemplate": "Daily Report {yyyy-MM-dd}", "mode": "REUSE_EXISTING", "salt": "RANDOM_ALPHANUMERIC", "targetLocaleIds": ["fr-FR", "de-DE"] }Response: {"jobName": "Daily Report 2025-12-09 a7x9k", "translationJobUid": "job002"} (same job)
Key behavior: The third request reuses the job with salt suffix instead of creating another duplicate, preventing multiple jobs with different salts for the same day.
Request
- Base URLhttps://api.smartling.com
- AuthHTTP bearer
Path parameters
Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.
A unique project identifier. This can be found in the Smartling Dashboard under Account Settings > API.
Request body
Example request
{
"targetLocaleIds": [
"fr-FR"
]
}Response
OK
Example response
{
"response": {
"data": {
"translationJobUid": "j45v1uvsi3tx",
"targetLocaleIds": [
"fr-FR"
]
}
}
}Changes
- info
endpoint added
- info