> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.chatbridge.mx/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.chatbridge.mx/_mcp/server.

# Get template detail

GET https://connect.chatbridge.mx/v1/rcs/templates/{templateId}

Returns the full structure of the template plus an `example` object: a ready-to-use body for `POST /v1/rcs/messages` where you only need to substitute `AGENT_ID` with a real agent of the **same type** as the template.

The `template` field is an object for `BASIC` templates and an array of cards for `SINGLE` / `CONVERSATIONAL` templates. Placeholders like `{{nombre}}` are variables you must provide when sending; the `{{UUID_MESSAGE}}` placeholder is internal and resolved by the system — never send it.

Reference: https://docs.chatbridge.mx/rcs/templates/get-rcs-template

## Authentication

- `x-api-key` header (required) — Account authentication key. The App-Key must have the RCS channel enabled.
- `Authorization` header (bearer token, required) — OAuth 2.0 access token issued by `POST /api/oauth/token` (client-credentials). Takes precedence over `x-api-key` when both are sent. See the Authentication section.

## Request

### Path parameters

- `templateId` (string, required) — Template identifier.

## Response

### 200

Template detail with send example.

- `id` (string, optional) — Template identifier. Use it as `template_id` when sending a message.
- `name` (string, optional)
- `account` (string, optional) — Owner account (informational).
- `status` (boolean, optional) — Always true; only active templates are listed.
- `type` (enum, optional) — RCS content type. The agent's type must match the template's type when sending.
  - Allowed values: `BASIC`, `SINGLE`, `CONVERSATIONAL`
- `created_at` (datetime, optional)
- `updated_at` (datetime, optional)
- `template` (TemplateDetailTemplate, optional) — Template structure. Object `{ text, suggestions? }` for `BASIC`; array of cards (`richCard` with `standaloneCard` or `carouselCard`) for `SINGLE`; array of contents with `contentInfo` and `suggestions` for `CONVERSATIONAL`. Placeholders `{{...}}` are the variables to provide when sending, except `{{UUID_MESSAGE}}`, which is internal.
- `example` (map from string to any, optional) — Ready-to-use body for `POST /v1/rcs/messages`; substitute `AGENT_ID` with a real agent of the same type as the template.

## Errors

### 401 Unauthorized Error

Authentication is missing or invalid.

- `message` (string, optional)
- `error` (string, optional)
- `statusCode` (integer, optional)
- `errorCode` (integer, optional)
- `metadata` (map from string to any, optional)

### 403 Forbidden Error

The API Key does not have access to the RCS channel.

- `message` (string, optional)
- `error` (string, optional)
- `statusCode` (integer, optional)
- `errorCode` (integer, optional)
- `metadata` (map from string to any, optional)

### 404 Not Found Error

The template does not exist, is inactive, or does not belong to the account.

- `message` (string, optional)
- `error` (string, optional)
- `statusCode` (integer, optional)
- `errorCode` (integer, optional)
- `metadata` (map from string to any, optional)

### 429 Too Many Requests Error

The requests-per-minute limit was exceeded.

- `message` (string, optional)
- `error` (string, optional)
- `statusCode` (integer, optional)
- `errorCode` (integer, optional)
- `metadata` (map from string to any, optional)

## Types

### TemplateDetailTemplate

Template structure. Object `{ text, suggestions? }` for `BASIC`; array of cards (`richCard` with `standaloneCard` or `carouselCard`) for `SINGLE`; array of contents with `contentInfo` and `suggestions` for `CONVERSATIONAL`. Placeholders `{{...}}` are the variables to provide when sending, except `{{UUID_MESSAGE}}`, which is internal.

- map from string to any
- list of map from string to any

## Examples

### BASIC template (text with suggestions)

**Response**

```json
{
  "id": "665f1a2b3c4d5e6f7a8b9c0d",
  "name": "promo_verano",
  "account": "660a1b2c3d4e5f6a7b8c9d0e",
  "status": true,
  "type": "BASIC",
  "created_at": "2026-07-01T15:04:05.000Z",
  "updated_at": "2026-07-01T15:04:05.000Z",
  "template": {
    "suggestions": [
      {
        "reply": {
          "postbackData": "info_{{UUID_MESSAGE}}",
          "text": "Quiero info"
        }
      }
    ],
    "text": "Hola {{nombre}}, aprovecha nuestra promoción de verano. Responde para más información."
  },
  "example": {
    "agent_id": "AGENT_ID",
    "template_id": "665f1a2b3c4d5e6f7a8b9c0d",
    "to": "+5215512345678",
    "variables": {
      "nombre": "TEXTO_DINAMICO"
    }
  }
}
```

**SDK Code**

```python BASIC template (text with suggestions)
import requests

url = "https://connect.chatbridge.mx/v1/rcs/templates/templateId"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript BASIC template (text with suggestions)
const url = 'https://connect.chatbridge.mx/v1/rcs/templates/templateId';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go BASIC template (text with suggestions)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://connect.chatbridge.mx/v1/rcs/templates/templateId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby BASIC template (text with suggestions)
require 'uri'
require 'net/http'

url = URI("https://connect.chatbridge.mx/v1/rcs/templates/templateId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java BASIC template (text with suggestions)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://connect.chatbridge.mx/v1/rcs/templates/templateId")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php BASIC template (text with suggestions)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://connect.chatbridge.mx/v1/rcs/templates/templateId', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp BASIC template (text with suggestions)
using RestSharp;

var client = new RestClient("https://connect.chatbridge.mx/v1/rcs/templates/templateId");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift BASIC template (text with suggestions)
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.chatbridge.mx/v1/rcs/templates/templateId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### SINGLE template (rich card)

**Response**

```json
{
  "id": "665f1a2b3c4d5e6f7a8b9c1e",
  "name": "catalogo_temporada",
  "account": "660a1b2c3d4e5f6a7b8c9d0e",
  "status": true,
  "type": "SINGLE",
  "created_at": "2026-07-01T15:04:05.000Z",
  "updated_at": "2026-07-01T15:04:05.000Z",
  "template": [
    {
      "richCard": {
        "standaloneCard": {
          "cardContent": {
            "description": "{{descripcion}}",
            "media": {
              "contentInfo": {
                "fileUrl": "{{imagen}}",
                "thumbnailUrl": "{{imagen}}",
                "type": "IMAGE"
              },
              "height": "MEDIUM"
            },
            "suggestions": [
              {
                "action": {
                  "openUrlAction": {
                    "url": "{{url_producto}}"
                  },
                  "postbackData": "ver_{{UUID_MESSAGE}}",
                  "text": "Ver más"
                }
              }
            ],
            "title": "{{titulo}}"
          },
          "cardOrientation": "VERTICAL"
        }
      }
    }
  ],
  "example": {
    "agent_id": "AGENT_ID",
    "template_id": "665f1a2b3c4d5e6f7a8b9c1e",
    "to": "+5215512345678",
    "variables": {
      "descripcion": "TEXTO_DINAMICO",
      "imagen": "https://cdn.tudominio.com/archivo.jpg",
      "titulo": "TEXTO_DINAMICO",
      "url_producto": "https://cdn.tudominio.com/archivo.jpg"
    }
  }
}
```

**SDK Code**

```python SINGLE template (rich card)
import requests

url = "https://connect.chatbridge.mx/v1/rcs/templates/templateId"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript SINGLE template (rich card)
const url = 'https://connect.chatbridge.mx/v1/rcs/templates/templateId';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SINGLE template (rich card)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://connect.chatbridge.mx/v1/rcs/templates/templateId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SINGLE template (rich card)
require 'uri'
require 'net/http'

url = URI("https://connect.chatbridge.mx/v1/rcs/templates/templateId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java SINGLE template (rich card)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://connect.chatbridge.mx/v1/rcs/templates/templateId")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php SINGLE template (rich card)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://connect.chatbridge.mx/v1/rcs/templates/templateId', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp SINGLE template (rich card)
using RestSharp;

var client = new RestClient("https://connect.chatbridge.mx/v1/rcs/templates/templateId");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift SINGLE template (rich card)
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.chatbridge.mx/v1/rcs/templates/templateId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```