iZap.ai Whatsapp Templates API

Manage WhatsApp message templates: draft them locally, submit them to Meta for review and sync approval status back.

GitHub OpenAPI

Operations 7

GET /api/v1/whatsapp_templates List message templates #
POST /api/v1/whatsapp_templates Create a message template #
POST /api/v1/whatsapp_templates/sync Sync template status from Meta #
DELETE /api/v1/whatsapp_templates/{template_id} Delete a message template #
GET /api/v1/whatsapp_templates/{template_id} Retrieve a message template #
PATCH /api/v1/whatsapp_templates/{template_id} Update a message template #
POST /api/v1/whatsapp_templates/{template_id}/submit Submit a template for review #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/izap-ai:izap-ai-whatsapp-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

izap-ai-whatsapp-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@izap.ai
    name: iZap API Support
  description: Public REST API for the iZap WhatsApp business messaging platform.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  title: iZap Whatsapp Templates API
  version: v1
servers:
- description: Production
  url: https://api.izap.ai
- description: Staging
  url: https://api-staging.izap.ai
tags:
- description: 'Manage WhatsApp message templates: draft them locally, submit them to Meta for review and sync approval status back.'
  name: whatsapp-templates
paths:
  /api/v1/whatsapp_templates:
    get:
      description: Returns the business's WhatsApp message templates, optionally filtered by review status.
      operationId: listWhatsAppTemplates
      parameters:
      - in: query
        name: status
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/TemplateStatus'
          - type: 'null'
          title: Status
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: List message templates
      tags:
      - whatsapp-templates
    post:
      description: Creates a template as a local draft. A draft cannot be used for sending until it has been submitted to Meta and approved.
      operationId: createWhatsAppTemplate
      parameters:
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppTemplateCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateOut'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Create a message template
      tags:
      - whatsapp-templates
  /api/v1/whatsapp_templates/sync:
    post:
      description: Pulls the current review status of the business's templates from Meta and updates the stored copies, so templates approved or rejected on Meta's side become visible here.
      operationId: syncWhatsAppTemplates
      parameters:
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateSyncResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Sync template status from Meta
      tags:
      - whatsapp-templates
  /api/v1/whatsapp_templates/{template_id}:
    delete:
      description: Deletes the template. Messages already sent with it are unaffected.
      operationId: deleteWhatsAppTemplate
      parameters:
      - in: path
        name: template_id
        required: true
        schema:
          format: uuid
          title: Template Id
          type: string
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Delete a message template
      tags:
      - whatsapp-templates
    get:
      description: Returns one template, including its body, variables and current review status.
      operationId: getWhatsAppTemplate
      parameters:
      - in: path
        name: template_id
        required: true
        schema:
          format: uuid
          title: Template Id
          type: string
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateOut'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Retrieve a message template
      tags:
      - whatsapp-templates
    patch:
      description: Updates a template. Its content can only be changed while the template is still a local draft or has been rejected — an approved template has to be replaced by a new one.
      operationId: updateWhatsAppTemplate
      parameters:
      - in: path
        name: template_id
        required: true
        schema:
          format: uuid
          title: Template Id
          type: string
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WhatsAppTemplateUpdate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateOut'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Update a message template
      tags:
      - whatsapp-templates
  /api/v1/whatsapp_templates/{template_id}/submit:
    post:
      description: Submits the template to Meta for approval. Review is asynchronous — poll the template, or sync from Meta, to see the outcome.
      operationId: submitWhatsAppTemplate
      parameters:
      - in: path
        name: template_id
        required: true
        schema:
          format: uuid
          title: Template Id
          type: string
      - in: header
        name: business-id
        required: true
        schema:
          format: uuid
          title: Business-Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppTemplateOut'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Missing or invalid credentials.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The credential is valid but not authorized for this action.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: The resource, or the business named in the request, does not exist.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unexpected error.
      security:
      - bearerAuth: []
      summary: Submit a template for review
      tags:
      - whatsapp-templates
components:
  schemas:
    ApiError:
      description: 'The response body of a handled API error.


        ``detail`` is either a plain string (FastAPI''s default for an

        ``HTTPException`` raised with a string, and for the ``default`` fastapi-users

        messages like ``"Not authenticated"``) or the structured

        :class:`ApiErrorDetail` object described above. ``code`` is present only on

        the top-level shape ``aizap.core.exceptions.AppException`` produces for its

        own 5xx responses (``"INTERNAL_ERROR"`` / ``"DB_ERROR"``); it does not

        duplicate the ``code`` nested inside a structured ``detail``.'
      properties:
        code:
          anyOf:
          - type: string
          - type: 'null'
          default: null
          title: Code
        detail:
          anyOf:
          - type: string
          - $ref: '#/components/schemas/ApiErrorDetail'
          title: Detail
      required:
      - detail
      title: ApiError
      type: object
    TemplateStatus:
      description: 'Lifecycle/approval status of a template.


        DRAFT is local-only (not yet submitted to Meta). The remaining values mirror

        the statuses returned by the WhatsApp Cloud API.'
      enum:
      - draft
      - pending
      - approved
      - rejected
      - paused
      - disabled
      title: TemplateStatus
      type: string
    TemplateListResponse:
      properties:
        templates:
          items:
            $ref: '#/components/schemas/WhatsAppTemplateOut'
          title: Templates
          type: array
        total_count:
          title: Total Count
          type: integer
      required:
      - templates
      - total_count
      title: TemplateListResponse
      type: object
    TemplateCategory:
      description: WhatsApp/Meta template category. Drives approval rules and pricing.
      enum:
      - marketing
      - utility
      - authentication
      title: TemplateCategory
      type: string
    ApiErrorDetail:
      additionalProperties: true
      description: 'The structured ``detail`` object some error responses carry.


        Several handlers (the REST API plan gate, the free-tier limits, the

        webhooks entitlement gate, the closed customer-service window) raise

        ``HTTPException(detail={"code": ..., "message": ..., ...})`` — a fixed

        ``code``/``message`` pair plus extra fields specific to that error.

        ``extra="allow"`` keeps those fields in the documented shape instead of

        dropping them.'
      properties:
        code:
          title: Code
          type: string
        message:
          title: Message
          type: string
      required:
      - code
      - message
      title: ApiErrorDetail
      type: object
    TemplateButtonOut:
      description: Stored/returned button. Label length is uncapped so synced templates can be listed.
      properties:
        flow_action:
          anyOf:
          - type: string
          - type: 'null'
          title: Flow Action
        flow_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Flow Id
        navigate_screen:
          anyOf:
          - type: string
          - type: 'null'
          title: Navigate Screen
        phone_number:
          anyOf:
          - type: string
          - type: 'null'
          title: Phone Number
        text:
          default: ''
          title: Text
          type: string
        type:
          description: QUICK_REPLY | URL | PHONE_NUMBER | VOICE_CALL | FLOW | REQUEST_CONTACT_INFO | ORDER_DETAILS | COPY_CODE | OTP
          title: Type
          type: string
        url:
          anyOf:
          - type: string
          - type: 'null'
          title: Url
      required:
      - type
      title: TemplateButtonOut
      type: object
    WhatsAppTemplateCreate:
      properties:
        body_text:
          maxLength: 1024
          minLength: 1
          title: Body Text
          type: string
        buttons:
          items:
            $ref: '#/components/schemas/TemplateButton'
          title: Buttons
          type: array
        call_permission_request:
          default: false
          description: Add Meta's call permission request component (marketing/utility only, no buttons).
          title: Call Permission Request
          type: boolean
        category:
          $ref: '#/components/schemas/TemplateCategory'
          default: utility
        display_name:
          anyOf:
          - maxLength: 512
            type: string
          - type: 'null'
          title: Display Name
        example_variables:
          items:
            type: string
          title: Example Variables
          type: array
        footer_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Footer Text
        header_format:
          $ref: '#/components/schemas/TemplateHeaderFormat'
          default: none
        header_media_document_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          title: Header Media Document Id
        header_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Header Text
        language:
          default: pt_BR
          maxLength: 10
          title: Language
          type: string
        name:
          maxLength: 512
          minLength: 1
          pattern: ^[a-z0-9_]+$
          title: Name
          type: string
        waba_id:
          anyOf:
          - maxLength: 64
            minLength: 1
            type: string
          - type: 'null'
          title: Waba Id
      required:
      - name
      - body_text
      title: WhatsAppTemplateCreate
      type: object
    TemplateButton:
      description: 'A single template button.


        ``type`` is one of QUICK_REPLY, URL, PHONE_NUMBER, VOICE_CALL, FLOW, REQUEST_CONTACT_INFO, ORDER_DETAILS. URL/PHONE_NUMBER

        buttons carry the corresponding ``url``/``phone_number`` field; FLOW buttons carry

        ``flow_id`` and, when navigating, ``navigate_screen``. REQUEST_CONTACT_INFO has no

        ``text`` because Meta sets its label. Combination rules are checked

        on submission by ``validate_for_submission``.'
      properties:
        flow_action:
          anyOf:
          - enum:
            - navigate
            - data_exchange
            type: string
          - type: 'null'
          title: Flow Action
        flow_id:
          anyOf:
          - maxLength: 64
            type: string
          - type: 'null'
          title: Flow Id
        navigate_screen:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          title: Navigate Screen
        phone_number:
          anyOf:
          - maxLength: 20
            type: string
          - type: 'null'
          title: Phone Number
        text:
          default: ''
          maxLength: 25
          title: Text
          type: string
        type:
          description: QUICK_REPLY | URL | PHONE_NUMBER | VOICE_CALL | FLOW | REQUEST_CONTACT_INFO | ORDER_DETAILS
          title: Type
          type: string
        url:
          anyOf:
          - maxLength: 2000
            type: string
          - type: 'null'
          title: Url
      required:
      - type
      title: TemplateButton
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    TemplateHeaderFormat:
      enum:
      - none
      - text
      - image
      - video
      - document
      title: TemplateHeaderFormat
      type: string
    TemplateSyncResponse:
      description: Result of a sync against the WhatsApp Cloud backend.
      properties:
        created:
          title: Created
          type: integer
        message:
          title: Message
          type: string
        pruned:
          default: 0
          title: Pruned
          type: integer
        synced:
          title: Synced
          type: integer
        unchanged:
          default: 0
          title: Unchanged
          type: integer
        updated:
          title: Updated
          type: integer
      required:
      - synced
      - created
      - updated
      - message
      title: TemplateSyncResponse
      type: object
    WhatsAppTemplateOut:
      properties:
        body_text:
          maxLength: 1024
          minLength: 1
          title: Body Text
          type: string
        business_id:
          format: uuid
          title: Business Id
          type: string
        buttons:
          items:
            $ref: '#/components/schemas/TemplateButtonOut'
          title: Buttons
          type: array
        call_permission_request:
          default: false
          description: Add Meta's call permission request component (marketing/utility only, no buttons).
          title: Call Permission Request
          type: boolean
        category:
          $ref: '#/components/schemas/TemplateCategory'
          default: utility
        created:
          format: date-time
          title: Created
          type: string
        display_name:
          anyOf:
          - maxLength: 512
            type: string
          - type: 'null'
          title: Display Name
        example_variables:
          items:
            type: string
          title: Example Variables
          type: array
        footer_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Footer Text
        header_format:
          $ref: '#/components/schemas/TemplateHeaderFormat'
          default: none
        header_media_document_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          title: Header Media Document Id
        header_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Header Text
        id:
          format: uuid
          title: Id
          type: string
        language:
          default: pt_BR
          maxLength: 10
          title: Language
          type: string
        last_synced_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Synced At
        modified:
          format: date-time
          title: Modified
          type: string
        name:
          maxLength: 512
          minLength: 1
          pattern: ^[a-z0-9_]+$
          title: Name
          type: string
        provider_template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Provider Template Id
        quality_score:
          anyOf:
          - type: string
          - type: 'null'
          title: Quality Score
        rejection_reason:
          anyOf:
          - type: string
          - type: 'null'
          title: Rejection Reason
        status:
          $ref: '#/components/schemas/TemplateStatus'
        waba_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Waba Id
      required:
      - name
      - body_text
      - id
      - business_id
      - status
      - created
      - modified
      title: WhatsAppTemplateOut
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    WhatsAppTemplateUpdate:
      description: Partial update. Content edits to APPROVED/PAUSED templates are sent to Meta immediately.
      properties:
        body_text:
          anyOf:
          - maxLength: 1024
            minLength: 1
            type: string
          - type: 'null'
          title: Body Text
        buttons:
          anyOf:
          - items:
              $ref: '#/components/schemas/TemplateButton'
            type: array
          - type: 'null'
          title: Buttons
        call_permission_request:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Call Permission Request
        category:
          anyOf:
          - $ref: '#/components/schemas/TemplateCategory'
          - type: 'null'
        display_name:
          anyOf:
          - maxLength: 512
            type: string
          - type: 'null'
          title: Display Name
        example_variables:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Example Variables
        footer_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Footer Text
        header_format:
          anyOf:
          - $ref: '#/components/schemas/TemplateHeaderFormat'
          - type: 'null'
        header_media_document_id:
          anyOf:
          - format: uuid
            type: string
          - type: 'null'
          title: Header Media Document Id
        header_text:
          anyOf:
          - maxLength: 60
            type: string
          - type: 'null'
          title: Header Text
        language:
          anyOf:
          - maxLength: 10
            type: string
          - type: 'null'
          title: Language
      title: WhatsAppTemplateUpdate
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Personal access token (izap_pat_…) sent as Authorization: Bearer <token>; dashboard session JWTs are also accepted.'
      scheme: bearer
      type: http