LineDevelopers

Create a template

POST/api/v1/templates
Bearer key, test or live

Request body

namestringrequired
bodystringrequired

Text with {{variable}} placeholders.

Responses

201The template.
409An active template already uses the name.
Plus 400, 401, 403, 429, 503. See Errors.
curl -X POST 'https://staging.useline.io/api/v1/templates' \
  -H "Authorization: Bearer $LINE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Appointment reminder",
    "body": "Hi {{first_name}}, see you on {{date}}."
  }'