Skip to main content
GET
/
workspaces
/
{workspace}
/
templates
Get Templates
curl --request GET \
  --url https://lancepilot.com/api/v3/workspaces/{workspace}/templates \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {}
  ],
  "meta": {
    "current_page": 1,
    "per_page": 10,
    "total": 100,
    "last_page": 10,
    "from": 1,
    "to": 10
  },
  "links": {}
}

Overview

Retrieve all WhatsApp message templates for a workspace with pagination support.

Query Parameters

ParameterTypeRequiredDefaultDescription
per_pageintegerNo10Number of templates per page
pageintegerNo1Page number

Response

Success (200 OK)

{
  "success": true,
  "data": [
    {
      "id": 1234,
      "workspace_id": "9ca711b1-14ca-4bd5-9457-751db9c052ac",
      "name": "welcome_template",
      "language": "en",
      "category": "MARKETING",
      "status": "APPROVED",
      "provider_id": "8949194595096852",
      "components": {
        "header": {
          "type": "text",
          "text": {
            "content": "Welcome {{1}}",
            "variables": ["Customer"]
          }
        },
        "body": {
          "text": "Thank you for joining us!",
          "variables": []
        },
        "footer": "Reply STOP to unsubscribe",
        "buttons": [
          {
            "type": "URL",
            "text": "Visit Website",
            "url": "https://example.com"
          }
        ]
      },
      "created_at": "2025-11-01T10:00:00Z",
      "updated_at": "2025-11-15T14:30:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 5,
    "per_page": 10,
    "to": 10,
    "total": 47
  }
}

Template Status Values

StatusDescription
PENDINGSubmitted to Meta, awaiting review
APPROVEDApproved by Meta, ready to use
REJECTEDRejected by Meta, cannot be used
UPDATINGExisting template being updated, under review

Filter Examples

Get first page with 25 templates

GET /api/v3/workspaces/{workspace}/templates?per_page=25&page=1

Get all approved templates

Use the response data and filter by status: "APPROVED" on the client side, or use Sync to update statuses.
Use the Sync endpoint regularly to update template statuses from Meta.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace
string<uuid>
required

ID of the workspace.

Query Parameters

per_page
integer
default:10

Number of templates per page.

Response

data
object[]
required
meta
object
required