---
updatedAt: 2026-08-06T09:23:40.000Z
agentTools:
  projectIndex: https://developers.alcmeon.com/llms.txt
---

# Send a Whatsapp message using a template

Send a message using a predefined template to a specified user's phone number.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Initiate a conversation API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.alcmeon.com",
      "description": "Alcmeon production API server"
    }
  ],
  "x-readme": {
    "explorer-enabled": true
  },
  "components": {
    "securitySchemes": {
      "basic_auth": {
        "description": "Basic authentication using your environment Instance ID as username and Application Secret as password.\n",
        "type": "http",
        "scheme": "basic"
      },
      "bearer_token": {
        "description": "OAuth 2.0 Bearer token authentication.  Obtain a token by calling the /v1/oauth2/token endpoint with your credentials. The token is valid for one hour.\n",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "ResponseError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "A short string explaining the reason of the error."
          },
          "details": {
            "type": "string",
            "description": "A short string which describes what is wrong. Provide this string to  support@alcmeon.com if you wish to obtain more details about the problem.\n"
          }
        }
      },
      "OngoingConversationError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "A short string explaining the reason of the error."
          },
          "details": {
            "type": "string",
            "description": "A short string which describes what is wrong. Provide this string to  support@alcmeon.com if you wish to obtain more details about the problem.\n"
          }
        }
      },
      "RateLimitResponseError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Rate limit reached"
          },
          "details": {
            "type": "string",
            "description": "A string showing the time when the rate limit will be reset. Example: {'rate_limited_until': '2024-01-22T13:05:41Z'}\n"
          }
        }
      },
      "SendWhatsappMessageRequest": {
        "type": "object",
        "properties": {
          "to_user_phone_number": {
            "type": "string",
            "description": "Recipient's phone number",
            "example": "1234567890"
          },
          "account_id": {
            "type": "integer",
            "description": "ID of the WhatsApp account in Alcmeon",
            "example": 12345
          },
          "template_id": {
            "type": "integer",
            "description": "ID of the WhatsApp template to send",
            "example": 98765
          },
          "variables": {
            "type": "object",
            "description": "Variables to replace in the template",
            "properties": {
              "body": {
                "type": "object",
                "description": "Variables for the message body. The keys are the placeholders labels as defined in the template body and the values are the values to replace them with.",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "name": "John",
                  "product": "shoes"
                }
              },
              "buttons": {
                "type": "object",
                "description": "Variables for template url buttons. The keys are the placeholders labels as defined in the template url button and the values are the values to replace them with.",
                "additionalProperties": {
                  "type": "string"
                },
                "example": {
                  "website": "/mysite"
                }
              }
            }
          },
          "interrupt_ongoing_conversation": {
            "type": "boolean",
            "description": "If you want to force the message even if the user already has an ongoing conversation with the brand. For more details about blocking message when a user has an ongoing conversation, [check our documentation](https://help.alcmeon.ai/)",
            "default": false
          }
        },
        "required": [
          "to_user_phone_number",
          "account_id",
          "template_id"
        ]
      },
      "SendWhatsappMessageResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "The status of the message sending operation.",
            "example": "ok"
          },
          "message_id": {
            "type": "string",
            "description": "The unique ID of the sent message.",
            "example": "5739d1c3-1897-4a92-a704-1a4fbd0b9da7"
          }
        }
      }
    }
  },
  "security": [
    {
      "basic_auth": []
    },
    {
      "bearer_token": []
    }
  ],
  "tags": [
    {
      "name": "Whatsapp"
    }
  ],
  "paths": {
    "/v1/whatsapp/send/": {
      "post": {
        "tags": [
          "Whatsapp"
        ],
        "summary": "Send a Whatsapp message using a template",
        "description": "Send a message using a predefined template to a specified user's phone number.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendWhatsappMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Message sent successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendWhatsappMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "If the input parameters are not valid or the template is not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseError"
                }
              }
            }
          },
          "403": {
            "description": "If the user you are trying to reach is not accessible due to an ongoing conversation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OngoingConversationError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Default limit is set to 3000 requests per minute.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitResponseError"
                }
              }
            }
          }
        }
      }
    }
  }
}
```