Saltar para a documentação
CLI

openemail branding

Cada comando deste espaço de nomes, com os seus argumentos, opções e exemplos.

Comandos

The brand of the workspace: its mark, its logo and its logo for dark mode, its primary and secondary fonts, and the background of the sign-in page of its web app address. Read it, change the fonts and the background, and upload or remove each image.

Cada comando aqui aceita também as opções globais, como --json, --profile e --dry-run. Ver as opções globais

openemail branding get

Read the brand of the workspace

Âmbitossettings:readRequer início de sessãoAliasesshowview

Utilização

openemail branding get [flags]

Returns the brand of the workspace, as its Customisations page shows it: a link to each brand image in images, the primary and secondary fonts in fonts, and the background of the sign-in page in loginBackground.

The mark shows in the workspace switcher. The logo shows at the top of the sidebar, and it is what brands the web app address and, on a paid plan, the emails OpenEmail sends for the workspace, at their top and foot. Without a logo, both look like OpenEmail. The fonts apply in the web app for everyone in the workspace, the primary font to its text and the secondary font to page headings, and the sign-in background shows on the web app address, either way.

A personal space carries no brand, so every image and font reads as null there and editable is false.

Exemplos

openemail branding get
Print the raw JSON
openemail branding get --json

Também disponível em

API
GET /branding
SDK
branding.get()

openemail branding update

Change the fonts and the sign-in background of the brand

Âmbitossettings:writeRequer início de sessãoAliasesedit

Utilização

openemail branding update [flags]

Changes the fonts, the sign-in page background or both, and returns the brand in the same shape as get. A field left out keeps its value, and so does a font left out of fonts. --login-background replaces the background there was, and null sets the default.

With kind: 'image' the sign-in page shows the photo uploaded with uploadImage('login-background', ...), so upload that first: without it the call is refused. Uploading one switches the page to it on its own, so most callers never send kind: 'image' themselves.

Opções

--fonts <json|@file|->

The fonts to change. Leave it out to keep both. JSON shaped as BrandingFontsUpdate, inline or from a file with @path.

--fonts-primary <value>

The primary font: one of the ids in BRAND_FONT_IDS, such as inter or georgia, or null for the default. Left out, it keeps its value.

--fonts-secondary <value>

The secondary font, an id from BRAND_FONT_IDS or null for the default. Left out, it keeps its value.

--login-background <json|@file|->

The sign-in page background, replacing the one there was, or null for the default. Leave it out to keep it. JSON shaped as LoginBackgroundInput | null, inline or from a file with @path.

--login-background-kind <value>

preset, color or image. Required once --login-background is given.

--login-background-preset <value>

dusk, mist, sand or night. Required when kind is preset, and kept for later otherwise.

--login-background-color <value>

A colour as # and six hex digits, such as #1f2937, stored lowercased. Required when kind is color, and kept for later otherwise.

--login-background-logo <value>

dark shows your logo and light your logo for dark mode. Null, the default, picks the one that stands out against the background.

--data <json|@file|->

The whole body as JSON, inline, from a file with @path, or - for standard input. Flags override its keys.

Exemplos

With optional flags
openemail branding update --fonts-primary inter --fonts-secondary georgia --login-background-kind color
Print the raw JSON
openemail branding update --fonts-primary inter --fonts-secondary georgia --login-background-kind color --json

Também disponível em

API
PATCH /branding
SDK
branding.update()

openemail branding upload-image

Upload one of the brand images

Âmbitossettings:writeRequer início de sessão

Utilização

openemail branding upload-image <variant> <data> [flags]

Sends the image bytes as the request body, replacing the image there was, and returns the brand. variant names the image: mark, the square icon, wordmark, the logo, wordmark-dark, the logo for dark mode, or login-background, the photo behind the sign-in page of the web app address.

Up to 5 MB goes in, and it is fitted and stored as WebP: the mark into 512 by 512 pixels, the two logos into 1024 by 256, and the sign-in photo into 2560 by 1600. The mark and the logos take SVG, PNG, JPEG or WebP, and the sign-in photo PNG, JPEG, WebP or GIF. An SVG is turned into a picture, and an animated image keeps its first frame.

Uploading the sign-in photo also switches the sign-in page to it. The type is read from --content-type, or from a Blob's own type when that is left out, and without either the server refuses the bytes with 422 invalid_image.

Argumentos

<variant>Obrigatório

mark, wordmark, wordmark-dark or login-background.

<data>Obrigatório

The image: a Blob, ArrayBuffer or Uint8Array.

Opções

--content-type <value>

image/svg+xml, image/png, image/jpeg, image/webp or image/gif. Required unless data is a Blob with a type.

Exemplos

The required values only
openemail branding upload-image wordmark ./photo.jpg
With optional flags
openemail branding upload-image wordmark ./photo.jpg --content-type image/svg+xml

Também disponível em

API
PUT /branding/images/{variant}
SDK
branding.uploadImage()

openemail branding remove-image

Remove one of the brand images

Âmbitossettings:writeRequer início de sessão
Pede-lhe confirmação

Utilização

openemail branding remove-image <variant> [flags]

Removes one brand image, deletes the stored file and returns the brand, so the default shows in its place. Removing the sign-in photo while the sign-in page shows it switches the page back to the preset or colour chosen before it, or to the default. Removing an image that is not set changes nothing.

Argumentos

<variant>Obrigatório

mark, wordmark, wordmark-dark or login-background.

Exemplos

openemail branding remove-image login-background
Skip the confirmation, for scripts
openemail branding remove-image login-background --yes

Também disponível em

API
DELETE /branding/images/{variant}
SDK
branding.removeImage()