# Update template

## Updates a notification template.

> Updates template properties. Only provided fields will be modified.

```json
{"openapi":"3.0.1","info":{"title":"Marketplace API","version":"5.0.5243-ga0bb7c09"},"servers":[{"url":"https://api.platform.softwareone.com"}],"paths":{"/public/v1/notifications/templates/{id}":{"put":{"tags":["NotificationTemplates"],"summary":"Updates a notification template.","description":"Updates template properties. Only provided fields will be modified.","parameters":[{"name":"id","in":"path","description":"A notification template ID.","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A request DTO model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateDto"}},"text/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateDto"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateDto"}}}},"responses":{"200":{"description":"OK","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":{}}}}}
```
