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

# Publish a blog theme version

> Makes a theme version the one the blog renders, and unpublishes the previous one in the same transaction. Any version can be published, so rolling back is publishing an older one. Requires the blog write permission.



## OpenAPI

````yaml /openapi.json post /api/blogThemes.publish
openapi: 3.0.3
info:
  title: Notifuse API
  description: API for Notifuse - a transactional email and newsletter management platform
  version: 1.0.0
  contact:
    name: Notifuse Support
    url: https://www.notifuse.com/support
    email: hello@notifuse.com
  license:
    name: BUSL-1.1
    url: https://github.com/Notifuse/notifuse/blob/main/LICENSE
servers:
  - url: https://{notifuseDomain}
    description: Customer-specific Notifuse API server
    variables:
      notifuseDomain:
        description: Your unique Notifuse domain
        default: demo.notifuse.com
security: []
paths:
  /api/blogThemes.publish:
    post:
      tags:
        - Blog
      summary: Publish a blog theme version
      description: >-
        Makes a theme version the one the blog renders, and unpublishes the
        previous one in the same transaction. Any version can be published, so
        rolling back is publishing an older one. Requires the blog write
        permission.
      operationId: publishBlogTheme
      parameters:
        - name: workspace_id
          in: query
          required: true
          schema:
            type: string
          description: The ID of the workspace. Passed in the query string, not the body.
          example: ws_1234567890
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishBlogThemeRequest'
      responses:
        '200':
          description: Theme version published
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Theme published successfully
        '400':
          description: Bad request - version missing or not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: version must be positive
        '401':
          description: Unauthorized - invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - missing the blog write permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PermissionErrorResponse'
              example:
                error: 'Insufficient permissions: write access to blog required'
                resource: blog
                permission: write
      security:
        - BearerAuth: []
components:
  schemas:
    PublishBlogThemeRequest:
      type: object
      required:
        - version
      properties:
        version:
          type: integer
          example: 4
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    PermissionErrorResponse:
      type: object
      description: >-
        Returned with a 403 when the user or API key lacks the permission the
        endpoint requires.
      properties:
        error:
          type: string
          description: Error message
        resource:
          type: string
          description: The permission resource the endpoint requires.
          example: blog
        permission:
          type: string
          enum:
            - read
            - write
          description: The access level the endpoint requires on that resource.
      required:
        - error
        - resource
        - permission
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API token for authentication

````