Skip to content

Get all template versions

Request

Returns a paginated list of template versions.

Security
basicAuth
Path
domain_namestringrequired

Domain name to fetch the templates for.

template_namestringrequired

Template name to fetch the versions for.

Query
pagestring

Name of the page to retrieve. Value can be first, last, next, or previous. Defaults to first.

Enum ValueDescription
first

Get the first list's page

last

Get the last list's page

next

Get the next list's page

previous

Get the previous list's page

limitinteger

Number of templates to retrieve. Default and max limit is 100.

pstring

Pivot used to retrieve the next page of templates.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain_name}/templates/{template_name}/versions?page=first&limit=0&p=string'

Responses

A 200 response

Bodyapplication/json
templategithub.com-mailgun-temple-model-Template (object) or nullrequired
Any of:

Template details

pagingobject(github.com-mailgun-scaffold-httpapi-paging-PagingResponse)required

Pagination details

Response
{ "template": { "name": "template_name", "description": "This is the description of the template", "createdAt": "Sat, 12 Nov 1955 06:38:00 UTC", "createdBy": "user-supplied-value", "id": "46565d87-68b6-4edb-8b3c-34554af4bb77", "domain": "example.com", "versions": [] }, "paging": { "previous": "https://api.mailgun.net/v3/{domain}/templates/z4ujt7CiEeik0RJbspqxaQ/versions?page=previous&p=v0&limit=10", "first": "https://api.mailgun.net/v3/{domain}/templates/z4ujt7CiEeik0RJbspqxaQ/versions?limit=10", "next": "https://api.mailgun.net/v3/{domain}/templates/z4ujt7CiEeik0RJbspqxaQ/versions?page=next&p=v2&limit=10", "last": "https://api.mailgun.net/v3/{domain}/templates/z4ujt7CiEeik0RJbspqxaQ/versions?page=last&limit=10" } }