Skip to main content
GET

Overview

Fetch the message templates of one of your WhatsApp integrations live from AiSensy. The list is whatever AiSensy returns for the number, so its fields follow AiSensy’s template format.

Prerequisites

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
Integration ID (the _id from Get WhatsApp Numbers).

Response

A successful request returns status: true, the message Templates fetched successfully, and the templates in data.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Valid Phone Number ID is required.
  • 401 Unauthorized – Missing or invalid API key.
  • 404 Not Found – Whatsapp number not found: it doesn’t exist or wasn’t connected by the user who owns the API key.
  • 429 Too Many Requests – More than 1,000 WhatsApp requests in 15 minutes from your IP address.
  • 500 Internal Server Error – Unexpected server error, or AiSensy couldn’t be reached.
Related endpoints:
  • GET /api/whatsapp/get-variable-by-template-id/{phoneNumberId}/{templateId} – the variables of a template.
  • GET /api/whatsapp/get-all-templates – the templates saved with your WhatsApp agents.