Updates the Subaccount with the given id. This does not include updating the logo: there are separate endpoints for doing so. Aside from the logo, all properties should be included in the request body. Not including the default portfolio id in the update request will have the effect of making the subaccount not have an explicit default portfolio (making it inherit the default portfolio from the parent user).
/subaccounts/{id}Authorization
string
header
requiredBearer authentication header of the form Bearer <token>, where <token> is your CNaught API key.
id
string
requiredID of subaccount to return / modify
Subaccount Update Parameters
name
string
requiredName for the subaccount
string | null
Optional email associated with the subaccount. If not specified, will remove the email from 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.
Subaccount Details after update
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.
Update Subaccount
curl --request PUT \
--url https://api.cnaught.com/v1/subaccounts/<id> \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Operations Department",
"email": "jane.doe@example.com",
"default_portfolio_id": "eWvNvC12"
}'{
"id": "5nubL0NS",
"name": "Operations Department",
"email": "jane.doe@example.com",
"default_portfolio_id": "eWvNvC12",
"logo_url": "https://customer-assets.cnaught.com/fe0df075-30e2-4e58-9feb-154e72a9205f/subaccount_logo.png"
}