---
title: "Register an RCS content template for a workspace (platform owner only)"
description: "Stores a reference to a Twilio Content Template (created via the Content API or Console) so it can be reused by id. variable_mapping maps Twilio's numbered placeholders ({{1}}, {{2}}, …) to contact/appointment field paths that are resolved at send time. SaaS platform owner access required.\n"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › RCS

`POST /api/rcs/workspaces/{workspaceId}/templates`

Stores a reference to a Twilio Content Template (created via the Content API or Console) so it can be reused by id. variable_mapping maps Twilio's numbered placeholders ({{1}}, {{2}}, …) to contact/appointment field paths that are resolved at send time. SaaS platform owner access required.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `workspaceId` (`post/api/rcs/workspaces/workspaceId/templates.path.workspaceId`; string, required)

## Request body

_Required._

- `contentSid` (`post/api/rcs/workspaces/workspaceId/templates.contentSid`; string, required) — Twilio Content SID (HX…)
- `label` (`post/api/rcs/workspaces/workspaceId/templates.label`; string, required) — Operator-facing name
- `description` (`post/api/rcs/workspaces/workspaceId/templates.description`; string, optional)
- `variableMapping` (`post/api/rcs/workspaces/workspaceId/templates.variableMapping`; object, optional) — e.g. {"1":"contact.firstname","2":"appointment.appointment_date"}
- `smsFallback` (`post/api/rcs/workspaces/workspaceId/templates.smsFallback`; string, optional) — Reference copy of the SMS fallback text

## Example request

```json
{
  "contentSid": "string",
  "label": "string",
  "description": "string",
  "variableMapping": {},
  "smsFallback": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/rcs/workspaces/<workspaceId>/templates' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contentSid": "string",
  "label": "string",
  "description": "string",
  "variableMapping": {},
  "smsFallback": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/rcs/workspaces/<workspaceId>/templates';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    contentSid: 'string',
    label: 'string',
    description: 'string',
    variableMapping: {},
    smsFallback: 'string'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/rcs/workspaces/<workspaceId>/templates"

payload = {
    "contentSid": "string",
    "label": "string",
    "description": "string",
    "variableMapping": {},
    "smsFallback": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Template registered (or already existed — upserted on content_sid).

### 400

Missing contentSid or label.

### 401

Authentication required

#### Example

```json
{
  "error": "Authentication required",
  "success": false
}
```

- `error` (`post/api/rcs/workspaces/workspaceId/templates.response.401.error`; string, optional)
  - example `"Authentication required"`
- `success` (`post/api/rcs/workspaces/workspaceId/templates.response.401.success`; boolean, optional)
  - example `false`

### 403

SaaS owner access required.

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`post/api/rcs/workspaces/workspaceId/templates.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`post/api/rcs/workspaces/workspaceId/templates.response.500.details`; string, optional)
- `success` (`post/api/rcs/workspaces/workspaceId/templates.response.500.success`; boolean, optional)
  - example `false`

### 503

Identity verification is temporarily unavailable.


Source: https://developer.channelautomations.com/api/post-api-rcs-workspaces-workspace-id-templates/index.md
