> For the complete documentation index, see [llms.txt](https://docs.platform.softwareone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform.softwareone.com/developer-resources/rest-api/notifications-api/template/create-template.md).

# Create template

## Creates a notification template.

> Creates a new notification template in draft state. Add language variants and activate before use.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5843-g491c2e59"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/notifications/templates":{"post":{"tags":["NotificationTemplates"],"summary":"Creates a notification template.","description":"Creates a new notification template in draft state. Add language variants and activate before use.","requestBody":{"description":"A request DTO model.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateDto"}]}},"text/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateDto"}]}},"application/*+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateDto"}]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplate"}}}},"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":{"NotificationTemplateDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"category":{"allOf":[{"$ref":"#/components/schemas/ReferenceDto"}]},"criteria":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteriaDto"}],"nullable":true},"externalId":{"type":"string","nullable":true},"defaultVariant":{"allOf":[{"$ref":"#/components/schemas/ReferenceDto"}],"nullable":true}},"additionalProperties":false},"ReferenceDto":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":false},"NotificationTemplateCriteriaDto":{"type":"object","properties":{"accountTypes":{"type":"array","items":{"$ref":"#/components/schemas/AccountType"}},"objectType":{"allOf":[{"$ref":"#/components/schemas/NotificationEventObjectType"}],"nullable":true},"filterCondition":{"type":"string"},"recipients":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteriaRecipientDto"}],"nullable":true}},"additionalProperties":false},"AccountType":{"enum":["Client","Vendor","Operations"],"type":"string"},"NotificationEventObjectType":{"enum":["Account","AccountUser","AccountUserBuyerVisibility","Agreement","AgreementAttachment","AgreementLine","ApiToken","Asset","Authorization","Buyer","BuyerSeller","Category","Certificate","Chat","ChatMessage","ChatParticipant","ChatAttachment","CloudTenant","Contact","CreditMemo","CreditMemoAttachment","Currency","CustomLedger","CustomLedgerAttachment","Document","Enrollment","ErpItem","ErpLink","ErpLinkTest","Extension","ExtensionCategory","ExtensionDocument","ExtensionInstallation","ExtensionInstance","ExtensionMedia","ExtensionMeta","ExtensionTerm","ExtensionTermVariant","Feedback","File","Footer","Form","Installation","Invoice","InvoiceAttachment","ItemGroup","Journal","JournalAttachment","Ledger","LedgerAttachment","Licensee","Listing","Media","MessageTemplate","Module","NotificationTemplate","Order","OrderLine","Override","Pair","Parameter","ParameterDefinition","ParameterGroup","PriceList","PriceListItem","PricingPolicy","PricingPolicyAttachment","Product","ProductDocument","ProductItem","ProductMedia","Program","ProgramDocument","ProgramMedia","ProgramParameterDefinition","ProgramParameterGroup","ProgramTemplate","ProgramTerms","ProgramTermsVariant","PublicCatalogCategory","PublicCatalogIndustry","PublicCatalogProductProfile","PublicCatalogSegment","PublicCatalogVendorProfile","Queue","Quote","Rate","Request","RequestAttachment","RequestMessage","SalesOrder","SalesQuote","Seller","Service","SplitBillingAgreement","SplitBillingSubscription","Statement","StatementAttachment","Subscriber","Subscription","SupportCase","Task","TaskLog","TaskResult","Template","TemplateVariant","Term","Terms","TermsVariant","TermVariant","UnitOfMeasure","User","UserGroup","Webhook"],"type":"string"},"NotificationTemplateCriteriaRecipientDto":{"type":"object","properties":{"selector":{"type":"string"}},"additionalProperties":false},"NotificationTemplate":{"type":"object","properties":{"id":{"type":"string"},"audit":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateAudit"}],"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.NotificationTemplate."},"$meta":{"allOf":[{"$ref":"#/components/schemas/PlatformMetadata"}],"nullable":true},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"category":{"type":"object","allOf":[{"$ref":"#/components/schemas/CategoryRef"}]},"criteria":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteria"}],"description":"Gets or sets the criteria for automatic triggering of this template based on events.","nullable":true},"defaultVariant":{"type":"object","allOf":[{"$ref":"#/components/schemas/TemplateVariantRef"}]},"description":{"type":"string","description":"Gets or sets the description of this template.","nullable":true},"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},"owner":{"type":"object","allOf":[{"$ref":"#/components/schemas/AccountRef"}]},"statistics":{"allOf":[{"$ref":"#/components/schemas/MessageStatistics"}],"description":"Gets or sets the usage statistics for this template."},"status":{"type":"string","description":"Gets or sets the current status of the template."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/TemplateVariantRef"},"description":"Gets or sets the list of language-specific variants for this template."},"externalId":{"type":"string","description":"Gets or sets an external identifier for integration with external systems.","nullable":true}},"additionalProperties":false,"description":"Represents a reusable template that can be used to generate messages."},"NotificationTemplateAudit":{"type":"object","properties":{"created":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"updated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"nullable":true},"activated":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was activated.","nullable":true},"deleted":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was deleted.","nullable":true},"disabled":{"allOf":[{"$ref":"#/components/schemas/PlatformObjectEvent"}],"description":"Gets or sets the event information for when the template was disabled.","nullable":true}},"additionalProperties":false,"description":"Represents audit information for a Mpt.Notifications.Models.NotificationTemplates.NotificationTemplate."},"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},"CategoryRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"revision":{"type":"integer","format":"int32"},"description":{"type":"string","description":"Gets or sets the description of the category."},"lastUsed":{"type":"string","description":"Gets or sets the timestamp of when this category was last used to send a notification.","format":"date-time","nullable":true}},"additionalProperties":false,"description":"Represents a notification category that can be used to organize and filter notifications."},"NotificationTemplateCriteria":{"type":"object","properties":{"accountTypes":{"type":"array","items":{"type":"string"},"description":"Gets or sets the list of account types for which this template should trigger."},"filterCondition":{"type":"string","description":"Gets or sets the RQL filter condition that must be satisfied for the template to trigger."},"objectType":{"type":"string","description":"Gets or sets the platform object type this template monitors."},"recipients":{"allOf":[{"$ref":"#/components/schemas/NotificationTemplateCriteriaRecipients"}],"description":"Gets or sets the custom Recipients condition. If specified, this RQL condition determines the recipients of the notification.","nullable":true}},"additionalProperties":false,"description":"Represents the criteria for automatically triggering a template based on platform events."},"NotificationTemplateCriteriaRecipients":{"type":"object","properties":{"selector":{"type":"string","description":"Gets or sets the RQL filter condition that must be satisfied for the template to trigger."}},"additionalProperties":false,"description":"Represents the recipients criteria for automatically triggering a template based on platform events."},"TemplateVariantRef":{"type":"object","properties":{"id":{"type":"string"},"revision":{"type":"integer","format":"int32"},"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."},"status":{"type":"string","description":"Gets or sets the current status of the variant."}},"additionalProperties":false,"description":"Represents a language-specific variant of a template."},"AccountRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"icon":{"type":"string","nullable":true},"revision":{"type":"integer","format":"int32"},"type":{"allOf":[{"$ref":"#/components/schemas/AccountType"}],"nullable":true},"status":{"allOf":[{"$ref":"#/components/schemas/AccountStatus"}],"nullable":true}},"additionalProperties":false},"AccountStatus":{"enum":["Active","Enabled","Disabled"],"type":"string"},"MessageStatistics":{"type":"object","properties":{"month":{"type":"integer","description":"Gets or sets the number of messages sent in the current month.","format":"int32"},"today":{"type":"integer","description":"Gets or sets the number of messages sent today.","format":"int32"},"week":{"type":"integer","description":"Gets or sets the number of messages sent in the current week.","format":"int32"}},"additionalProperties":false,"description":"Represents message statistics aggregated over different time periods."},"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":{}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/notifications-api/template/create-template.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
