List templates

The message templates of a WhatsApp line, as Meta lists them

GET/v1/lines/{lineId}/templates

The message templates of the WhatsApp Business Account behind a WhatsApp line, as Meta lists them: name, language, status, category and how many parameters each takes. Only an APPROVED template can be sent with whatsapp.template.send, and you need one to message someone who has not written to you in the last 24 hours.

curl https://api.mapier.ai/v1/lines/0192a7b1-5b6c-7d7e-9f80-a1b2c3d4e5f6/templates \
  -H "Authorization: Bearer $MAPIER_API_KEY" \
  -H "x-mapier-version: 2026-12-01"
200 OK
{
  "templates": [
    {
      "name": "booking_reminder",
      "language": "en_GB",
      "status": "APPROVED",
      "category": "UTILITY",
      "paramCount": 1
    }
  ]
}

status and category are Meta's own words and may gain new values: treat a status you do not know as not usable yet. Create and edit templates in WhatsApp Manager; the list follows within minutes.

Errors

StatusCodeCause
400bad_requestMeta rejected the request as malformed; or, with a personal access token, no x-mapier-project header
401invalid_credentialsNo key, or one that is unknown, revoked or expired
403forbiddenA personal access token not made for this environment, or whose owner's role no longer allows this
403insufficient_scopeThe key does not carry the messages:read scope
404not_foundA line this key cannot see, or none
404unsupported_commandA line of another channel (reason: not_on_channel)
409project_archivedThe project is archived
422validation_failedAn x-mapier-version the API does not support
429rate_limitedOver this route's budget, or Meta's; wait Retry-After or details.retryAfter
500internal_errorMapier failed on its side; give requestId to support
503line_unavailableThe line cannot be reached right now; details.reason says why
503service_busyMapier is busy and did nothing; wait details.retryAfter seconds and call again
503upstream_unavailableMeta did not answer; retry with backoff