Skip to content

Templates

List templates

Returns the workspace’s templates as a JSON array, newest first, capped at 500.

GET/api/v1/templates
  • Bearer API key
  • Scope: read or write
  • or app session
  • Workspace: X-Tenant-ID (optional with a key)

Headers

  • Authorizationstringrequired

    Your API key as Bearer <key>. The word Bearer and the space are case-sensitive. Browser clients signed in to the app use the session cookie instead.

    Constraints
    Keys start with pk_live_ and are 56 characters long.
    Example
    Bearer pk_live_…
  • X-Tenant-IDuuidoptional

    Workspace id. Optional with an API key (a key always acts in its own workspace); if you send it, it must match the key’s workspace. Required with a session cookie. You can pass ?tenant=<id> instead.

    Example
    8d0f6c2e-3b1a-4c55-9a7e-2f4b6d1e9c30

Response

200 OKapplication/json

  • []array<Template>

    Up to 500 templates, newest first.

    Show child attributesHide child attributes7
    • iduuid

      Template id in whatsappx.si.

    • namestring

      Template name (lower case, digits and underscores).

    • bodystring

      Template body text.

    • categorystring

      MARKETING, UTILITY or AUTHENTICATION for templates created here; synced templates keep Meta’s category.

    • languagestring

      Language code, for example en_US.

    • statusstring

      DRAFT for templates created in whatsappx.si (they are not submitted to Meta). Synced templates carry the status Meta reports.

    • created_atinteger

      Creation time in Unix seconds.

Status codes

  • 200OK. An array of templates (not wrapped in an object).
  • 401Unauthorized. The API key is unknown, revoked or expired (invalid or expired API key), or there is no key and no signed-in session (unauthorized).
  • 402Payment required. Only when subscriptions are enforced and the workspace has no active subscription. The body includes code: "payment_required".
  • 403Forbidden. The X-Tenant-ID header or tenant query does not match the API key’s workspace (API key belongs to a different workspace), or a signed-in user is not a member of the workspace (forbidden).
  • 500Server error. The templates could not be loaded.