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

# Create a message template



## OpenAPI

````yaml /openapi.json post /public/v1/templates
openapi: 3.0.0
info:
  title: Hostreach API
  description: >-
    Public REST API for Hostreach.


    Authenticate with an API key via the `X-Api-Key` header or `Authorization:
    Bearer <key>` header.


    Generate API keys from **Settings › Workspace › Acceso API** in the
    dashboard.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.hostreach.io/v1
    description: Production
  - url: http://localhost:3001/v1
    description: Local
security:
  - apiKey: []
tags:
  - name: Identity
    description: Current workspace and usage
  - name: Platforms
    description: Supported real-estate portals and filter schemas
  - name: Extractions
    description: Lead extraction jobs
  - name: Leads
    description: Lead management
  - name: Campaigns
    description: Campaign management
  - name: Messaging
    description: Inbox and WhatsApp conversations
  - name: Templates
    description: WhatsApp message templates
  - name: Accounts
    description: WhatsApp accounts
  - name: Valuations
    description: Property valuations
  - name: Fichas
    description: Property listing sheets
  - name: Scheduling
    description: Calendar and appointments
  - name: Webhooks
    description: Event subscriptions
paths:
  /public/v1/templates:
    post:
      tags:
        - Templates
      summary: Create a message template
      operationId: PublicTemplatesController_createTemplate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTemplateDto'
      responses:
        '201':
          description: ''
      security:
        - bearerApiKey: []
        - apiKey: []
components:
  schemas:
    CreateTemplateDto:
      type: object
      properties:
        apiType:
          type: string
          description: >-
            WhatsApp integration type. `meta-api` requires a WABA account;
            `evolution-api` uses a connected Evolution API account.
          enum:
            - meta-api
            - evolution-api
          default: meta-api
          example: meta-api
        platform:
          type: string
          description: Portal or source associated with this template.
          enum:
            - idealista
            - fotocasa
            - metrocuadrado
            - inmuebles24
            - zonaprop
            - widget
            - csv_import
          example: idealista
        wabaId:
          type: string
          description: WhatsApp Business Account ID. Required when `apiType` is `meta-api`.
          example: '123456789012345'
        accountId:
          type: string
          description: >-
            Evolution API account UUID. Required when `apiType` is
            `evolution-api`.
          format: uuid
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        name:
          type: string
          description: Template name (must match the approved Meta template name exactly).
          example: bienvenida_inquilinos_v2
        category:
          type: string
          description: Meta template category.
          enum:
            - MARKETING
            - UTILITY
            - AUTHENTICATION
            - ACCOUNT_UPDATE
          example: MARKETING
        language:
          type: string
          description: Template language code (BCP 47). Defaults to `es`.
          example: es
          default: es
        components:
          description: >-
            Template components (HEADER, BODY, FOOTER, BUTTONS). See Meta
            template docs for component structure.
          type: array
          items: 32d797b6-50ea-49df-b1c0-96b909935eef
      required:
        - platform
        - name
        - category
        - components
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        API key (hr_live_... or hr_test_...). Generate from Settings › Workspace
        › Acceso API.

````