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

# Import TMX or CSV into a translation memory

> Requires `translation-memories:write`, which the `memories:write` token scope grants to admins and localization managers. Native, non-archived memories only. Each unit updates the entry with the same TMX `tuid`, or the same locale pair and source text, and creates one otherwise. At most 10,000 units and 25 MiB. The run appears in the memory's import history.



## OpenAPI

````yaml https://public-api.hyperlocalise.com/openapi.yaml post /v1/translation-memories/{memoryId}/import
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/translation-memories/{memoryId}/import:
    parameters:
      - $ref: '#/components/parameters/MemoryId'
    post:
      tags:
        - Translation memories
      summary: Import TMX or CSV into a translation memory
      description: >-
        Requires `translation-memories:write`, which the `memories:write` token
        scope grants to admins and localization managers. Native, non-archived
        memories only. Each unit updates the entry with the same TMX `tuid`, or
        the same locale pair and source text, and creates one otherwise. At most
        10,000 units and 25 MiB. The run appears in the memory's import history.
      operationId: importTranslationMemory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - format
                - content
              properties:
                format:
                  type: string
                  enum:
                    - tmx
                    - csv
                content:
                  type: string
                sourceFilename:
                  type: string
                  maxLength: 512
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                format:
                  type: string
                  enum:
                    - tmx
                    - csv
                  description: Defaults to the file extension.
      responses:
        '201':
          description: Import result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - import
                properties:
                  import:
                    $ref: '#/components/schemas/MemoryImportResult'
        '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'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    MemoryId:
      name: memoryId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    MemoryImportResult:
      type: object
      required:
        - importAttemptId
        - importBatchId
        - totalRead
        - created
        - updated
        - warned
        - failed
        - headerSrclang
        - issues
      properties:
        importAttemptId:
          type: string
          format: uuid
        importBatchId:
          type: string
          format: uuid
        totalRead:
          type: integer
          minimum: 0
        created:
          type: integer
          minimum: 0
        updated:
          type: integer
          minimum: 0
        warned:
          type: integer
          minimum: 0
        failed:
          type: integer
          minimum: 0
        headerSrclang:
          type:
            - string
            - 'null'
        issues:
          type: array
          items:
            type: object
            required:
              - severity
              - code
              - message
            properties:
              severity:
                type: string
                enum:
                  - warning
                  - error
              code:
                type: string
              message:
                type: string
              unitIndex:
                type: integer
              tuid:
                type: string
    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'
    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.