Skip to content

Tags

Mailgun lets you tag each outgoing message with a custom value. When you access stats on your messages, they will be aggregated by these tags.

WARNING: This API is deprecated in favor of our new Tags API.

List all tags
deprecated

Request

List all tags associated with a domain

Security
basicAuth
Path
domainstringrequired

The domain name

Query
pagestring

The page direction based on the tag parameter; valid choices are (first, last, next, prev)

limitinteger

Limits the number of items returned in a request

tagstring

The tag that marks the end of the current page and the start of the next

prefixstring

List only tags that begin with this prefix

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/{domain}/tags?page=string&limit=0&tag=string&prefix=string'

Responses

A 200 response

Bodyapplication/json
itemsArray of objects(github.com-mailgun-scout-model-tags-TagItem)required
pagingobject(github.com-mailgun-scaffold-httpapi-paging-PagingResponse)required
Response
{ "items": [ {}, {} ], "paging": { "previous": "https://api.mailgun.net/v3/example.com/tags?limit=1000&page=prev&tag=", "first": "https://api.mailgun.net/v3/example.com/tags?limit=1000&page=first&tag=", "next": "https://api.mailgun.net/v3/example.com/tags?limit=1000&page=next&tag=", "last": "https://api.mailgun.net/v3/example.com/tags?limit=1000&page=last&tag=" } }