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

# Create template

> Create a WhatsApp template and submit it for WhatsApp approval, which is asynchronous (~24–48h). A template belongs to one WhatsApp account (WABA) and can only be sent from that account's numbers; if the organization has several accounts, choose one with `whatsappAccountId`: its WABA ID or the name the team gave it, e.g. "Soporte" (see whatsapp_numbers_list). Example (TEXT): `{ "name": "order_shipped", "language": "es", "category": "UTILITY", "contentType": "TEXT", "content": { "body": "Hola {{1}}, tu pedido ya salió." }, "variables": { "1": "Ana" } }`. Example with buttons (CALL_TO_ACTION): `{ "name": "order_shipped_cta", "language": "es", "category": "UTILITY", "contentType": "CALL_TO_ACTION", "content": { "body": "Hola {{1}}, tu pedido ya salió.", "actions": [{ "type": "URL", "title": "Ver pedido", "url": "https://example.com/orders/{{2}}" }] }, "variables": { "1": "Ana", "2": "12345" } }`. Example with reply buttons (QUICK_REPLY): `{ "name": "order_feedback", "language": "es", "category": "UTILITY", "contentType": "QUICK_REPLY", "content": { "body": "¿Te gustó tu compra?", "actions": [{ "title": "Sí", "id": "yes" }, { "title": "No", "id": "no" }] } }`. Example with a header and image (CARD): `{ "name": "order_shipped_card", "language": "es", "category": "UTILITY", "contentType": "CARD", "content": { "headerType": "media", "mediaUrl": "https://example.com/banner.jpg", "body": "Hola {{1}}, tu pedido ya salió.", "footer": "Gracias por tu compra", "actions": [{ "type": "URL", "title": "Ver pedido", "url": "https://example.com/orders/{{2}}" }] }, "variables": { "1": "Ana", "2": "12345" } }`. Example that is only an image (MEDIA): the image URL goes in `content.media` (an array), NOT in a variable — `{ "name": "promo_verano", "language": "es", "category": "MARKETING", "contentType": "MEDIA", "content": { "media": ["https://example.com/promo.png"], "body": "¡Hola {{1}}! Aprovecha nuestra promo de verano." }, "variables": { "1": "Ana" } }`.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/templates
openapi: 3.1.0
info:
  title: Boom API
  version: 1.0.0
  description: >-
    Boom's public REST API — one uniform surface over every platform capability.
    CDP: upsert people and custom objects, define object and relationship types,
    link and unlink relationships, and record behavioral events — one record per
    request or up to 1000 per request via the `/batch` endpoints. Segments: read
    (list, read, membership) and full authoring — discover the filterable
    catalog, validate a filter, create and update segments, preview match
    counts, and trigger evaluation. Initiatives: create and configure outreach
    initiatives, link WhatsApp templates, drive the lifecycle (launch, cancel,
    archive), and read collected-data summaries. Participants: enroll people
    into an active initiative, track their status, read conversation
    transcripts, and stop outreach. Journeys: read-only access to always-on
    message flows and their metrics. WhatsApp templates: list your WhatsApp
    numbers and list, read, and create message templates. The same capabilities
    are exposed as MCP tools with identical schemas.
servers:
  - url: https://www.useboom.ai
    description: Production
  - url: https://dev.useboom.ai
    description: Development (sandbox — use a development organization API key)
security:
  - bearerAuth: []
paths:
  /api/v1/templates:
    post:
      tags:
        - WhatsApp templates
      summary: Create template
      description: >-
        Create a WhatsApp template and submit it for WhatsApp approval, which is
        asynchronous (~24–48h). A template belongs to one WhatsApp account
        (WABA) and can only be sent from that account's numbers; if the
        organization has several accounts, choose one with `whatsappAccountId`:
        its WABA ID or the name the team gave it, e.g. "Soporte" (see
        whatsapp_numbers_list). Example (TEXT): `{ "name": "order_shipped",
        "language": "es", "category": "UTILITY", "contentType": "TEXT",
        "content": { "body": "Hola {{1}}, tu pedido ya salió." }, "variables": {
        "1": "Ana" } }`. Example with buttons (CALL_TO_ACTION): `{ "name":
        "order_shipped_cta", "language": "es", "category": "UTILITY",
        "contentType": "CALL_TO_ACTION", "content": { "body": "Hola {{1}}, tu
        pedido ya salió.", "actions": [{ "type": "URL", "title": "Ver pedido",
        "url": "https://example.com/orders/{{2}}" }] }, "variables": { "1":
        "Ana", "2": "12345" } }`. Example with reply buttons (QUICK_REPLY): `{
        "name": "order_feedback", "language": "es", "category": "UTILITY",
        "contentType": "QUICK_REPLY", "content": { "body": "¿Te gustó tu
        compra?", "actions": [{ "title": "Sí", "id": "yes" }, { "title": "No",
        "id": "no" }] } }`. Example with a header and image (CARD): `{ "name":
        "order_shipped_card", "language": "es", "category": "UTILITY",
        "contentType": "CARD", "content": { "headerType": "media", "mediaUrl":
        "https://example.com/banner.jpg", "body": "Hola {{1}}, tu pedido ya
        salió.", "footer": "Gracias por tu compra", "actions": [{ "type": "URL",
        "title": "Ver pedido", "url": "https://example.com/orders/{{2}}" }] },
        "variables": { "1": "Ana", "2": "12345" } }`. Example that is only an
        image (MEDIA): the image URL goes in `content.media` (an array), NOT in
        a variable — `{ "name": "promo_verano", "language": "es", "category":
        "MARKETING", "contentType": "MEDIA", "content": { "media":
        ["https://example.com/promo.png"], "body": "¡Hola {{1}}! Aprovecha
        nuestra promo de verano." }, "variables": { "1": "Ana" } }`.
      operationId: templates_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Template name, unique per WhatsApp account (shared by all
                    its numbers).
                language:
                  type: string
                  minLength: 2
                  maxLength: 10
                  description: >-
                    WhatsApp language code, e.g. `es`, `en`. A regional variant
                    like `es_MX` or `en_US` is normalized to its base code.
                category:
                  type: string
                  enum:
                    - UTILITY
                    - MARKETING
                    - AUTHENTICATION
                contentType:
                  type: string
                  enum:
                    - TEXT
                    - MEDIA
                    - QUICK_REPLY
                    - CALL_TO_ACTION
                    - CARD
                content:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
                  description: >-
                    Message content. Shape depends on `contentType`: TEXT `{
                    body }`; MEDIA `{ body?, media: [url] }`; QUICK_REPLY `{
                    body, actions: [{ title, id }] }`; CALL_TO_ACTION `{ body,
                    actions: [{ type: URL|PHONE_NUMBER, title, url|phone }] }`;
                    CARD `{ headerType, headerText|mediaUrl, body, footer?,
                    actions? }`. Use `{{1}}`, `{{2}}`… for variables. Example
                    (TEXT): `{ "body": "Hola {{1}}, tu pedido está en camino"
                    }`. Example (CALL_TO_ACTION, adds a button): `{ "body":
                    "Hola {{1}}, tu pedido está en camino", "actions": [{
                    "type": "URL", "title": "Ver pedido", "url":
                    "https://example.com/orders/{{2}}" }] }`. Example
                    (QUICK_REPLY, adds reply buttons): `{ "body": "¿Te gustó tu
                    compra?", "actions": [{ "title": "Sí", "id": "yes" }, {
                    "title": "No", "id": "no" }] }`. Example (CARD, header +
                    optional footer/button): `{ "headerType": "text",
                    "headerText": "Pedido en camino", "body": "Hola {{1}}, tu
                    pedido ya salió.", "footer": "Gracias por tu compra",
                    "actions": [{ "type": "URL", "title": "Ver pedido", "url":
                    "https://example.com/orders/{{2}}" }] }`.
                variables:
                  description: >-
                    Example values for placeholders, e.g. `{ "1": "Ana" }` for
                    `{{1}}`. Required for every placeholder used.
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    type: string
                whatsappAccountId:
                  description: >-
                    WABA ID of the WhatsApp account to create the template on
                    (`whatsappAccount.id` from whatsapp_numbers_list), or the
                    account's alias, matched case-insensitively
                    (`whatsappAccount.alias`, e.g. "Soporte"). The template
                    belongs to that account: every number on it can send it, and
                    numbers on other accounts can't. Works for an account with
                    no active numbers yet. Omit when the organization has a
                    single WhatsApp account; with several, pass this or
                    `phoneNumbers`.
                  type: string
                  minLength: 1
                phoneNumbers:
                  description: >-
                    Alternative to `whatsappAccountId`: any WhatsApp number
                    (E.164) on the account to create the template on. One number
                    per account is enough. Numbers on several accounts create
                    one template per account. Omit when the organization has a
                    single WhatsApp account.
                  minItems: 1
                  type: array
                  items:
                    type: string
                    minLength: 1
              required:
                - name
                - language
                - category
                - contentType
                - content
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Template id.
                        name:
                          type: string
                          description: >-
                            Template name (unique per WhatsApp account, i.e.
                            across all its numbers).
                        language:
                          type: string
                          description: >-
                            WhatsApp language code the template was created for,
                            e.g. `es_MX`.
                        category:
                          type: string
                          enum:
                            - UTILITY
                            - MARKETING
                            - AUTHENTICATION
                        contentType:
                          type: string
                          enum:
                            - TEXT
                            - MEDIA
                            - QUICK_REPLY
                            - CALL_TO_ACTION
                            - CARD
                        content:
                          description: The message content (shape per `contentType`).
                        variables:
                          anyOf:
                            - type: object
                              propertyNames:
                                type: string
                              additionalProperties:
                                type: string
                            - type: 'null'
                          description: Example values for `{{1}}`-style placeholders.
                        phoneNumbers:
                          type: array
                          items:
                            type: string
                          description: >-
                            WhatsApp numbers this template can be sent from:
                            every number on the WhatsApp account it was created
                            on.
                        whatsappAccount:
                          anyOf:
                            - type: object
                              properties:
                                id:
                                  type: string
                                  description: >-
                                    Meta's WhatsApp Business Account ID (WABA
                                    ID), as shown in Meta Business Manager.
                                name:
                                  type: string
                                  description: >-
                                    The account's name: the team's alias when
                                    one is set, otherwise what its numbers are
                                    called on WhatsApp.
                                alias:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                  description: >-
                                    The name the team gave this account in Boom
                                    (e.g. "Soporte"), or null. Accepted anywhere
                                    a WABA ID is, such as `whatsappAccountId` on
                                    templates_create.
                                phoneNumbers:
                                  type: array
                                  items:
                                    type: string
                                  description: >-
                                    Every active number on this account. Each
                                    one can send all of its templates; no number
                                    outside it can.
                              required:
                                - id
                                - name
                                - alias
                                - phoneNumbers
                              additionalProperties: false
                            - type: 'null'
                          description: >-
                            The WhatsApp account (WABA) the template belongs to.
                            Only its numbers can send it. Null if that account
                            is no longer connected.
                        status:
                          type: string
                          enum:
                            - DRAFT
                            - PENDING
                            - APPROVED
                            - REJECTED
                          description: >-
                            DRAFT (not yet submitted), PENDING (in WhatsApp
                            review, typically 24-48h), APPROVED, or REJECTED
                            (see rejectionReason).
                        rejectionReason:
                          anyOf:
                            - type: string
                            - type: 'null'
                        createdAt:
                          type: string
                          description: ISO 8601 timestamp.
                        updatedAt:
                          type: string
                          description: ISO 8601 timestamp.
                      required:
                        - id
                        - name
                        - language
                        - category
                        - contentType
                        - content
                        - variables
                        - phoneNumbers
                        - whatsappAccount
                        - status
                        - rejectionReason
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                    description: >-
                      The created template(s) — one per WhatsApp account backing
                      the chosen numbers.
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation failed or the request cannot proceed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '401':
          description: Missing, malformed, or revoked API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: The resource does not exist in this organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '409':
          description: >-
            Conflicts with the current state (duplicates, wrong lifecycle
            state).
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '422':
          description: The request is well-formed but semantically invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '429':
          description: Rate limit exceeded — retry after `Retry-After`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
        '503':
          description: Transient error — retry with a narrower request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable machine-readable error code (snake_case).
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Organization API key, sent as `Authorization: Bearer boom_org_...`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.