> ## 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 a Style Guide (v2)

> Creates a Style Guide from a Markdown file with a Content Group. Returns 202 with a jobId; poll the **Get create job status** API for the final result.



## OpenAPI

````yaml /openapi/phrase-style-guides.json post /api/v2/styleguides
openapi: 3.1.0
info:
  version: 1.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/v2/styleguides:
    post:
      tags:
        - Style Guide
      summary: Create a Style Guide (v2)
      description: >-
        Creates a Style Guide from a Markdown file with a Content Group. Returns
        202 with a jobId; poll the **Get create job status** API for the final
        result.
      operationId: createStyleGuideV2
      parameters:
        - name: language
          in: query
          description: Language locale code (e.g., en, en-GB, sv-SE)
          required: true
          schema:
            type: string
            minLength: 1
        - name: name
          in: query
          description: Name for the initial version
          required: true
          schema:
            type: string
            maxLength: 50
            minLength: 0
        - name: description
          in: query
          description: Description for the initial version
          required: false
          schema:
            type: string
            maxLength: 250
            minLength: 0
        - name: includeVersions
          in: query
          description: >-
            Whether to include versions in the Style Guide response when polling
            the async create job status
          required: false
          schema:
            type: boolean
            default: false
        - name: contentGroupId
          in: query
          description: ID of the Content Group to be associated with the Style Guide.
          required: true
          schema:
            type: string
            minLength: 1
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 'Style Guide file in Markdown format. Maximum size: 150 KiB.'
              required:
                - file
      responses:
        '202':
          description: Job accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StyleGuideAsyncAcceptedResponse'
        '400':
          description: >-
            Invalid request data or file. Error codes: VALIDATION_ERROR,
            INVALID_ARGUMENT, MISSING_REQUEST_PARAMETER, UNSUPPORTED_FILE_TYPE,
            UNSUPPORTED_FILE_EXTENSION.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized — invalid or missing authentication token
        '403':
          description: 'Forbidden — MANAGE right required. 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'
        '409':
          description: >-
            Conflict. Error codes: DUPLICATE_STYLEGUIDE_NAME,
            DUPLICATE_CONTENT_GROUP_LANGUAGE, API_VERSION_NOT_AVAILABLE,
            STYLE_GUIDE_LIMIT_REACHED.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: 'File too large. Error codes: FILE_SIZE_EXCEEDED.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    StyleGuideAsyncAcceptedResponse:
      type: object
      description: Accepted response for an async Style Guide operation
      properties:
        jobId:
          type: string
          description: Job identifier; use this to poll the job-status endpoint
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
      required:
        - jobId
    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

````