← Blog

·

WhatsApp API character limits: body, header, footer and buttons

Updated on November 24, 2026

A WhatsApp message template allows up to 1,024 characters in the body, 60 in a text header, 60 in the footer and 25 in each button label. A free-form text message, sent inside the customer service window, can have up to 4,096 characters. Interactive messages have their own limits: a reply button title is capped at 20 characters, a list row title at 24 and a row description at 72.

This guide puts the limits from Meta’s official documentation into tables for each message type of the official WhatsApp API, shows the errors you get when you go over them and includes a JavaScript function to validate fields before sending.

Free-form text messages

The text message type is the simplest one and has the most room:

FieldLimit
text.body4,096 characters
preview_urlBoolean; previews only the first URL in the text, which must start with http:// or https://

Free-form text can only be sent inside the 24-hour customer service window opened by the customer’s message. Outside it you need an approved template, and the smaller limits in the next section apply.

If your text is longer than 4,096 characters, split it into several messages. To organize content within the limit, see the guide to text formatting in the API.

Template component limits

Templates are built from components: header, body, footer and buttons. Each has its own limit, as listed on the Template components page:

ComponentLimitNotes
Template name512 charactersLowercase letters, numbers and underscores only
Text header60 charactersSupports 1 variable; do not use Markdown special characters
Body1,024 charactersSupports multiple variables; one body per template
Footer60 charactersOne footer per template
Buttons (total)Up to 10With more than 3, WhatsApp shows 2 plus a “See all options” button

The body limit covers both the fixed text and the variables. A template with 900 fixed characters and a product-name variable can exceed the limit at send time if the product name is long. Plan your copy around the worst case for each variable.

Template button limits

Button typeMax per templateButton labelOther limits
Quick reply1025 charactersWhen mixed with other types, quick replies must be grouped together
URL225 charactersURL up to 2,000 characters; 1 variable, at the end only
Phone number125 charactersPhone number up to 20 characters
Copy code1—Example value up to 20 characters

In a URL with a variable, the value you send must be percent-encoded: a space becomes %20 and “Gonçalves” becomes Gon%C3%A7alves. The docs also note that templates with 4 or more buttons, or with quick replies mixed with other button types, can’t be viewed on WhatsApp desktop. To use URL buttons with tracking, see the article on the CTA URL link button.

Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →

Interactive message limits

Interactive messages (reply buttons, lists, CTA URL and location requests) are sent inside the customer service window and have their own limits. Their titles are shorter than template labels, which catches a lot of developers off guard.

Reply buttons

FieldLimit
Number of buttonsUp to 3
Button title20 characters (unique across buttons)
Button ID256 characters
Body1,024 characters
Text header60 characters (image, video or document headers also allowed)
Footer60 characters

List messages

FieldLimit
Button that opens the list20 characters
Body4,096 characters
HeaderText only, 60 characters
Footer60 characters
SectionsUp to 10
RowsUp to 10 in total, across all sections
Section title24 characters
Row title24 characters
Row description72 characters
Row ID200 characters

The 10-row limit applies to the whole list. If you have more options, split the flow into steps (category first, then item).

CTA URL and location request

MessageFieldLimit
CTA URL (cta_url)Text header60 characters
CTA URL (cta_url)Body1,024 characters
CTA URL (cta_url)Footer60 characters
CTA URL (cta_url)Button display_text20 characters
Location requestBody1,024 characters (URLs allowed)

Sources: reply buttons, lists, CTA URL and location request.

Quick comparison: the limits people mix up

ElementTemplateInteractive
Button label2520 (reply and CTA URL)
Body1,0241,024 (buttons and CTA) or 4,096 (list)
Text header6060
Footer6060
Number of buttonsUp to 10Up to 3 (reply buttons)

A common mistake is reusing a template button label (“Track my order shipment”, 23 characters) on an interactive reply button. It fits in the template, but it’s over the 20-character limit on the interactive button.

Errors related to limits and parameters

When a field exceeds its limit, the error shows up at different stages: when you create the template or when you send the message. The codes are listed on the error codes page:

CodeWhenWhat it means
2388040Template creationA field exceeded the character limit
2388293Template creationToo many variables for the length of the text
2388299Template creationVariable at the start or end of the template
132000SendingNumber of parameters doesn’t match the template
132018SendingTemplate parameter validation issue
100SendingInvalid parameter; the docs suggest checking the length restriction for the type

Errors 2388293 and 2388299 often show up together: short text with many variables, or a variable in the first or last position. If your body reads “{{1}}, your order shipped”, rewrite it as “Hi {{1}}! Your order is out for delivery.” To create and fix templates programmatically, see how to create templates with the API.

A function to validate before sending

The cheapest way to avoid errors is to validate in your own system before calling the API. The function below checks the main fields of reply-button and list messages:

const LIMITS = {
  body: 1024,
  listBody: 4096,
  header: 60,
  footer: 60,
  replyTitle: 20,
  replyId: 256,
  listButton: 20,
  sectionTitle: 24,
  rowTitle: 24,
  rowDescription: 72,
  rowId: 200,
};

function tooLong(value, max) {
  return typeof value === "string" && [...value].length > max;
}

function validateInteractive(interactive) {
  const errors = [];
  const bodyMax = interactive.type === "list" ? LIMITS.listBody : LIMITS.body;

  if (tooLong(interactive.body?.text, bodyMax)) errors.push(`body > ${bodyMax}`);
  if (tooLong(interactive.header?.text, LIMITS.header)) errors.push("header > 60");
  if (tooLong(interactive.footer?.text, LIMITS.footer)) errors.push("footer > 60");

  if (interactive.type === "button") {
    const buttons = interactive.action?.buttons ?? [];
    if (buttons.length > 3) errors.push("more than 3 buttons");
    for (const b of buttons) {
      if (tooLong(b.reply?.title, LIMITS.replyTitle)) errors.push(`title > 20: ${b.reply.title}`);
      if (tooLong(b.reply?.id, LIMITS.replyId)) errors.push("button id > 256");
    }
  }

  if (interactive.type === "list") {
    const sections = interactive.action?.sections ?? [];
    if (tooLong(interactive.action?.button, LIMITS.listButton)) errors.push("list button > 20");
    if (sections.length > 10) errors.push("more than 10 sections");
    const rows = sections.flatMap((s) => s.rows ?? []);
    if (rows.length > 10) errors.push("more than 10 rows in total");
    for (const s of sections) {
      if (tooLong(s.title, LIMITS.sectionTitle)) errors.push(`section > 24: ${s.title}`);
    }
    for (const r of rows) {
      if (tooLong(r.title, LIMITS.rowTitle)) errors.push(`row > 24: ${r.title}`);
      if (tooLong(r.description, LIMITS.rowDescription)) errors.push("description > 72");
      if (tooLong(r.id, LIMITS.rowId)) errors.push("row id > 200");
    }
  }

  return errors;
}

const errors = validateInteractive({
  type: "button",
  body: { text: "Your order is out for delivery. What would you like to do?" },
  action: {
    buttons: [
      { type: "reply", reply: { id: "track", title: "Track my order shipment" } },
      { type: "reply", reply: { id: "agent", title: "Talk to an agent" } },
    ],
  },
});

console.log(errors);

In this example, the function returns title > 20: Track my order shipment, because the title is 23 characters long.

Watch out for emojis: in JavaScript, "text".length counts UTF-16 code units, and a single emoji can count as 2 or more. The function uses [...value].length, which counts code points. Meta’s documentation doesn’t explain how it counts compound emojis, so leave some margin in short fields such as button titles.

Best practices to stay within the limits

  • Write button titles as short verbs. “Confirm”, “Reschedule”, “View order”. They fit in 20 characters and read more clearly.
  • Plan for the worst-case variable. Customer names, product names and addresses vary a lot. Truncate or abbreviate in your system before sending.
  • Use the footer for secondary info. At 60 characters, it works for “Reply STOP to opt out of offers” or the store name, not for the main message.
  • Don’t use Markdown in template headers. The docs ask you to avoid formatting special characters in that component.

For copy that already fits the limits, check the WhatsApp template examples by industry and the guide to WhatsApp API message templates. If your template uses variables, the article on positional and named variables explains how to declare the examples.

How to do this with Vectalk

Vectalk is a proxy for Meta’s official WhatsApp Cloud API: request bodies are the same as in Meta’s documentation, so every limit in this article applies unchanged. You send messages with POST https://apis.vectalk.com.br/api/messages and a Bearer token, as described in the Vectalk documentation.

In the dashboard, the templates area includes a Template Library (Biblioteca de Modelos) so you can start from ready-made copy, and the logs show the API response when a send fails because of a parameter or length issue. The validation function above can run in your own system before calling Vectalk. To get started, create your account.

Frequently asked questions

What is the character limit for a WhatsApp API message?

A free-form text message accepts up to 4,096 characters in text.body. A template body accepts up to 1,024 characters, including fixed text and variables.

How many characters fit in a WhatsApp button?

In templates, each button label (quick reply, URL or phone number) can have up to 25 characters. In interactive messages, the reply button title and the CTA URL display_text are limited to 20.

How many buttons can a template have?

Up to 10 in total, with at most 2 URL buttons, 1 phone number button and 1 copy code button. With more than 3 buttons, WhatsApp shows 2 and groups the rest under “See all options”.

How do I fix error 2388040?

This error appears when you create a template and means a field went over its limit. Check the header (60), body (1,024), footer (60) and button labels (25), then submit the template again.


Official sources checked on November 24, 2026: Template components · Templates overview · Text messages · Interactive reply buttons messages · Interactive list messages · Interactive CTA URL messages · Location request messages · Error codes · Vectalk documentation

Put your business on the official WhatsApp

Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.