Skip to content

Update a version

Request

Update information or content of the specific template version. Existing fields not included in the request will not be changed

Security
basicAuth
Path
domain_namestringrequired

Domain name the template is associated with.

template_namestringrequired

Template name the version is stored under.

version_namestringrequired

Tag of the version of the template to be updated

Bodymultipart/form-datarequired
templatestring

Content of the template.

commentstring

Comment related to the version that is being created.

activestring

If this flag is set to yes, this version becomes active

headersstring

Key value JSON object of headers to be stored with the template. Where key is the header name and value is the header value. The header names From, Subject, and Reply-To are the only ones currently supported. These headers will be inserted into the MIME at the time we attempt delivery.

curl -i -X PUT \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/templates/{template_name}/versions/{version_name}' \
  -H 'Content-Type: multipart/form-data' \
  -F template=string \
  -F comment=string \
  -F active=string \
  -F headers=string

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

templateobject(github.com-mailgun-temple-httpapi-templateUpdate)required

Template change details

Response
{ "message": "version has been updated", "template": { "name": "template_name", "version": {} } }