Tasks

Creates a task in the project. Requires Manage tasks admin right. Keep in mind, that <code>initial_tm_leverage</code> attribute will be empty in server response. It's being calculated after the task is created and this process may take some time.

Requires <code>write_tasks</code> OAuth access scope.

post/projects/{project_id}/tasks

Request

  • Base URL
    https://api.lokalise.com/api2
  • URL
    https://api.lokalise.com/api2/projects/{project_id}/tasks
  • Auth
    API key in header X-Api-Token

Path parameters

project_idstring required

A unique project identifier

Request body

titlestring required

Task title.

descriptionstring

Brief task description. Used as instructions for AI in <code>automatic_translation</code> and <code>lqa_by_ai</code> task types.

due_datestring

Due date in <code>Y-m-d H:i:s</code> format. Example: "2024-12-24 23:59:59"

keysstring[]

List of keys identifiers, included in task. Required if <code>parent_task_id</code> is not specified

source_language_isostring

Source language code for the task. Falls back to project base language if not provided.

auto_close_languagesboolean

Whether languages should be closed automatically upon completion of the last item. Must be <code>true</code> or omit the property for automatic_translation and lqa_by_ai task types.

auto_close_taskboolean

Whether the task should be automatically closed upon all language completion. Must be <code>true</code> or omit the property for automatic_translation and lqa_by_ai task types.

auto_close_itemsboolean

Whether the <code>translation</code> task items should be automatically marked as completed on edit. Must be <code>true</code> or omit the property for automatic_translation and lqa_by_ai task types.

task_type'translation' | 'automatic_translation' | 'lqa_by_ai' | 'review'

Specify if task type is <code>translation</code> (default), <code>automatic_translation</code>, <code>lqa_by_ai</code> or <code>review</code>.

parent_task_idnumber

If <code>task_type</code> is <code>review</code>, it can have a parent task. Current task will be opened when parent task is closed.

closing_tagsstring[]

Tags that will be added to affected keys when task is closed.

do_lock_translationsboolean

If set to true, will lock translations for non-assigned project members.

custom_translation_status_idsstring[]

IDs of custom translation statuses that will be applied to task items after item is completed.

save_ai_translation_to_tmboolean

Save AI translations to Translation Memory. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code>. Defaults to false.

apply_ai_tm100_matchesboolean

Apply 100% translation memory matches. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code>. Defaults to false.

mark_verifiedboolean

Mark translations as verified. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code>. Defaults to true.

translate_all_segmentsboolean

Translate all segments including those with existing translations or TM matches. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code> in projects with segmentation enabled. When false, only empty segments will be translated. This parameter can only be set during task creation and cannot be modified or retrieved afterwards. Defaults to false.

include_ai_scoreboolean

Run AI scoring (LQA) on task translations once automatic translation completes. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code> and requires the AI scoring feature in your plan. Defaults to false.

translation_engine'ai' | 'deepl' | 'google'

Engine that produces the automatic translations: <code>ai</code> (default), <code>deepl</code> or <code>google</code>. Only applicable for tasks with <code>task_type</code> set to <code>automatic_translation</code>; for every other task type the parameter should be omitted. The machine translation engines (<code>deepl</code>, <code>google</code>) cannot be combined with <code>save_ai_translation_to_tm</code> or <code>include_ai_score</code>. Unlike <code>ai</code>, which skips languages it cannot handle and reports them in <code>skipped_languages</code>, a machine translation engine rejects the whole request with a 400 error when it cannot translate one of the requested language pairs. This parameter can only be set during task creation and cannot be modified or retrieved afterwards.

Response

OK

project_idstring

Example response

{
  "task": {
    "languages": [
      {
        "tm_leverage": {
          "status": "completed",
          "value": {
            "0%+": 30,
            "50%+": 0,
            "75%+": 0,
            "85%+": 0,
            "95%+": 0,
            "100%": 0
          }
        }
      }
    ]
  }
}

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property