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

# OSM Templates Overview

> Create, search, and update On-Site Messaging (OSM) templates.

The MoEngage On-Site Messaging (OSM) Templates API allows you to manage your web and app-site messaging templates. You can use this API to upload custom HTML templates created outside the MoEngage ecosystem, making them available for your OSM campaigns.

This API supports multiple template formats including **Banners**, **Pop-ups**, and **Nudges**. Note that templates created via this API are supported within the **Custom HTML Editor** in the MoEngage Dashboard and cannot be used with the Drag and Drop Editor.

## Endpoints

The OSM Templates API is a collection of the following endpoints:

* [Create OSM Template](/api/osm-templates/create-osm-template): Creates a new OSM template with an HTML payload.
* [Update OSM Template](/api/osm-templates/update-osm-template): Updates an existing OSM template and handles campaign versioning.
* [Search OSM Templates](/api/osm-templates/search-osm-templates): Retrieves templates based on filters like template type, source, or creator.

## FAQs

<Accordion title="Which OSM template types are supported?" icon="layer-group">
  The API currently supports the creation and management of **BANNER**, **POP\_UP**, and **NUDGE** template types. All payloads must be in HTML format.
</Accordion>

<Accordion title="Can I use API-created templates in the Drag and Drop Editor?" icon="circle-exclamation">
  No. Templates uploaded via the API are only compatible with the **Custom HTML Editor** in the MoEngage Dashboard.
</Accordion>

<Accordion title="How do I handle updates for live campaigns?" icon="arrows-rotate">
  When updating a template, you can set the `update_campaigns` flag.

  * **True**: Automatically updates all running campaigns to the new template version.
  * **False**: Creates a new version without affecting existing campaigns.
</Accordion>

## Postman Collection

Test these endpoints quickly by importing our Postman collection: [**View in Postman**](https://www.postman.com/moengage-dev/api-docs/collection/28342601-e2d062c4-11b3-45cc-9249-a58d939c3497?action=share\&source=copy-link\&creator=28342601)
