CNaughtCNaught
PricingSign In

Update Subaccount Logo From URL

Updates the logo for a Subaccount with given id by downloading from given URL. The URL must be a public http or https URL that returns the image. Supported image types are: PNG (image/png), JPEG (image/jpeg), WEBP (image/webp), and SVG (image/svg+xml), up to 5 MB. The logo is stored with the type its contents show, whatever the response's Content-Type says. Scripts, event handlers and external links are removed from SVG images. A logo that can't be downloaded, is larger than 5 MB or isn't a supported image is rejected with a 400 response.

POST/subaccounts/{id}/logo

Authorizations#

Authorization

string

header

required

Bearer authentication header of the form Bearer <token>, where <token> is your CNaught API key.

Path Parameters#

id

string

required

ID of subaccount to modify logo for

Body#

Subaccount Update Logo From URL Parameters

logo_url

string

required

URL for a logo to set for this subaccount. The URL must be a public http or https URL. The logo will be downloaded to CNaught's hosting.

Response#

200

Subaccount Details after update

Update Subaccount Logo By Uploading Image Content

Update Subaccount Logo From URL

curl --request POST \
  --url https://api.cnaught.com/v1/subaccounts/<id>/logo \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "logo_url": "http://example.com/logo.png"
}'
{
  "id": "5nubL0NS",
  "name": "Operations Department",
  "default_portfolio_id": "eWvNvC12",
  "logo_url": "https://customer-assets.cnaught.com/fe0df075-30e2-4e58-9feb-154e72a9205f/subaccount_logo.png"
}