Skip to content

Get all account-level template versions

Request

Returns a paginated list of versions for an account-level template.

Security
basicAuth
Path
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 versions to retrieve. Default and max limit is 100.

pstring

Pivot used to retrieve the next page of versions.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v4/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/v4/templates/my-template/versions?page=previous&p=v0&limit=10", "first": "https://api.mailgun.net/v4/templates/my-template/versions?limit=10", "next": "https://api.mailgun.net/v4/templates/my-template/versions?page=next&p=v1&limit=10", "last": "https://api.mailgun.net/v4/templates/my-template/versions?page=last&limit=10" } }