---
title: "Template Preview API"
method: GET
path: "/rcs/template/preview"
tags: ["Template APIs"]
---

# Template Preview API

`GET /rcs/template/preview`

## Request

- Base URL: `https://soipapi.netcorecloud.com`
- URL: `https://soipapi.netcorecloud.com/rcs/template/preview`
- Auth: HTTP bearer

Retrieve detailed preview information for a specific RCS template.
This endpoint returns template content, status, orientation, alignment, and all suggestion details.

## Query parameters

- `template_id` integer, required

## Headers

- `api_key` string, required
- `Content-Type` string, required
- `nc_bot_id` string

## Response `200`

Successfully fetched template preview data.

```
{
    "status": "success",
    "message": "Data fetched successfully",
    "template_id": 9753,
    "data": {
        "template_name": "test_half",
        "template_type": "text_message",
        "template_status": "auto-approved",
        "template_content": "Hello welocme to netcore",
        "orientation": "",
        "alignment": "",
        "height": "",
        "width": "",
        "suggestion_details": [
            {
                "suggestion_type": "2",
                "suggestion": "{\"displayText\":\"Visit half\",\"postback\":\"Visit half\",\"url\":\"https://www.netcorecloud.com/\",\"webview\":\"Half\"}"
            },
            {
                "suggestion_type": "1",
                "suggestion": "{\"displayText\":\"Click here\",\"postback\":\"Click here\"}"
            },
            {
                "suggestion_type": "8",
                "suggestion": "{\"displayText\":\"Visit Tall\",\"postback\":\"Visit Tall\",\"url\":\"https://www.netcorecloud.com\",\"domain\":\"https://qa.nctrckg.com\",\"suggestionAttr\":\"[button_3_url]\",\"webview\":\"Tall\"}"
            },
            {
                "suggestion_type": "2",
                "suggestion": "{\"displayText\":\"Visit Full\",\"postback\":\"Visit Full\",\"url\":\"https://www.abcccccc.com/\",\"webview\":\"Full\"}"
            },
            {
                "suggestion_type": "2",
                "suggestion": "{\"displayText\":\"Visit Default\",\"postback\":\"Visit Default\",\"url\":\"https://www.netcorecloud.com/\"}"
            },
            {
                "suggestion_type": "4",
                "suggestion": "{\"displayText\":\"Get Location\",\"postback\":\"Get Location\",\"latitude\":\"23.455\",\"longitude\":\"54.566\",\"label\":\"Netcore\"}"
            }
        ],
        "created_date": "2025-11-07 18:41:08",
        "updated_date": "2025-11-07 18:45:00"
    }
}
```

- object
  - `status` string: Response status
  - `message` string: Response message
  - `template_id` integer: The ID of the template
  - `data` object
    - `template_name` string: Name of the template
    - `template_type` string: Type of the template (e.g., text_message, carousel, rich_card)
    - `template_status` string: Status of the template (e.g., approved, auto-approved, pending)
    - `template_content` string: Content/text of the template
    - `orientation` string: Orientation of the template (vertical/horizontal)
    - `alignment` string: Alignment of the template (left/right/center)
    - `height` string: Height of the template (SHORT/MEDIUM/TALL)
    - `width` string: Width of the template (SMALL/MEDIUM/LARGE)
    - `suggestion_details` object[]: Array of suggestion details for the template
      - `suggestion_type` string: Type of suggestion: 1 = REPLY 2 = OPEN_URL 4 = SHOW_LOCATION 8 = OPEN_URL with dynamic attributes
      - `suggestion` string: JSON string containing suggestion details. Structure varies by suggestion_type: - Type 1 (REPLY): {"displayText":"...","postback":"..."} - Type 2 (OPEN_URL): {"displayText":"...","postback":"...","url":"...","webview":"..."} - Type 4 (SHOW_LOCATION): {"displayText":"...","postback":"...","latitude":"...","longitude":"...","label":"..."} - Type 8 (OPEN_URL with dynamic): {"displayText":"...","postback":"...","url":"...","domain":"...","suggestionAttr":"...","webview":"..."}
    - `created_date` string, date-time: Template creation date
    - `updated_date` string, date-time: Template last update date

## Other responses

- `400`: Returned for invalid authentication, incorrect content type, or missing/invalid template_id. **Invalid API Key:** ``` { "errors": [ { "message": "Authorization Failed, invalid token", "field": "api_key" } ] } ``` **Invalid Content Type:** ``` { "errors": [ { "message": "ContentType not valid", "field": "ContentType" } ] } ``` **Missing or Invalid Template ID:** ``` { "errors": [ { "message": "Template ID is required", "field": "template_id" } ] } ```
- `404`: Template not found. ``` { "status": "error", "message": "Template not found", "template_id": 9753 } ```

---

[API](https://skmtc.dev/netcorecloud/apis/rcs-api.md) - [All operations](https://skmtc.dev/netcorecloud/apis/rcs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/netcorecloud/apis/rcs-api/revisions/479db24ef963?raw)
