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

# Unpublish Template

> Unpublishes a WhatsApp Template

This endpoint lets you unpublish a WhatsApp Template from one or more WhatsApp Business Accounts.


## OpenAPI

````yaml api-reference/openapi.json post /api/v1/whatsapp-templates/{id}/publish/
openapi: 3.0.3
info:
  title: Wassist API
  version: 1.0.0
  description: API for building WhatsApp AI agents
servers:
  - url: https://backend.wassist.app
    description: Production
  - url: http://localhost:8050
    description: Development
security: []
tags:
  - name: Agents
    description: Create and manage AI agents
  - name: Conversations
    description: Chat conversations and messages
  - name: WhatsApp
    description: WhatsApp Business account management
  - name: Contacts
    description: Contact management
  - name: Integrations
    description: Third-party integrations
paths:
  /api/v1/whatsapp-templates/{id}/publish/:
    post:
      tags:
        - api
      description: |-
        Publish a template to one or more WhatsApp Business Accounts.

        Creates the template on Meta's API for each account and creates
        a WhatsAppTemplateAccountLink to track the status.
      operationId: api_v1_whatsapp_templates_publish_create
      parameters:
        - in: path
          name: id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishTemplateInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateLocal'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    PublishTemplateInput:
      type: object
      description: Input for publishing a template to one or more accounts.
      properties:
        accountIds:
          type: array
          items:
            type: string
            format: uuid
          description: List of WhatsApp Business Account IDs to publish the template to
          minItems: 1
      required:
        - accountIds
    WhatsAppTemplateLocal:
      type: object
      description: Serializer for local WhatsApp templates with account links.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 512
        category:
          $ref: '#/components/schemas/WhatsAppTemplateLocalCategoryEnum'
        language:
          type: string
          maxLength: 10
        parameterFormat:
          type: string
        components: {}
        accountLinks:
          type: array
          items:
            $ref: '#/components/schemas/WhatsAppTemplateAccountLink'
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - accountLinks
        - category
        - createdAt
        - id
        - name
        - parameterFormat
        - updatedAt
    WhatsAppTemplateLocalCategoryEnum:
      enum:
        - UTILITY
        - MARKETING
        - AUTHENTICATION
      type: string
      description: |-
        * `UTILITY` - Utility
        * `MARKETING` - Marketing
        * `AUTHENTICATION` - Authentication
    WhatsAppTemplateAccountLink:
      type: object
      description: Serializer for template-to-account links with status tracking.
      properties:
        accountId:
          type: string
          format: uuid
          readOnly: true
        accountName:
          type: string
          readOnly: true
        wabaId:
          type: string
          readOnly: true
        metaTemplateId:
          type: string
          readOnly: true
        status:
          $ref: '#/components/schemas/WhatsAppTemplateAccountLinkStatusEnum'
        qualityScore:
          type: string
          readOnly: true
        rejectionReason:
          type: string
          readOnly: true
      required:
        - accountId
        - accountName
        - metaTemplateId
        - qualityScore
        - rejectionReason
        - wabaId
    WhatsAppTemplateAccountLinkStatusEnum:
      enum:
        - DRAFT
        - PENDING
        - APPROVED
        - REJECTED
        - PAUSED
      type: string
      description: |-
        * `DRAFT` - Draft
        * `PENDING` - Pending
        * `APPROVED` - Approved
        * `REJECTED` - Rejected
        * `PAUSED` - Paused
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication. Pass your API key in the X-API-Key header.

````