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

# Publish Leaf



## OpenAPI

````yaml https://app.usequanta.com/openapi/quanta-services-api/openapi.json post /admin_api/leaves/publish
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://app.usequanta.com
    description: Production
security:
  - HTTPBearer: []
paths:
  /admin_api/leaves/publish:
    post:
      tags:
        - leaf_admin
        - quanta-services-api
      summary: Publish Leaf
      operationId: publish_leaf
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishLeafRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeafVersionResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    PublishLeafRequest:
      properties:
        slug:
          type: string
          minLength: 1
          title: Slug
        scope:
          $ref: '#/components/schemas/LeafScope'
        body_md:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Md
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      additionalProperties: false
      type: object
      required:
        - slug
        - scope
        - body_md
      title: PublishLeafRequest
    LeafVersionResponse:
      properties:
        qid:
          type: string
          title: Qid
        leaf_qid:
          type: string
          title: Leaf Qid
        version_no:
          type: integer
          title: Version No
        body_md:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Md
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        created_by:
          type: string
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - qid
        - leaf_qid
        - version_no
        - body_md
        - reason
        - created_by
        - created_at
      title: LeafVersionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LeafScope:
      type: string
      enum:
        - GENERIC
        - CURRENT_ORG
      title: LeafScope
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Quanta Services API scoped bearer token. Supported only on Services API
        routes.

````

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