> ## 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.

# Link an object to the content group



## OpenAPI

````yaml /openapi/phrase-control-hub.json post /api/v1/public/groups/{groupId}/references
openapi: 3.0.0
info:
  version: 1.0.21
  title: Control Hub Service
  license:
    name: Proprietary
servers:
  - url: https://eu.phrase.com/control-hub/
security: []
tags:
  - name: Groups
    x-displayName: Content Groups
    description: |
      Organisation-scoped generic content groups and their object references.
  - name: Groups references
    x-displayName: Content Group References
    description: >
      Endpoints for managing content group–object references and performing
      reverse lookups.
paths:
  /api/v1/public/groups/{groupId}/references:
    post:
      tags:
        - Groups references
      summary: Link an object to the content group
      operationId: createGroupReference
      parameters:
        - name: groupId
          in: path
          required: true
          description: >-
            Content group identifier. The literal value `SYSTEM` may be used as
            an alias for the organization's SYSTEM content group.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroupReferenceRequest'
      responses:
        '201':
          description: Reference created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupReference'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '422':
          $ref: '#/components/responses/422'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    CreateGroupReferenceRequest:
      type: object
      required:
        - objectType
        - objectUid
      properties:
        objectType:
          $ref: '#/components/schemas/GroupReferenceObjectType'
        objectUid:
          type: string
          description: Identifier of the platform object to link
          minLength: 1
    GroupReference:
      type: object
      required:
        - id
        - groupId
        - objectType
        - objectUid
        - createdAt
        - referenceType
      properties:
        id:
          type: string
          description: Unique identifier of the reference
        groupId:
          type: string
          description: Identifier of the content group this reference belongs to
        objectType:
          $ref: '#/components/schemas/GroupReferenceObjectType'
        objectUid:
          type: string
          description: Identifier of the linked platform object
        createdAt:
          type: string
          description: When the reference was created — timestamp (ISO-8601 format)
        referenceType:
          $ref: '#/components/schemas/ReferenceType'
    GroupReferenceObjectType:
      type: string
      description: >
        Type of platform object being linked.


        `PLATFORM_STYLE_GUIDE`, `TMS_PROJECT` and `TMS_PROJECT_TEMPLATE` cannot
        be linked to the

        organization's SYSTEM content group — the request is rejected with a
        `422` error, code

        `Conflict`. `PLATFORM_QA_CHECK` and `PLATFORM_STYLE_RULE` are
        unaffected.


        A `TMS_PROJECT` and `TMS_PROJECT_TEMPLATE` can only belong to one
        content group at a time.

        Creating a direct reference to a second group is rejected with a `422`
        error, code

        `Conflict`; unlink it from its current group first (`DELETE
        /groups/{groupId}/references/{referenceId}`

        or `DELETE /groups/{groupId}/references`) before linking it to a new
        one.
      enum:
        - PLATFORM_STYLE_GUIDE
        - PLATFORM_STYLE_RULE
        - TMS_PROJECT
        - PLATFORM_QA_CHECK
        - TMS_PROJECT_TEMPLATE
    ReferenceType:
      type: string
      description: >
        Whether the reference belongs to the organization's SYSTEM content group
        (SYSTEM) or

        to a regular, user-created content group (USER). Computed by the server
        from the

        reference's group, never accepted on create requests.
      enum:
        - SYSTEM
        - USER
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          title: Error code
          example: NotBlank/NotFound/Error/...
          type: string
        message:
          title: Error message
          example: Organization UID cannot be null
          type: string
        args:
          title: >-
            Map of error arguments - so they are not needed to be parsed from
            the message
          type: object
          additionalProperties: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorEntry'
          description: list of errors this error consist of
    ErrorEntry:
      required:
        - code
        - message
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
        args:
          type: object
          additionalProperties: true
          description: More information about error
  responses:
    '400':
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '422':
      description: Validation of the input data failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'

````

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