Skip to content

Create a subaccount

Request

Create a subaccount

Security
basicAuth
Query
namestringrequired

The name of the subaccount

curl -i -X POST \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v5/accounts/subaccounts?name=string'

Responses

Successfully created a subaccount

Bodyapplication/json
subaccountobject(github.com-mailgun-accounts-api-Subaccount)
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" } }