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

# Export a Content Group's Rules as Markdown

> Exports every Rule in scope as a downloadable Markdown file: a top-level heading
naming the Content Group, followed by a single table with columns Rule, Language,
Enabled, and AI Check. Not paginated or filterable — every Rule in scope is included.

Pass a real Content Group ID to export only the Rules linked to that group (directly,
or via a Rule's "linked to all Content Groups" flag). Pass the sentinel value
`all-groups` to export only the Rules linked to all Content Groups instead (not
every Rule in the organization), backing the "All Groups" system Content Group's
export — its heading reads "All Groups".




## OpenAPI

````yaml /openapi/phrase-style-guides.json get /api/v1/rules/{contentGroupId}/export
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/rules/{contentGroupId}/export:
    get:
      tags:
        - Rule
      summary: Export a Content Group's Rules as Markdown
      description: >
        Exports every Rule in scope as a downloadable Markdown file: a top-level
        heading

        naming the Content Group, followed by a single table with columns Rule,
        Language,

        Enabled, and AI Check. Not paginated or filterable — every Rule in scope
        is included.


        Pass a real Content Group ID to export only the Rules linked to that
        group (directly,

        or via a Rule's "linked to all Content Groups" flag). Pass the sentinel
        value

        `all-groups` to export only the Rules linked to all Content Groups
        instead (not

        every Rule in the organization), backing the "All Groups" system Content
        Group's

        export — its heading reads "All Groups".
      operationId: exportContentGroupRules
      parameters:
        - name: contentGroupId
          in: path
          description: Content Group ID, or the sentinel value `all-groups`
          required: true
          schema:
            type: string
          example: all-groups
      responses:
        '200':
          description: Markdown export returned successfully
          content:
            text/markdown: {}
        '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: 'Content group not found. Error codes: CONTENT_GROUP_NOT_FOUND.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        detail:
          type: string
  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.