# Save an email template

`POST /crm/templates` · Rivier · campaigns

Save an email template.

- Scope: campaigns:write
- Graphql: Mutation.campaignsTemplateCreate
- Sdk: campaigns.template.create
- Cli: campaigns template create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 120
    },
    "subject": {
      "type": "string",
      "maxLength": 200
    },
    "html": {
      "type": "string",
      "maxLength": 500000
    },
    "text": {
      "type": "string",
      "maxLength": 100000
    }
  },
  "required": [
    "name",
    "html"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/crm/templates' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "html": "string"
}'
```
