> For the complete documentation index, see [llms.txt](https://api-docs.islash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.islash.io/template-message/send-template-message.md).

# Send Template Message

Sends template messages to your contacts

## Send a template message

> Sends a template message to a specified contact number. Requires a pre-approved template name and its associated variables.

```json
{"openapi":"3.0.0","info":{"title":"iSlash API","version":"1.0.1"},"servers":[{"url":"https://{ISLASH_API_ENDPOINT}/api/public","variables":{"ISLASH_API_ENDPOINT":{"default":"{ISLASH_API_ENDPOINT}","description":"The base hostname for the iSlash API platform."}}}],"paths":{"/send-message":{"post":{"summary":"Send a template message","description":"Sends a template message to a specified contact number. Requires a pre-approved template name and its associated variables.","parameters":[{"in":"header","name":"X-USER-TOKEN","schema":{"type":"string"},"required":true,"description":"The secret key provided by iSlash for accessing the iSlash API platform."}],"requestBody":{"description":"Template message data to send.","required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["session","template_name","identity"],"properties":{"session":{"type":"string","description":"The session key generated by your admin to control which channel can send messages via the API."},"template_name":{"type":"string","description":"The name of the approved WhatsApp template to send."},"identity":{"type":"string","description":"The target contact number (e.g., 85256872847)."},"variable_1":{"type":"string","description":"Template variable 1. The number of required variables depends on the template."},"button_url_variable_1":{"type":"string","description":"Button URL variable 1. Optional, depends on the template."},"catalog_id":{"type":"string","description":"Catalog identifier for product carousel, single product, and catalog templates. Product catalog template sending is supported for iSlash channels only. Accepts the CMS catalog ID, or the Facebook catalog ID if no matching CMS ID exists."},"product_id":{"type":"string","description":"Selected CMS product ID for single product templates."},"product_ids":{"type":"array","description":"Selected product IDs for product carousel templates. For single product templates, product_id is preferred. Accepts repeated multipart fields, a JSON array string, or comma-separated values.","items":{"type":"string"}},"catalog_fb_id":{"type":"string","description":"Facebook catalog ID for product carousel, single product, and catalog templates. Use this when sending with product_retailer_ids, product_retailer_id, or thumbnail_product_retailer_id."},"thumbnail_product_id":{"type":"string","description":"Required CMS product ID to use as the thumbnail product for catalog templates."},"thumbnail_product_retailer_id":{"type":"string","description":"Required Facebook product retailer ID to use as the thumbnail product for catalog templates when not using thumbnail_product_id."},"product_retailer_id":{"type":"string","description":"Selected Facebook product retailer ID for single product templates."},"product_retailer_ids":{"type":"array","description":"Selected product retailer IDs for product carousel templates. For single product templates, product_retailer_id is preferred. Accepts repeated multipart fields, a JSON array string, or comma-separated values.","items":{"type":"string"}},"card_url_variable_1":{"type":"string","description":"Product carousel card URL variable 1. Optional, only required when the carousel template uses a URL button with a variable."},"card_url_parameters":{"type":"array","description":"Product carousel card URL variables. Accepts a JSON array string such as [{\"card_index\":0,\"text\":\"abc\"}].","items":{"type":"object","properties":{"card_index":{"type":"integer"},"text":{"type":"string"}}}},"media":{"type":"string","format":"binary","description":"A media file to include with the template (for templates with IMAGE, VIDEO, or DOCUMENT header)."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["meta","data"],"properties":{"meta":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"data":{"type":"object","properties":{"message":{"type":"object","description":"The sent message object."},"contact":{"type":"object","description":"The contact the message was sent to.","properties":{"id":{"type":"integer","description":"The contact ID."},"identity":{"type":"string","description":"The contact phone number."},"type":{"type":"string","description":"The contact type."},"last_name":{"type":"string","description":"The contact last name."},"first_name":{"type":"string","description":"The contact first name."}}}}}}}}}}}}}}}
```
