Create a sub-account

Using the SDK

from cakemail.models import CreateAccount, User

sub_account = api.sub_account.create(
    CreateAccount(
        name='<sub-account name>',
        account_owner=User(
            email='<account owner email address>',
            first_name='<account owner first name>',
            last_name='<account owner last name>',
            language='<account owner language>',
            timezone='<account owner timezone>'
        ),
        trial=false,
        partner=false
    )
)
<?php

$mySubAccount = $api->sub_account->create([
    'create_account' => new \Cakemail\Lib\Model\CreateAccount([
        'name' => '<sub-account name>',
        'account_owner' => new \Cakemail\Lib\Model\User([
            'email' => '<account owner email address>',
            'first_name' => '<account owner first name>',
            'last_name' => '<account owner last name>',
            'language' => '<account owner language>',
            'timezone' => '<account owner timezone>',
        ]),
        'trial' => false,
        'partner' => false
    ])
]);
Language
Authentication
OAuth2
Click Try It! to start a request and see the response here!