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

# Commit Template

> Commit the current draft version, making it live. All draft changes across all channels and variants are published as a new version.

For WhatsApp and SMS (DLT) variants, committing moves them to **Approval Pending** state instead of going live immediately.




## OpenAPI

````yaml PATCH /v2/{workspace}/template/{template_slug}/commit/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v2/{workspace}/template/{template_slug}/commit/:
    patch:
      summary: Commit Template
      description: >
        Commit the current draft version, making it live. All draft changes
        across all channels and variants are published as a new version.


        For WhatsApp and SMS (DLT) variants, committing moves them to **Approval
        Pending** state instead of going live immediately.
      operationId: commit-template-v2
      parameters:
        - in: path
          name: workspace
          required: true
          schema:
            type: string
        - in: path
          name: template_slug
          required: true
          schema:
            type: string
        - in: query
          name: commit_message
          schema:
            type: string
          description: Description of changes in this version.
      requestBody:
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: >-
            Template committed successfully. Returns the updated template
            detail.
          content:
            application/json:
              schema:
                type: object
              example:
                $schema: https://schema.suprsend.com/template/v2/schema.json
                slug: order-confirmed
                created_at: '2026-04-07T10:39:28.502737Z'
                last_triggered_at: null
                name: Order Confirmed
                description: Sent when an order is placed
                tags:
                  - transactional
                enabled_channels:
                  - email
                  - sms
                status: active
                version_no: 3
                hash: >-
                  637edaabc624d09db3793829ea872a3516ed0362ce79ee3875607fc7317381b9
                commit_message: Updated subject line for Q2 campaign
                active_at: '2026-04-08T12:00:00.000000Z'
                updated_at: '2026-04-08T12:00:00.000000Z'
                updated_by:
                  name: Dana Lee
                  email: dana.lee@example.com
                channels:
                  - channel: email
                    is_active: true
                    variants_count: 2
                  - channel: sms
                    is_active: true
                    variants_count: 1
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - ServiceTokenAuth: []
      servers:
        - url: https://management-api.suprsend.com
      x-codeSamples:
        - lang: cURL
          label: Commit Template
          source: >
            curl -X PATCH
            "https://management-api.suprsend.com/v2/{workspace}/template/{template_slug}/commit/?commit_message=Updated%20copy"
            \
              --header 'Authorization: ServiceToken <token>' \
              --header 'Content-Type: application/json' \
              --data '{}'
components:
  responses:
    AuthenticationError:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            error_code: authentication_failed
            type: AuthenticationFailed
            message: Invalid service token.
            detail: Invalid service token.
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 404
            error_code: not_found
            type: NotFound
            message: workspace 'demo' not found
            detail: workspace 'demo' not found
  schemas:
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        error_code:
          type: string
          description: Specific error code identifier
        type:
          type: string
          description: Error type classification
        message:
          type: string
          description: Human-readable error message
        detail:
          type: string
          description: Additional error details
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: ServiceToken <token>
      description: >-
        You can get Service Token from [SuprSend dashboard -> Account Settings
        -> Service
        Tokens](https://app.suprsend.com/en/account-settings/service-tokens)
        section.

````