Skip to main content

Endpoint

POST /api/v1/templates

Body

ChampTypeRequisDescription
namestringouiNom du template
typeenumouitext, image, video, audio, document
bodystringoui si type=textContenu avec placeholders
mediaUrlstringoui si template mediaURL publique du media

Réponse succès 201

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

Erreurs courantes

HTTPCodeQuand
400VALIDATION_ERRORBody invalide
400TEMPLATE_INVALIDPlaceholder invalide