> ## Documentation Index
> Fetch the complete documentation index at: https://hyperlocalise.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a job

> Requires `jobs:write`. Takes the same body and checks as `POST /api/v1/jobs` on the files and jobs host. A `keys` job is a task for people on a native project's strings. It starts as `waiting_for_review` and is ready to work in the editor. A `string` or `file` job is recorded as `queued`. This API does not start AI translation for it. A `file` job with `fileInput.step` is a task for a person on that file instead: it starts as `waiting_for_review`, or as `queued` when `fileInput.after` names a job of the same project that is not yet `succeeded` or `cancelled`, and opens when that job is (`400 after_job_not_found` when no such job is in the project). A task created here is not analysed for Reports until work is saved in it; one created with `POST /api/v1/jobs` is. Languages must be enabled on the project. A file job's `fileFormat` must match its source file's name (`400 source_file_format_mismatch` gives `details.expectedFileFormat`). A workspace holds at most 50 open jobs, not counting tasks for people (`keys` jobs and file jobs with a `step`), and creates at most 120 jobs an hour, tasks for people included (`429 organization_job_budget_exceeded`). Send an `Idempotency-Key` header to retry safely. A repeat of the same request returns the first job with `200` and `Idempotent-Replayed: true`. The same key with a different body returns `422 idempotency_key_reused`. Keys are shared with `POST /api/v1/jobs`.



## OpenAPI

````yaml https://public-api.hyperlocalise.com/openapi.yaml post /v1/jobs
openapi: 3.1.0
info:
  title: Hyperlocalise Public API
  version: 1.0.0
  description: >-
    Read projects, Queries, jobs, glossaries, and translation memories from a
    Hyperlocalise workspace; create native projects from project templates and
    manage those templates; define custom project fields and set their values;
    manage the strings, translations, screenshots, and settings of native
    projects; search strings; round-trip bilingual files; update jobs one at a
    time or in bulk; register job-change webhook endpoints; import and export
    glossaries and translation memories; and read the Reports page's reports as
    JSON or CSV.
servers:
  - url: https://public-api.hyperlocalise.com
security:
  - personalAccessToken: []
tags:
  - name: Identity
  - name: Projects
  - name: Project templates
  - name: Custom fields
  - name: Queries
  - name: Jobs
  - name: Strings
  - name: Translations
  - name: Screenshots
  - name: Figma attachments
  - name: Bilingual files
  - name: Glossaries
  - name: Translation memories
  - name: Webhooks
  - name: CDN
  - name: Hyperlab
  - name: Reports
    description: >-
      The Reports page's reports for scripts, BI tools and payment systems.
      Every report needs `reports:read`, which only admins' and localization
      managers' keys hold, and the workspace's Reports feature. Each answer says
      whether recent work is still being counted (`stillUpdating`); figures can
      lag live work by one capture run. A workspace may ask for 30 reports a
      minute, in bursts of 10.
paths:
  /v1/jobs:
    post:
      tags:
        - Jobs
      summary: Create a job
      description: >-
        Requires `jobs:write`. Takes the same body and checks as `POST
        /api/v1/jobs` on the files and jobs host. A `keys` job is a task for
        people on a native project's strings. It starts as `waiting_for_review`
        and is ready to work in the editor. A `string` or `file` job is recorded
        as `queued`. This API does not start AI translation for it. A `file` job
        with `fileInput.step` is a task for a person on that file instead: it
        starts as `waiting_for_review`, or as `queued` when `fileInput.after`
        names a job of the same project that is not yet `succeeded` or
        `cancelled`, and opens when that job is (`400 after_job_not_found` when
        no such job is in the project). A task created here is not analysed for
        Reports until work is saved in it; one created with `POST /api/v1/jobs`
        is. Languages must be enabled on the project. A file job's `fileFormat`
        must match its source file's name (`400 source_file_format_mismatch`
        gives `details.expectedFileFormat`). A workspace holds at most 50 open
        jobs, not counting tasks for people (`keys` jobs and file jobs with a
        `step`), and creates at most 120 jobs an hour, tasks for people included
        (`429 organization_job_budget_exceeded`). Send an `Idempotency-Key`
        header to retry safely. A repeat of the same request returns the first
        job with `200` and `Idempotent-Replayed: true`. The same key with a
        different body returns `422 idempotency_key_reused`. Keys are shared
        with `POST /api/v1/jobs`.
      operationId: createJob
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[\x21-\x7e]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - type
                - projectId
              properties:
                type:
                  type: string
                  enum:
                    - keys
                    - string
                    - file
                projectId:
                  type: string
                  minLength: 1
                  maxLength: 128
                title:
                  type: string
                  minLength: 1
                  maxLength: 256
                description:
                  type: string
                  maxLength: 2048
                dueAt:
                  type: string
                  format: date-time
                ownerEmail:
                  type: string
                  format: email
                  maxLength: 320
                  description: A workspace member's email.
                keysInput:
                  type: object
                  additionalProperties: false
                  required:
                    - sourceLocale
                    - targetLocales
                  description: >-
                    For `type` keys. Pick strings with exactly one of
                    `stringIds`, `keys`, or `tags`. Only visible strings in the
                    project's files are included, at most 5,000.
                  properties:
                    sourceLocale:
                      type: string
                      minLength: 1
                      maxLength: 32
                    targetLocales:
                      type: array
                      minItems: 1
                      maxItems: 20
                      items:
                        type: string
                        minLength: 1
                        maxLength: 32
                    metadata:
                      $ref: '#/components/schemas/JobMetadata'
                    stringIds:
                      type: array
                      minItems: 1
                      maxItems: 5000
                      items:
                        type: string
                        format: uuid
                    keys:
                      type: array
                      minItems: 1
                      maxItems: 5000
                      items:
                        type: string
                        minLength: 1
                        maxLength: 1000
                    tags:
                      type: array
                      minItems: 1
                      maxItems: 10
                      items:
                        $ref: '#/components/schemas/Tag'
                stringInput:
                  type: object
                  additionalProperties: false
                  required:
                    - sourceText
                    - sourceLocale
                    - targetLocales
                  description: For `type` string.
                  properties:
                    sourceText:
                      type: string
                      minLength: 1
                      maxLength: 100000
                    sourceLocale:
                      type: string
                      minLength: 1
                      maxLength: 32
                    targetLocales:
                      type: array
                      minItems: 1
                      maxItems: 20
                      items:
                        type: string
                        minLength: 1
                        maxLength: 32
                    metadata:
                      $ref: '#/components/schemas/JobMetadata'
                    context:
                      type: string
                      maxLength: 20000
                    maxLength:
                      type: integer
                      minimum: 1
                      maximum: 100000
                fileInput:
                  type: object
                  additionalProperties: false
                  required:
                    - sourceFileId
                    - fileFormat
                    - sourceLocale
                    - targetLocales
                  description: >-
                    For `type` file. `sourceFileId` is a file uploaded to the
                    project.
                  properties:
                    sourceFileId:
                      type: string
                      minLength: 1
                      maxLength: 128
                    fileFormat:
                      type: string
                      description: >-
                        The format the file's extension implies, such as json,
                        xliff, po, docx.
                    sourceLocale:
                      type: string
                      minLength: 1
                      maxLength: 32
                    targetLocales:
                      type: array
                      minItems: 1
                      maxItems: 20
                      items:
                        type: string
                        minLength: 1
                        maxLength: 32
                    metadata:
                      $ref: '#/components/schemas/JobMetadata'
                    branch:
                      type: string
                      minLength: 1
                      maxLength: 128
                      description: The project version branch; `main` when left out.
                    step:
                      type: string
                      enum:
                        - post_edit
                        - proofread
                      description: >-
                        Makes the job a task for a person at this step, not AI
                        work.
                    after:
                      type: string
                      minLength: 1
                      maxLength: 128
                      description: >-
                        With `step`: the id of a job in the same project that
                        this task comes after. The task waits as `queued` until
                        that job is marked done or cancelled.
      responses:
        '200':
          description: The job an earlier request with this Idempotency-Key created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedJobResponse'
        '201':
          description: The created job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedJobResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    JobMetadata:
      type: object
      maxProperties: 50
      additionalProperties:
        type: string
        maxLength: 1000
      description: Your own fields on the job. Keys are up to 100 characters.
    Tag:
      type: string
      pattern: ^[A-Za-z0-9_-]{1,64}$
    CreatedJobResponse:
      type: object
      required:
        - job
      properties:
        job:
          type: object
          required:
            - id
            - type
            - status
          properties:
            id:
              type: string
            type:
              type: string
              enum:
                - keys
                - string
                - file
            status:
              type: string
              enum:
                - queued
                - waiting_for_review
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          description: >-
            Structured context, such as the `jobId` that stopped a bulk job
            update.
          additionalProperties: true
  responses:
    BadRequest:
      description: Invalid query parameters or request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The personal access token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The token lacks the required scope or workspace access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The resource is missing or inaccessible.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        The project is not native, the key already exists, the segment is
        locked, the webhook endpoint limit was reached, or the job, memory, or
        glossary is managed elsewhere or archived.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PayloadTooLarge:
      description: >-
        The request body exceeds 256 KiB (16 MiB for a strings batch, 25 MiB for
        a bilingual file or a memory or glossary import).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnsupportedMediaType:
      description: The request body has an unsupported media type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: >-
        The workspace asked for too many reports; `Retry-After` says when to ask
        again.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Authentication or resource storage is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    personalAccessToken:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.