# Create Template Variant

## Creates a template variant.

> Adds a new language variant to the template with subject and body content for the specified language.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5102-g2bf281b6"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/notifications/templates/{templateId}/variants":{"post":{"tags":["TemplateVariants"],"summary":"Creates a template variant.","description":"Adds a new language variant to the template with subject and body content for the specified language.","parameters":[{"name":"templateId","in":"path","description":"A notification template ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A request DTO model.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TemplateVariantDto"}]}},"text/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TemplateVariantDto"}]}},"application/*+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/TemplateVariantDto"}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TemplateVariant"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"TemplateVariantDto":{"type":"object","properties":{"languageCode":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"}},"additionalProperties":false},"TemplateVariant":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/TemplateVariantAudit"}],"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.TemplateVariant."},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"revision":{"type":"integer","format":"int32"},"body":{"type":"string","description":"Gets or sets the body content for this variant.","nullable":true},"default":{"type":"boolean","description":"Gets or sets a value indicating whether this is the default variant for the parent template."},"languageCode":{"type":"string","description":"Gets or sets the language code for this variant."},"template":{"type":"object","allOf":[{"$ref":"#/components/schemas/NotificationTemplateRef"}]},"status":{"type":"string","description":"Gets or sets the current status of the variant."},"subject":{"type":"string","description":"Gets or sets the subject for messages created from this variant.","nullable":true}},"additionalProperties":false,"description":"Represents a language-specific variant of a template."},"TemplateVariantAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the variant was deleted.","nullable":true}},"additionalProperties":false,"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.TemplateVariant."},"PlatformObjectEvent":{"type":"object","properties":{"at":{"type":"string","format":"date-time","nullable":true},"by":{"type":"object","allOf":[{"$ref":"#/components/schemas/PlatformIdentityRef"}]}},"additionalProperties":false},"PlatformIdentityRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"}},"additionalProperties":false},"PlatformMetadata":{"type":"object","properties":{"omitted":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"NotificationTemplateRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this template was last used to send a notification.","format":"date-time","nullable":true},"status":{"type":"string","description":"Gets or sets the current status of the template."}},"additionalProperties":false,"description":"Represents a reusable template that can be used to generate messages."},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string","nullable":true},"title":{"type":"string","nullable":true},"status":{"type":"integer","format":"int32","nullable":true},"detail":{"type":"string","nullable":true},"instance":{"type":"string","nullable":true}},"additionalProperties":{}}}}}
```
