Skip to main content
POST
/
templates
Create a new Template
curl --request POST \
  --url https://commerce.driv.ly/api/templates \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "tmp_39fjkd93nmd0",
  "type": "Email",
  "subject": "Invoice Details",
  "messageText": "Hello, please find your invoice attached."
}'
{
  "data": {
    "id": "tmp_39fjkd93nmd0",
    "type": "Email",
    "subject": "Invoice Details",
    "messageText": "Hello, please find your invoice attached."
  },
  "success": true
}

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
type
string
required

Template has Template Type

messageText
string
required

Template has Message Text

id
string

Template is uniquely identified by id

subject
string

Template has Subject

Response

Template Created

data
object
Examples:
{
"id": "tmp_39fjkd93nmd0",
"type": "Email",
"subject": "Invoice Details",
"messageText": "Hello, please find your invoice attached."
}
success
boolean
I