Skip to main content
POST
Save a component style

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
portal
enum<string>
required

interview (career and interview portal) or consumer (coaching portal). Only the interview portal has brands.

Available options:
interview,
consumer
Example:

"interview"

block_type
enum<string>
required

The kind of block the style is for. The editor offers it only on blocks of this type.

Available options:
hero,
intro,
media-text,
cards,
feature-grid,
stats,
quote,
testimonials,
video,
video-gallery,
audio,
tabs,
timeline,
jobs,
job-openings,
public-avatar,
easy-apply,
blogs,
rich-text,
divider,
logo-row,
faq,
directory,
cta,
footer,
pricing
Example:

"hero"

name
string
required

What the editor calls the style. Saving the same block type and name again replaces it. Its file is components/<block_type>/.css.

Required string length: 1 - 60
Example:

"Dark band"

merchant_id
string<uuid>

Optional company. Admins and sub-merchant operators only; other callers always use their token's company.

brand_id
string<uuid>

A sub-brand, from the brands document of get_portal_configuration. Leave it out for the main brand, the company's own, whose styles every sub-brand page also offers.

css
string

The rules. Every selector must include .jm-site and the style class, starting from the root the guide gives plus the class: .jm-site .jm-block--hero.jm-style-dark-band h1 { ... }. @media, @supports and @container are fine; @import, @font-face and "<" are not. Required unless remove is true.

Maximum string length: 50000
description
string

One line on what the style is for, kept as a comment above it.

Maximum string length: 300
remove
boolean

true deletes the style and its file. Blocks that use it (the guide lists the pages) keep the name and show the standard look once the stylesheet is published.

Response

The draft is saved.

action
enum<string>
required
Available options:
created,
updated,
removed
block_type
string
required
name
string
required
class
string
required
Example:

"jm-style-dark-band"

style_name
string
required

The value to set as styleName on a block in page content.

file
string
required
Example:

"components/hero/dark-band.css"

file_id
string | null
required

Pass it in files to publish_portal_stylesheet to publish this file alone. Null after a removal, which deletes the file.

live
enum<boolean>
required

Always false: this is a draft until the stylesheet is published.

Available options:
false
warnings
string[]
required
pages
object[]

After a removal: the pages that used the style, whose blocks now show the standard look.