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

# Create translation memory

> Creates a new translation memory. At least one target language must be provided.
Optional associations (client, domain, subDomain, businessUnit) are resolved by ID.
Requires the caller to have the transMemoryCreate access right.



## OpenAPI

````yaml /openapi/phrase-tms-v1.json post /api2/v1/transMemories
openapi: 3.0.0
info:
  description: |-
    Welcome to Phrase's TMS API documentation. 

     Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. 

     If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). 

     Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers:
     > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact)
  version: '1'
  title: Phrase TMS API
servers:
  - url: https://cloud.memsource.com/web
security:
  - ApiToken: []
  - OAuth2: []
tags:
  - name: Additional Workflow Step
  - name: Analysis
  - name: Async Request
  - name: Authentication
  - name: Automations
  - name: Bilingual File
  - name: Business Unit
  - name: Buyer
  - name: Client
  - name: Connector
  - name: Conversations
  - name: Cost Center
  - name: Custom Fields
  - name: Custom File Type
  - name: Domain
  - name: Due Date Scheme
  - name: Email Template
  - name: File
  - name: Glossary
  - name: Import settings
  - name: Job
  - name: Language AI
  - name: Language Assets
  - name: Language Quality Assessment
  - name: Machine Translation
  - name: Machine Translation Settings
  - name: Mapping
  - name: Net Rate Scheme
  - name: Notifications
  - name: Price List
  - name: Project
  - name: Project Template
  - name: Provider
  - name: Quality Assurance
  - name: Quality Profile
  - name: Quote
  - name: Reference File
  - name: SCIM
  - name: Segment
  - name: Segmentation Rules
  - name: Service
  - name: Spell Check
  - name: SubDomain
  - name: Supported Languages
  - name: Term Base
  - name: Translation
  - name: Translation Memory
  - name: User
  - name: Vendor
  - name: Webhook
  - name: Workflow Step
  - name: XML Assistant
paths:
  /api2/v1/transMemories:
    post:
      tags:
        - Translation Memory
      summary: Create translation memory
      description: >-
        Creates a new translation memory. At least one target language must be
        provided.

        Optional associations (client, domain, subDomain, businessUnit) are
        resolved by ID.

        Requires the caller to have the transMemoryCreate access right.
      operationId: createTransMemory
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransMemoryCreateDtoV1'
        description: Translation memory creation request
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransMemoryDtoV1'
        '400':
          description: Bad Request
        '401':
          description: Not authorized
        '403':
          description: Forbidden
        '404':
          description: Resource not found
        '405':
          description: Method not allowed
        '408':
          description: Timeout
        '410':
          description: Gone
        '415':
          description: Unsupported media type
        '429':
          description: Too many requests
        '500':
          description: Internal server error
        '501':
          description: Not implemented
components:
  schemas:
    TransMemoryCreateDtoV1:
      type: object
      required:
        - name
        - sourceLang
        - targetLangs
      properties:
        businessUnit:
          $ref: '#/components/schemas/IdReference'
        client:
          $ref: '#/components/schemas/IdReference'
        domain:
          $ref: '#/components/schemas/IdReference'
        name:
          type: string
          description: Display name of the new translation memory
          minLength: 0
          maxLength: 255
        note:
          type: string
          description: Optional note or description (max 4096 characters)
          minLength: 0
          maxLength: 4096
        sourceLang:
          type: string
          description: Source language locale
        subDomain:
          $ref: '#/components/schemas/IdReference'
        targetLangs:
          type: array
          description: List of target language locales; at least one is required
          items:
            type: string
      description: >-
        Request body for creating a translation memory; requires a name, source
        lang and target langs
    TransMemoryDtoV1:
      type: object
      properties:
        businessUnit:
          $ref: '#/components/schemas/BusinessUnitReferenceV1'
        client:
          $ref: '#/components/schemas/ClientReferenceV1'
        createdBy:
          $ref: '#/components/schemas/UserReferenceV1'
        dateCreated:
          type: string
          format: date-time
          description: Date the translation memory was created
        domain:
          $ref: '#/components/schemas/DomainReferenceV1'
        id:
          type: string
          description: String representation of the internal TM database ID
        internalId:
          type: integer
          format: int32
          description: Internal numeric ID of the translation memory
        name:
          type: string
          description: Display name of the translation memory
        note:
          type: string
          description: Optional note or description for the translation memory
        owner:
          $ref: '#/components/schemas/UserReferenceV1'
        sourceLang:
          type: string
          description: Source language locale
        subDomain:
          $ref: '#/components/schemas/SubDomainReferenceV1'
        targetLangs:
          type: array
          description: List of target language locales
          items:
            type: string
        uid:
          type: string
          description: Unique identifier (UID) of the translation memory
      description: Translation memory resource returned by get, create and edit endpoints
    IdReference:
      type: object
      required:
        - id
      properties:
        id:
          type: string
    BusinessUnitReferenceV1:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        uid:
          type: string
    ClientReferenceV1:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        uid:
          type: string
    UserReferenceV1:
      type: object
      properties:
        email:
          type: string
          description: Email address of the user
        firstName:
          type: string
          description: First name of the user
        id:
          type: string
          description: Unique numeric identifier of the user
        lastName:
          type: string
          description: Last name of the user
        role:
          type: string
          description: Role of the user in the organization
          enum:
            - SYS_ADMIN
            - SYS_ADMIN_READ
            - ADMIN
            - PROJECT_MANAGER
            - LINGUIST
            - GUEST
            - SUBMITTER
            - PORTAL_MEMBER
            - BOT
        uid:
          type: string
          description: Unique string identifier of the user
        userName:
          type: string
          description: Username of the user
    DomainReferenceV1:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        uid:
          type: string
    SubDomainReferenceV1:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        uid:
          type: string
  securitySchemes:
    ApiToken:
      description: >-
        Get a token from `auth/login` [endpoint](#operation/login) and then pass
        it in the `Authorization` HTTP header in every subsequent API call. For
        more information visit our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#token-0-0).
      type: apiKey
      name: Authorization
      in: header
    OAuth2:
      description: >-
        A standard OAuth 2.0 authorization code flow. For more information visit
        our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#oauth-2-0-0-1).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.memsource.com/web/oauth/authorize
          tokenUrl: https://cloud.memsource.com/web/oauth/token
          scopes: {}

````