Cakemail
Cakemail API

Sub-Account

Manage sub-accounts under a partner or organization account. Sub-accounts are independent accounts with their own users, contacts, and campaigns, managed by the parent account. Includes creation, suspension, and configuration.


Show all sub-accounts

GET
https://api.cakemail.dev
/accounts

List all sub-accounts under the authenticated partner or organization account.

Required scope(s): sub_accounts:read

Show all sub-accounts › query Parameters

partner_account_id
​integer
recursive
​boolean
Default: false
page
​integer · min: 1
Default: 1
per_page
​integer · min: 1
Default: 50
with_count
​boolean

Include count in the response

Include count in the response

Default: false
sort
​string

Sort term and direction, using syntax [-|+]term.

Valid terms:

  • name
  • created_on

Sort term and direction, using syntax [-|+]term.

Valid terms:

  • name
  • created_on
filter
​string

Valid Terms:

  • name
  • status

Valid Operators:

  • ==

Query separator:

  • ;

Valid Terms:

  • name
  • status

Valid Operators:

  • ==

Query separator:

  • ;

Show all sub-accounts › Responses

Successful Response

​Pagination · required
​AccountSummaryResponse[] · required

Create a sub-account

POST
https://api.cakemail.dev
/accounts

Create a new sub-account under the authenticated partner or organization account.

Required scope(s): sub_accounts:write

Create a sub-account › query Parameters

partner_account_id
​integer
skip_verification
​boolean
Default: false

Create a sub-account › Request Body

name
​string · minLength: 1 · required

Account display name

​object

Mailing address of the account

​object

User to set as account owner

fax
​string · minLength: 1
phone
​string · minLength: 1
website
​string · uri · minLength: 1 · maxLength: 2083

Account website URL

​object

Account usage limits and feature flags

Default: {}
​object

Custom domain configuration

Default: {}
trial
​boolean

Whether this is a trial account

Default: false
partner
​boolean

Whether this is a partner account

Default: false

Create a sub-account › Responses

Successful Response

id
​string · required
object
​string
Default: account
email
​string · email
metadata
​string
created
​boolean
Default: true
​object[]
Default: []

Show sub-account details

GET
https://api.cakemail.dev
/accounts/{account_id}

Retrieve the full details of a sub-account.

Required scope(s): sub_accounts:read

Show sub-account details › path Parameters

account_id
​string · minLength: 1 · maxLength: 20 · pattern: ^[a-zA-Z0-9]+$ · required

Show sub-account details › Responses

Successful Response


Update a sub-account

PATCH
https://api.cakemail.dev
/accounts/{account_id}

Update a sub-account's settings, including name, address, usage limits, and feature flags.

Required scope(s): sub_accounts:write

Update a sub-account › path Parameters

account_id
​integer · required

Update a sub-account › Request Body

​object

Mailing address of the account

name
​string

Account display name

​object

User to set as account owner

fax
​string
phone
​string
​object

Custom domain configuration

Default: {}
website
​string · uri · minLength: 1 · maxLength: 2083

Account website URL

​object

Account usage limits and feature flags

Default: {}
trial
​boolean

Whether this is a trial account

partner
​boolean

Whether this is a partner account

metadata
​object

Arbitrary metadata for the account

Update a sub-account › Responses

Successful Response

​AccountFullResponse · required
​object[]
Default: []

Delete a sub-account

DELETE
https://api.cakemail.dev
/accounts/{account_id}

Delete a sub-account. This action is permanent.

Required scope(s): sub_accounts:admin

Delete a sub-account › path Parameters

account_id
​string · minLength: 1 · maxLength: 20 · pattern: ^[a-zA-Z0-9]+$ · required

Delete a sub-account › Responses

Successful Response

id
​string · required
object
​string
Default: account
deleted
​boolean
Default: true

Suspend a sub-account

POST
https://api.cakemail.dev
/accounts/{account_id}/suspend

Suspend a sub-account, preventing its users from logging in or sending emails.

Required scope(s): sub_accounts:admin

Suspend a sub-account › path Parameters

account_id
​integer · min: 1 · required

Suspend a sub-account › Responses

Successful Response

id
​string · required
​AccountSummaryResponse · required
object
​string
Default: account
suspended
​boolean
Default: true

Unsuspend a sub-account

POST
https://api.cakemail.dev
/accounts/{account_id}/unsuspend

Restore a suspended sub-account, allowing its users to log in and send emails again.

Required scope(s): sub_accounts:admin

Unsuspend a sub-account › path Parameters

account_id
​integer · min: 1 · required

Unsuspend a sub-account › Responses

Successful Response

id
​string · required
​AccountSummaryResponse · required
object
​string
Default: account
unsuspended
​boolean
Default: true

Confirm sub-account creation

POST
https://api.cakemail.dev
/accounts/{account_id}/confirm

Confirm a pending sub-account using the confirmation token from the verification email.

Confirm sub-account creation › path Parameters

account_id
​string · minLength: 1 · maxLength: 20 · pattern: ^[a-zA-Z0-9]+$ · required

Confirm sub-account creation › Request Body

confirmation
​string · required

Confirm sub-account creation › Responses

Successful Response

id
​string · required
object
​string
Default: account
email
​string · email
metadata
​string
confirmed
​boolean
Default: true

Resend the account verification email

POST
https://api.cakemail.dev
/accounts/resend-verification-email

Resend the verification email for a pending sub-account.

Resend the account verification email › Request Body

email
​string · email · required

Email address to resend the verification to

Resend the account verification email › Responses

Successful Response

object
​string
Default: account
verification_resent
​boolean
Default: true

Convert an account to an Organization

POST
https://api.cakemail.dev
/accounts/{account_id}/convert-to-organization

Convert a sub-account into an organization, allowing it to manage its own sub-accounts.

Required scope(s): sub_accounts:admin

Convert an account to an Organization › path Parameters

account_id
​integer · required

Convert an account to an Organization › Request Body

migrate_owner
​boolean

Migrate the account owner from the original account to the Organization.

Default: true

Convert an account to an Organization › Responses

Successful Response