Mailgun supports the creation, modification, and deletion of subaccounts. A subaccount is a child account of a parent account. The parent account can have multiple subaccounts. The subaccounts are created and managed by the parent account.
Get a single subaccount
get/v5/accounts/subaccounts/{subaccount_id}
Fetch the details of a single subaccount
SecuritybasicAuth
Request
path Parameters
subaccount_id
required
string
The ID of the subaccount
Responses
200
A 200 response
Response Schema: application/json
object
id
string
The ID of the subaccount
name
string
The name of the subaccount
status
string
The status of the subaccount
Enum:"disabled""open"
404
A 404 response
Request samples
curl
Go
Node.js
PHP
Java
Python
C#
Ruby
Response samples
200
404
application/json
{
"subaccount": {
"id": "123",
"name": "My subaccount",
"status": "open"
}
}
List all subaccounts
get/v5/accounts/subaccounts
Fetch all subaccounts
SecuritybasicAuth
Request
query Parameters
sort
string
Sort order
Enum:"asc""desc"
filter
string
Name of account to filter by
limit
integer [ 1 .. 1000 ]
Default: 10
Number of subaccounts to return
skip
integer
Default: 0
Number of subaccounts to skip
enabled
boolean
Indicate to include only enabled or disabled subaccounts