Creates a new Subaccount.
/subaccountsAuthorization
string
header
requiredBearer authentication header of the form Bearer <token>, where <token> is your CNaught API key.
Idempotency-Key
string
If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.
Subaccount Parameters
name
string
requiredName for the subaccount
string | null
Optional email associated with the subaccount
default_portfolio_id
string | null
Optional ID of the default portfolio to use for fulfilling orders placed for this subaccount. If not specified, the parent account's default portfolio will be the default portfolio for the subaccount.
logo_url
string | null
Optional URL for a logo to use for this subaccount. The URL must be public. The logo will be downloaded to CNaught's hosting when creating the account. If not specified, the subaccount will not have a logo.
Subaccount Details
Show response attributes
id
string
Identifier that can be used to retrieve the subaccount details
created_on
string
Timestamp of when the subaccount was created (in UTC)
name
string
Name of the subaccount
string | null
Optional email associated with the subaccount.
default_portfolio_id
string | null
Optional ID of the default portfolio used to fulfilling orders placed for this subaccount. If not specified, the parent account's default portfolio is the default portfolio for the subaccount.
logo_url
string | null
Optional URL for the logo used for this subaccount, if any. This URL is for the logo as stored on CNaught's hosting.
Create Subaccount
curl --request POST \
--url https://api.cnaught.com/v1/subaccounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Marketing Department",
"email": "jane.doe@example.com",
"default_portfolio_id": "mHvNvWbq"
}'{
"id": "5nubL0NS",
"name": "Marketing Department",
"email": "jane.doe@example.com",
"default_portfolio_id": "mHvNvWbq",
"logo_url": "https://customer-assets.cnaught.com/VChGzdcf/4b1cdc0f-fb47-4251-ab52-b0566369723b/logo"
}