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

# Get Style Guide Association

> Returns the style guide association details for the given entity and language, scoped to the authenticated user's organization. Includes style guide info and the ID of the Style Guide version used. At least one of language or languageId must be provided. languageId is optional and required only for tenants that use custom language variants (for example, Strings). If custom variants are not used, provide only language. When languageId is not provided, language is used as the effective language ID for lookup. When both are provided, languageId is used for lookup. Entity type defaults to PROJECT. When no explicit association exists for the language, falls back to the organization's default Style Guide (styleGuide.isDefault is true in that case); associationId and the audit timestamp/user fields are null in the fallback response since no association row exists.



## OpenAPI

````yaml /openapi/phrase-style-guides.json get /api/v1/styleguides/entities/{entityId}/styleguide-associations
openapi: 3.1.0
info:
  version: 2.1.0
  title: Style Guide API
  description: REST API for managing Style Guides on the Phrase Platform
  contact:
    name: Linguistic Assets
    email: engineering@phrase.com
servers:
  - url: https://eu.phrase.com/styleguide
    description: Production EU
  - url: https://us.phrase.com/styleguide
    description: Production US
security:
  - bearerAuth: []
tags:
  - name: Style Guide
    description: Public API for managing Style Guides
  - name: Rule
    description: Public API for managing Rules
paths:
  /api/v1/styleguides/entities/{entityId}/styleguide-associations:
    get:
      tags:
        - Style Guide
      summary: Get Style Guide Association
      description: >-
        Returns the style guide association details for the given entity and
        language, scoped to the authenticated user's organization. Includes
        style guide info and the ID of the Style Guide version used. At least
        one of language or languageId must be provided. languageId is optional
        and required only for tenants that use custom language variants (for
        example, Strings). If custom variants are not used, provide only
        language. When languageId is not provided, language is used as the
        effective language ID for lookup. When both are provided, languageId is
        used for lookup. Entity type defaults to PROJECT. When no explicit
        association exists for the language, falls back to the organization's
        default Style Guide (styleGuide.isDefault is true in that case);
        associationId and the audit timestamp/user fields are null in the
        fallback response since no association row exists.
      operationId: getStyleGuideAssociation
      parameters:
        - name: entityId
          in: path
          description: Entity ID (e.g. project ID)
          required: true
          schema:
            type: string
        - name: tenant
          in: query
          description: 'Tenant identifier. Allowable values: TMS, Strings, Studio.'
          required: true
          schema:
            type: string
            description: 'Tenant identifier. Allowable values: TMS, Strings, Studio.'
            enum:
              - TMS
              - Strings
              - Studio
            example: TMS
          example: TMS
        - name: entityType
          in: query
          description: >-
            Entity type (e.g., PROJECT). Optional; defaults to PROJECT if
            omitted.
          required: false
          schema:
            type: string
            description: >-
              Entity type (e.g., PROJECT). Optional; defaults to PROJECT if
              omitted.
            enum:
              - PROJECT
              - PROJECT_TEMPLATE
            example: PROJECT
          example: PROJECT
        - name: language
          in: query
          description: >-
            Language code used to create the association. At least one of
            language or languageId must be provided. languageId is optional and
            required only for tenants that use custom language variants (for
            example, Strings). If custom variants are not used, provide only
            language.
          required: false
          schema:
            type: string
            description: >-
              Language code used to create the association. At least one of
              language or languageId must be provided. languageId is optional
              and required only for tenants that use custom language variants
              (for example, Strings). If custom variants are not used, provide
              only language.
            example: en-US
          example: en-US
        - name: languageId
          in: query
          description: >-
            Language identifier (languageId). At least one of language or
            languageId must be provided. languageId is optional and required
            only for tenants that use custom language variants (for example,
            Strings). If custom variants are not used, provide only language.
            When languageId is not provided, language is used for the lookup.
            When both are provided, languageId is used for the lookup.
          required: false
          schema:
            type: string
            description: >-
              Language identifier (languageId). At least one of language or
              languageId must be provided. languageId is optional and required
              only for tenants that use custom language variants (for example,
              Strings). If custom variants are not used, provide only language.
              When languageId is not provided, language is used for the lookup.
              When both are provided, languageId is used for the lookup.
            example: en-US
          example: en-US
      responses:
        '200':
          description: Style guide association details for the association
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicStyleGuideAssociationDetails'
        '400':
          description: >-
            Invalid request (e.g. missing tenant, at least one of
            language/languageId required, invalid tenant or entityType). Error
            codes: VALIDATION_ERROR, INVALID_ARGUMENT,
            MISSING_REQUEST_PARAMETER.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication token
        '403':
          description: 'Forbidden - Insufficient permissions. Error codes: ACCESS_DENIED.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: >-
            No style guide association found for the given parameters. Error
            codes: STYLEGUIDE_ASSOCIATION_NOT_FOUND.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: >-
            Style guide has no versions (data inconsistency). Error codes:
            STYLEGUIDE_HAS_NO_VERSION.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PublicStyleGuideAssociationDetails:
      type: object
      description: >-
        Details of a single Style Guide association: language, style guide,
        association id, timestamps, and audit fields.
      properties:
        language:
          type: string
          description: Language code (BCP 47 or custom)
          example: en-US
        languageId:
          type: string
          description: >-
            Language ID (same as request or derived from language code).
            languageId is optional in request inputs and required only for
            tenants that use custom language variants (for example, Strings). If
            custom variants are not used, callers provide language and language
            is used as the effective language ID.
          example: en-US
        styleGuide:
          $ref: '#/components/schemas/PublicStyleGuideInfo'
          description: Associated Style Guide (id, name, description, language, version).
        associationId:
          type: string
          format: uuid
          description: >-
            UUID of the association (UUID v7). Null when this response was
            resolved via the organization's default Style Guide rather than an
            explicit association.
        createdAt:
          type: string
          format: date-time
          description: >-
            Timestamp when the association was created. Null when this response
            was resolved via the organization's default Style Guide.
          example: '2024-01-15T10:30:00Z'
        lastModifiedAt:
          type: string
          format: date-time
          description: >-
            Timestamp when the association was last modified. Null when this
            response was resolved via the organization's default Style Guide.
          example: '2024-01-15T10:30:00Z'
        createdBy:
          type: string
          description: >-
            User ID of the user who created the association. Null when this
            response was resolved via the organization's default Style Guide.
        lastModifiedBy:
          type: string
          description: >-
            User ID of the user who last modified the association. Null when
            this response was resolved via the organization's default Style
            Guide.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        detail:
          type: string
    PublicStyleGuideInfo:
      type: object
      description: >-
        Summary of the associated Style Guide (id, name, description, language,
        versionId, versionNumber).
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the Style Guide
          example: 018e1234-5678-7890-abcd-ef1234567890
        name:
          type: string
          description: Name of the Style Guide
          example: English Style Guide
          maxLength: 50
        description:
          type: string
          description: Description of the Style Guide
          example: Style guide for English content
          maxLength: 250
        language:
          $ref: '#/components/schemas/SupportedLanguageResponse'
          description: Language details
        versionId:
          type: string
          format: uuid
          description: ID of the Style Guide version used.
          example: 018e1234-5678-7890-abcd-ef1234567891
        versionNumber:
          type: integer
          format: int32
          description: Style Guide version number.
          example: 2
        isDefault:
          type: boolean
          description: Whether this Style Guide is the default for the organization.
          example: true
        latestVersionNumber:
          type: integer
          format: int32
          description: The latest version number of the Style Guide.
          example: 3
    SupportedLanguageResponse:
      type: object
      description: Supported Style Guide language
      properties:
        bcpCode:
          type: string
          description: Language code in BCP-47 format (more specifically RFC 5646 format)
          example: en-GB
        description:
          type: string
          description: Human-readable language name in English
          example: English (United Kingdom)
        region:
          type: string
          description: Region code, or null if not present
          example: gb
        script:
          type: string
          description: Script code when defined, or null
          enum:
            - ARAB
            - ARMN
            - BENG
            - CANS
            - CYRL
            - DEVA
            - GREK
            - GURU
            - HANG
            - HANS
            - HANT
            - HEBR
            - HMNG
            - JPAN
            - KHMR
            - LAOO
            - LATN
            - MONG
            - MTEI
            - MYMR
            - OLCK
            - ORYA
            - PIQD
            - ROHG
            - SIND
            - SYRC
            - TAML
            - TFNG
            - TELU
          example: LATN
        language:
          type: string
          description: ISO 639-1 language code (e.g., 'cs' from 'cs-CZ')
          example: cs
      required:
        - bcpCode
        - description
        - language
  securitySchemes:
    bearerAuth:
      type: http
      description: 'JWT from IDM (Authorization: Bearer <token>)'
      scheme: bearer
      bearerFormat: JWT

````

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