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

# Sync templates

> Force template status update with Meta

## Overview

Forces template synchronization with Meta, updating statuses (`PENDING`, `APPROVED`, `REJECTED`) and other template information locally.

Useful when you've created or edited a template and want to check if Meta has already updated the approval status.

<Note>
  The `wabaId` is obtained from the [List WABAs](/en/templates/list-businesses) endpoint.
</Note>


## OpenAPI

````yaml en/templates/openapi.json POST /whatsapp/businesses/{wabaId}/templates/sync
openapi: 3.1.0
info:
  title: Hub Message - Templates API
  description: API for managing WhatsApp Business message templates
  version: 1.0.0
servers:
  - url: https://api.hubmessage.io
security:
  - bearerAuth: []
paths:
  /whatsapp/businesses/{wabaId}/templates/sync:
    post:
      tags:
        - Templates
      summary: Sync templates
      description: >-
        Forces synchronization of templates with Meta, updating statuses
        (PENDING, APPROVED, REJECTED) and other information.
      operationId: syncTemplates
      parameters:
        - name: wabaId
          in: path
          required: true
          description: WABA ID (obtained via List WABAs)
          schema:
            type: string
            example: '428083093730937'
      responses:
        '200':
          description: Synchronization completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncResponse'
              example:
                data:
                  - id: '1900296177408890'
                    name: confirm_account
                    status: APPROVED
                    category: AUTHENTICATION
                    language: en_US
                    parameter_format: POSITIONAL
                    message_send_ttl_seconds: 600
                    components:
                      - type: BODY
                        text: >-
                          Your verification code is *{{1}}*. For your security,
                          do not share it.
                        add_security_recommendation: true
                        example:
                          body_text:
                            - - '123456'
                syncedCount: 2
                synced: true
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SyncResponse:
      type: object
      properties:
        data:
          type: array
          description: List of synced templates
          items:
            $ref: '#/components/schemas/Template'
        syncedCount:
          type: integer
          description: Number of synced templates
        synced:
          type: boolean
          description: Indicates whether the synchronization was successful
    Template:
      type: object
      properties:
        id:
          type: string
          description: Template ID
        name:
          type: string
          description: Template name
        status:
          type: string
          description: Approval status
          enum:
            - PENDING
            - APPROVED
            - REJECTED
        category:
          type: string
          description: Template category
          enum:
            - UTILITY
            - MARKETING
            - AUTHENTICATION
        language:
          type: string
          description: Template language (e.g. en_US, pt_BR)
        parameter_format:
          type: string
          description: Parameter format
        message_send_ttl_seconds:
          type: integer
          description: Message time-to-live in seconds
        components:
          type: array
          description: Template components (HEADER, BODY, FOOTER, BUTTONS)
          items:
            type: object
    Error:
      type: object
      properties:
        error:
          type: integer
          description: Error code
        message:
          type: string
          description: Error description
  responses:
    Unauthorized:
      description: Invalid or missing token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 401
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Secret Key generated in the Hub Message Security panel

````