Template Detail
Overview
The Template Detail API allows businesses to fetch RCS template information associated with their account.
The API response includes template metadata such as content, title, description, media details, card alignment, height, width, and other configuration parameters.
Authentication
This API requires Bearer Token Authentication.
Refer to Authentication for details on generating and using access tokens.
- API Endpoints: -
/v2/rcs/<appId>/templates/<templateName> - Authentication: - This API requires Bearer token authentication. See Authentication for more details.
- Method: -
GET
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | The request was successful. The response body contains the template details. | Template |
| 400 | Bad Request | Invalid query parameters were provided. | BadRequest |
| 401 | Unauthorized | Missing or invalid Authorization header. | None |
| 403 | Forbidden | The provided token does not have permission to access this resource. | None |
| 404 | Not Found | The specified template could not be found. | NotFound |
| 429 | Too Many Requests | API rate limit exceeded. Retry after the time specified in the Retry-After header. | None |
| 500 | Internal Server Error | Something went wrong while processing the request. | InternalServerError |
| 502 | Bad Gateway | The upstream service failed to respond correctly. | None |
| 503 | Service Unavailable | The API is temporarily unavailable, usually due to maintenance or overload. | None |
| 504 | Gateway Timeout | The server did not receive a timely response from the upstream service. | None |
Template
JSON Representation
{
"component": {
object (MessageContent)
},
"name": string,
"type": enum (TemplateType),
"status": enum (TemplateStatus),
"ttl": string
}
See MessageContent, TemplateType and TemplateStatus for more details.
Fields
| Fields | |
|---|---|
| component | object (MessageContent) The content of the message template. See MessageContent for structure details. |
| name | string Name of the template. Must be unique. |
| type | enum (TemplateType) Type of the template (e.g., text_message, rich_card, carousel).See TemplateType. |
| status | enum (TemplateStatus) Approval status of the template ( approved, pending, rejected, expired).See TemplateStatus. |
| ttl | string (Timestamp format) (Optional) Timestamp in UTC indicating when the media within this template expires. |
BadRequest
JSON Representation
{
"error": {
"code": 400,
"message": string
}
}
Fields
| Fields | |
|---|---|
| error.code | integer The HTTP status code of the error. Always returns 400 for Bad Request responses. |
| error.message | string Descriptive message detailing which parameter in the body or query was invalid or missing. |
InternalServerError
JSON Representation
{
"error": {
"message": "Something went wrong.",
"code": 500
}
}
Fields
| Fields | |
|---|---|
| error.code | integer The HTTP status code of the error. Always returns 500 for Internal Server Error responses. |
| error.message | string A generic message indicating that something went wrong on the server while processing the request. |
NotFound
JSON Representation
{
"error": {
"message": "Template Not Found for appId: <appId> and templateName: <templateName>",
"code": 404
}
}
Fields
| Fields | |
|---|---|
| error.code | integer The HTTP status code of the error. Always returns 404 when the requested template cannot be found. |
| error.message | string Message indicating that the template was not found for the specified appId and templateName. |