# Message types

HTML: https://www.app2email.com/docs/api/message-types · Index: https://www.app2email.com/docs/api/llms.txt

`POST /v1/{number}/messages` bodies by `type`. https://www.app2email.com/docs/api/messages/send-template-message.md

## Template

```json
{
  "to": "61412345678",
  "type": "template",
  "template": {
    "name": "order_update",
    "language": {
      "code": "en"
    },
    "components": [
      {
        "type": "body",
        "parameters": [
          {
            "type": "text",
            "text": "John"
          },
          {
            "type": "text",
            "text": "#1234"
          }
        ]
      }
    ]
  }
}
```

## Text

```json
{
  "to": "61412345678",
  "type": "text",
  "text": {
    "body": "Thanks, it arrives on Friday.",
    "preview_url": false
  }
}
```

Received as (`message.received`):

```json
{
  "id": "evt_Xq3k9m2Lw8Rt5Yp1Zs01",
  "type": "message.received",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
    "from": "61412345678",
    "name": "Sample Contact",
    "type": "text",
    "text": "Hi, is my order on its way?",
    "conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_SAMPLEk3XbQ9rTzP2mW",
    "timestamp": "2026-11-06T01:00:00.000Z",
    "from_user_id": "AU.1234567890123456",
    "whatsapp": {
      "from": "61412345678",
      "from_user_id": "AU.1234567890123456",
      "id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
      "timestamp": "1762390800",
      "type": "text",
      "text": {
        "body": "Hi, is my order on its way?"
      }
    }
  }
}
```

## Image

```json
{
  "to": "61412345678",
  "type": "image",
  "image": {
    "link": "https://example.com/photo.jpg",
    "caption": "Your parcel"
  }
}
```

Received as (`message.received`):

```json
{
  "id": "evt_Pa3k9m2Lw8Rt5Yp1Zs017",
  "type": "message.received",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
    "from": "61412345678",
    "from_user_id": "AU.1234567890123456",
    "media_url": "https://api.app2email.com/v1/4976659348270/media/wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA%3D",
    "name": "Sample Contact",
    "type": "image",
    "text": "[IMAGE, photo.jpg, image/jpeg, 48213 bytes] Is this the right part?",
    "in_reply_to": "wamid.HBgLNjE0MTIzNDU2NzgVAgASGBJPUklHSU5BTF9NRVNTQUdFAA==",
    "context": {
      "from": "4976659348270",
      "id": "wamid.HBgLNjE0MTIzNDU2NzgVAgASGBJPUklHSU5BTF9NRVNTQUdFAA=="
    },
    "conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_SAMPLEk3XbQ9rTzP2mW",
    "timestamp": "2026-11-06T01:00:00.000Z"
  }
}
```

## Video

```json
{
  "to": "61412345678",
  "type": "video",
  "video": {
    "link": "https://example.com/howto.mp4",
    "caption": "How to set it up"
  }
}
```

## Audio

```json
{
  "to": "61412345678",
  "type": "audio",
  "audio": {
    "id": "1013859600285441",
    "voice": true
  }
}
```

## Document

```json
{
  "to": "61412345678",
  "type": "document",
  "reply_to": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
  "document": {
    "data": "JVBERi0xLjQKJ...",
    "filename": "invoice-1234.pdf",
    "caption": "Invoice #1234"
  }
}
```

## Sticker

```json
{
  "to": "61412345678",
  "type": "sticker",
  "sticker": {
    "link": "https://example.com/stickers/thanks.webp"
  }
}
```

## Location

```json
{
  "to": "61412345678",
  "type": "location",
  "location": {
    "latitude": -33.8568,
    "longitude": 151.2153,
    "name": "Sydney Opera House",
    "address": "Bennelong Point, Sydney NSW 2000"
  }
}
```

Received as (`message.received`):

```json
{
  "id": "evt_Pa3k9m2Lw8Rt5Yp1Zs013",
  "type": "message.received",
  "created": "2026-11-06T01:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgARGBJTQU1QTEVfVEVTVF9FVkVOVAA=",
    "from": "61412345678",
    "name": "Sample Contact",
    "type": "location",
    "text": "-33.8688,151.2093 Sydney Opera House",
    "location": {
      "latitude": -33.8688,
      "longitude": 151.2093,
      "name": "Sydney Opera House",
      "address": "Bennelong Point, Sydney NSW 2000"
    },
    "conversation_url": "https://www.app2email.com/conversation/61412345678_4976659348270_SAMPLEk3XbQ9rTzP2mW",
    "timestamp": "2026-11-06T01:00:00.000Z"
  }
}
```

## Contacts

```json
{
  "to": "61412345678",
  "type": "contacts",
  "contacts": [
    {
      "name": {
        "formatted_name": "Jane Citizen",
        "first_name": "Jane",
        "last_name": "Citizen"
      },
      "phones": [
        {
          "phone": "+61 412 345 678",
          "type": "CELL",
          "wa_id": "61412345678"
        }
      ],
      "emails": [
        {
          "email": "jane@example.com",
          "type": "WORK"
        }
      ],
      "org": {
        "company": "Example Pty Ltd"
      }
    }
  ]
}
```

## Reaction

```json
{
  "to": "61412345678",
  "type": "reaction",
  "reaction": {
    "message_id": "wamid.HBgLNjE0MTIzNDU2NzgVAgASGBQzQUZCMTY0MDc2MUYwNzBDNTY5MAA=",
    "emoji": "👍"
  }
}
```

## Reply buttons

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "button",
    "body": {
      "text": "Confirm your booking for Friday 10:00?"
    },
    "action": {
      "buttons": [
        {
          "type": "reply",
          "reply": {
            "id": "yes",
            "title": "Confirm"
          }
        },
        {
          "type": "reply",
          "reply": {
            "id": "no",
            "title": "Change"
          }
        }
      ]
    }
  }
}
```

## List

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "list",
    "body": {
      "text": "Which time suits you?"
    },
    "action": {
      "button": "Pick a time",
      "sections": [
        {
          "title": "Friday",
          "rows": [
            {
              "id": "fri10",
              "title": "10:00"
            },
            {
              "id": "fri14",
              "title": "14:00",
              "description": "afternoon"
            }
          ]
        }
      ]
    }
  }
}
```

## Link button

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "cta_url",
    "body": {
      "text": "Your invoice is ready."
    },
    "action": {
      "name": "cta_url",
      "parameters": {
        "display_text": "Open invoice",
        "url": "https://example.com/invoice/1234"
      }
    }
  }
}
```

## Location request

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "location_request_message",
    "body": {
      "text": "Where should we pick you up? Tap to share your location."
    },
    "action": {
      "name": "send_location"
    }
  }
}
```

## Flow

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "flow",
    "header": {
      "type": "text",
      "text": "Book a table"
    },
    "body": {
      "text": "Pick a day and time."
    },
    "action": {
      "name": "flow",
      "parameters": {
        "flow_message_version": "3",
        "flow_id": "1234567890123456",
        "flow_cta": "Book now",
        "flow_token": "booking-5521",
        "flow_action": "navigate",
        "flow_action_payload": {
          "screen": "WELCOME"
        }
      }
    }
  }
}
```

## Product

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "product",
    "body": {
      "text": "The one you asked about:"
    },
    "action": {
      "catalog_id": "194836987003835",
      "product_retailer_id": "SKU-1234"
    }
  }
}
```

## Product list

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "product_list",
    "header": {
      "type": "text",
      "text": "Our picks"
    },
    "body": {
      "text": "Popular this week."
    },
    "action": {
      "catalog_id": "194836987003835",
      "sections": [
        {
          "title": "Succulents",
          "product_items": [
            {
              "product_retailer_id": "SKU-1234"
            },
            {
              "product_retailer_id": "SKU-5678"
            }
          ]
        }
      ]
    }
  }
}
```

## Catalog

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "catalog_message",
    "body": {
      "text": "Browse our catalog."
    },
    "action": {
      "name": "catalog_message",
      "parameters": {
        "thumbnail_product_retailer_id": "SKU-1234"
      }
    }
  }
}
```

## Address request

```json
{
  "to": "919876543210",
  "type": "interactive",
  "interactive": {
    "type": "address_message",
    "body": {
      "text": "Where should we deliver?"
    },
    "action": {
      "name": "address_message",
      "parameters": {
        "country": "IN"
      }
    }
  }
}
```

## Call permission request

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "call_permission_request",
    "body": {
      "text": "May we call you on WhatsApp about your order?"
    },
    "action": {
      "name": "call_permission_request"
    }
  }
}
```

## Call button

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "voice_call",
    "body": {
      "text": "Questions? Call us on WhatsApp."
    },
    "action": {
      "name": "voice_call",
      "parameters": {
        "display_text": "Call us",
        "ttl_minutes": 60
      }
    }
  }
}
```

## Order details

```json
{
  "to": "919876543210",
  "type": "interactive",
  "interactive": {
    "type": "order_details",
    "body": {
      "text": "Your order is ready to pay."
    },
    "action": {
      "name": "review_and_pay",
      "parameters": {
        "reference_id": "ORDER-1234",
        "type": "digital-goods",
        "payment_type": "upi",
        "payment_configuration": "my-config",
        "currency": "INR",
        "total_amount": {
          "value": 21000,
          "offset": 100
        },
        "order": {
          "status": "pending",
          "subtotal": {
            "value": 21000,
            "offset": 100
          },
          "items": [
            {
              "retailer_id": "SKU-1234",
              "name": "Gift card",
              "amount": {
                "value": 21000,
                "offset": 100
              },
              "quantity": 1
            }
          ]
        }
      }
    }
  }
}
```

## Order status

```json
{
  "to": "919876543210",
  "type": "interactive",
  "interactive": {
    "type": "order_status",
    "body": {
      "text": "Your order has shipped."
    },
    "action": {
      "name": "review_order",
      "parameters": {
        "reference_id": "ORDER-1234",
        "order": {
          "status": "shipped",
          "description": "Arrives Friday"
        }
      }
    }
  }
}
```

## interactive.carousel

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "carousel",
    "body": {
      "text": "Three of our latest arrivals, each under $25:"
    },
    "action": {
      "cards": [
        {
          "card_index": 0,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": {
              "link": "https://example.com/img/echeveria.jpg"
            }
          },
          "body": {
            "text": "*Blue Echeveria*"
          },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Buy now",
              "url": "https://shop.example.com/echeveria"
            }
          }
        },
        {
          "card_index": 1,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": {
              "link": "https://example.com/img/haworthia.jpg"
            }
          },
          "body": {
            "text": "*Zebra Haworthia*"
          },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Buy now",
              "url": "https://shop.example.com/haworthia"
            }
          }
        }
      ]
    }
  }
}
```

## interactive.request_contact_info

```json
{
  "to": "61412345678",
  "type": "interactive",
  "interactive": {
    "type": "request_contact_info",
    "body": {
      "text": "Please share your phone number so we can call you back."
    },
    "action": {
      "name": "request_contact_info"
    }
  }
}
```

