Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint

POST /api/v1/templates

Body

FieldTypeRequiredDescription
namestringyesName of the template
typeenumyestext, image, video, audio, document
bodystringyes if type=textContenu avec placeholders
mediaUrlstringyes si template mediaPublic media URL

Success response 201

{
  "data": {
    "id": "tmpl_uuid",
    "name": "Relance panier",
    "type": "text",
    "body": "Hello {{contact.firstName}}",
    "mediaUrl": null,
    "variables": ["contact.firstName"]
  }
}

Common errors

HTTPCodeWhen
400VALIDATION_ERRORInvalid body
400TEMPLATE_INVALIDPlaceholder invalid