Create a template
Create a template. The from domain must already be a verified sending identity for this project — an unverified sender answers 403 forbidden here rather than becoming a campaign that fails at send time.
Requires the templates:write scope — Create, edit, and delete your email templates.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
application/json- body
Body for POST /api/v1/templates.
name*string1 <= length <= 100description?|length <= 500subject*string1 <= lengthbody*string1 <= lengthfrom*stringSender address. Its domain must be verified for this project.
emailfrom_name?|length <= 100reply_to?|emailemail_category?string"MARKETING""TRANSACTIONAL""MARKETING""SELF_MANAGED_UNSUBSCRIBE"The created template
application/json- response
An email template as exposed on the v1 API.
id*stringuuidname*stringdescription*string|nullsubject*stringbody*stringfrom*stringfrom_name*string|nullreply_to*string|nullemail_category*string"TRANSACTIONAL""MARKETING""SELF_MANAGED_UNSUBSCRIBE"version*integercreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api.sendly.now/api/v1/templates' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "subject": "string", "body": "string", "from": "user@example.com"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "subject": "string", "body": "string", "from": "string", "from_name": "string", "reply_to": "string", "email_category": "TRANSACTIONAL", "version": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}