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.
Fetch the details of a single subaccount
A 200 response
A 404 response
{- "subaccount": {
- "id": "123",
- "name": "My subaccount",
- "created_at": "Wed, 06 Nov 2024 19:48:29 GMT",
- "updated_at": "Wed, 28 May 2025 20:03:05 GMT",
- "status": "open"
}
}
Fetch all subaccounts
sort | string Sort order
| ||||||
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 |
{- "subaccounts": [
- {
- "id": "123",
- "name": "My subaccount",
- "status": "open",
- "created_at": "Wed, 06 Nov 2024 19:48:29 GMT",
- "updated_at": "Wed, 28 May 2025 20:03:05 GMT"
}
], - "total": 1
}
Create a subaccount
Successfully created a subaccount
object | |||||||||||||||||||||
|
Error response
{- "subaccount": {
- "id": "123",
- "name": "My subaccount",
- "created_at": "Wed, 06 Nov 2024 19:48:29 GMT",
- "updated_at": "Wed, 28 May 2025 20:03:05 GMT",
- "status": "open"
}
}
Disable a subaccount
Subaccount disabled successfully
object | |||||||||||||||||||||
|
Subaccount is already disabled
Not found
{- "subaccount": {
- "id": "123",
- "name": "My subaccount",
- "created_at": "Wed, 06 Nov 2024 19:48:29 GMT",
- "updated_at": "Wed, 28 May 2025 20:03:05 GMT",
- "status": "disabled"
}
}
Enable a subaccount
Subaccount enabled successfully
object | |||||||||||||||||||||
|
Cannot enable due to limit reached
Not found
{- "subaccount": {
- "id": "123",
- "name": "My subaccount",
- "created_at": "Wed, 06 Nov 2024 19:48:29 GMT",
- "updated_at": "Wed, 28 May 2025 20:03:05 GMT",
- "status": "open"
}
}
Fetch the details of custom sending limit on the account
{- "limit": 10000,
- "current": 0,
- "period": "1m"
}
Update subaccount feature
{- "features": {
- "validations": {
- "enabled": true
}
}
}