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

# Convert Markdown to Slack Block Kit

> Converts Markdown into Slack Block Kit JSON and a Block Kit Builder preview URL. Requires a **Basic** license. This route is rate limited.



## OpenAPI

````yaml /api-reference/utilities/openapi.json post /slack/convert
openapi: 3.1.0
info:
  title: Magic Meal Kits — Utilities API
  version: 1.0.0
  description: >-
    Single-purpose helper endpoints: sandboxed JavaScript execution, JSON
    extraction from mixed text, ISO 8601 duration formatting, and Markdown →
    Slack Block Kit conversion.
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://{deployment}/api/v1
    description: Your Magic Meal Kits deployment
    variables:
      deployment:
        default: magic-meal-kits-xxxxx.run.app
        description: Your Cloud Run host (without protocol)
security:
  - ApiKeyAuth: []
tags:
  - name: JavaScript
    description: Execute JavaScript in a sandbox.
  - name: JSON
    description: Extract JSON from mixed text content.
  - name: ISO 8601
    description: Format and decompose ISO 8601 durations.
  - name: Slack
    description: Convert Markdown to Slack Block Kit.
paths:
  /slack/convert:
    post:
      tags:
        - Slack
      summary: Convert Markdown to Slack Block Kit
      description: >-
        Converts Markdown into Slack Block Kit JSON and a Block Kit Builder
        preview URL. Requires a **Basic** license. This route is rate limited.
      operationId: convertMarkdownToSlack
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlackConvertRequest'
            example:
              markdown: |-
                # Release notes
                - Fixed login
                - **Faster** search
              version: v1
              enableHeadingDividers: true
      responses:
        '200':
          description: Slack blocks + preview URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackConvertResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SlackConvertRequest:
      type: object
      required:
        - markdown
      properties:
        markdown:
          type: string
          description: Markdown to convert.
        version:
          type: string
          default: v1
          description: Converter version.
        enableHeadingDividers:
          type: boolean
          description: Insert dividers under headings.
        limitBlocks:
          type: boolean
          description: Cap the number of emitted blocks.
    SlackConvertResponse:
      type: object
      properties:
        success:
          type: boolean
        result:
          type: object
          properties:
            blockKitUrl:
              type: string
              description: Block Kit Builder preview URL.
            blocks:
              type: array
              items:
                type: object
              description: Slack Block Kit blocks.
        timestamp:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your deployment's API key (MMK_API_KEY). Routes that accept OAuth2 also
        allow `Authorization: Bearer <token>`.

````