Subaccounts

Subaccounts in Mailgun offer account administrators the capability to create linked but separate subaccounts, allowing for the segmentation of users and assets from the primary account. While sharing the same plan and usage allocations, subaccounts possess their own distinct assets, including sending domains, unique users, API keys, SMTP credentials, settings, statistics, and login credentials. The primary account holder can create, manage, and monitor subaccounts, granting them control over account creation, access, and deletion. Subaccounts are particularly useful for distinct business units or functions within an organization, such as marketing or finance, enabling them to send emails on behalf of their respective units under the primary account umbrella.

Parameters

Parameter Type Default Description
name string Name of the domain
limit int 10 Maximum number of records to return.
skip int 0 Number of records to skip.
sort array "asc" or "desc"
enabled boolean Defaults to all if omitted

Get my subaccounts

Copy
Copied
 GET /v5/accounts/subaccounts

Create a subaccount

Copy
Copied
 POST /v5/accounts/subaccounts

Disable a subaccount

Copy
Copied
POST /v5/accounts/subaccounts/{subaccount-id}/disable

Enable a subaccount

Copy
Copied
POST /v5/accounts/subaccounts/{subaccount-id}/enable