Skip to content
Navigation

Create a style profile

Creates a profile: logo, colours, fonts, page, heading and table rules. Every field but name has a default, so the smallest legal body is {"name": "House style"} and it already composes. isDefault: true clears the flag on every other profile. Authorization: org admin.

POST
https://api.cloudraker.com/style-profiles
Try it
Request body
Live API request

This request can change data or incur charges for the selected organization.

Authorization

  • bearerAuth
    HTTP
    required

Request body JSON required

  • name
    string
    required
    maxLength: 120 · minLength: 1
  • logoFileId
    optional
    default: null

    Any of the following:

    • string
    • null
  • colors
    optional
    object
    default: {}
    • primary
      optional
      string
      pattern: ^#[0-9a-fA-F]{6}$ · default: "#1F6FEB"
    • secondary
      optional
      string
      pattern: ^#[0-9a-fA-F]{6}$ · default: "#6E7781"
    • text
      optional
      string
      pattern: ^#[0-9a-fA-F]{6}$ · default: "#111111"
  • fonts
    optional
    object
    default: {}
    • body
      optional
      string
      maxLength: 64 · minLength: 1 · default: "Noto Serif"
    • heading
      optional
      string
      maxLength: 64 · minLength: 1 · default: "Roboto"
    • baseSize
      optional
      number
      maximum: 18 · minimum: 7 · default: 10.5
  • page
    optional
    object
    default: {}
    • paper
      optional
      a4
      or
      us-letter
      default: "a4"
    • margins
      optional
      object
      default: {}
      • top
        optional
        number
        maximum: 5 · minimum: 1 · default: 2.2
      • bottom
        optional
        number
        maximum: 5 · minimum: 1 · default: 2.2
      • left
        optional
        number
        maximum: 5 · minimum: 1 · default: 2
      • right
        optional
        number
        maximum: 5 · minimum: 1 · default: 2
    • headerText
      optional
      string
      maxLength: 200 · default: ""
    • footerText
      optional
      string
      maxLength: 200 · default: ""
    • pageNumbers
      optional
      boolean
      default: true
  • headings
    optional
    object
    default: {}
    • numbered
      optional
      boolean
      default: false
    • color
      optional
      primary
      or
      text
      default: "primary"
  • table
    optional
    object
    default: {}
    • headerFill
      optional
      primary
      or
      secondary
      or
      none
      default: "secondary"
    • stroke
      optional
      boolean
      default: true
  • isDefault
    optional
    boolean
    default: false

Returns

201

The new profile.

JSON
  • data
    object
    required
    • name
      string
      required
      maxLength: 120 · minLength: 1
    • id
      string
      required
    • createdAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • updatedAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
    • createdBy
      string
      required
    • logoFileId
      optional
      default: null

      Any of the following:

      • string
      • null
    • colors
      optional
      object
      default: {}
      • primary
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$ · default: "#1F6FEB"
      • secondary
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$ · default: "#6E7781"
      • text
        optional
        string
        pattern: ^#[0-9a-fA-F]{6}$ · default: "#111111"
    • fonts
      optional
      object
      default: {}
      • body
        optional
        string
        maxLength: 64 · minLength: 1 · default: "Noto Serif"
      • heading
        optional
        string
        maxLength: 64 · minLength: 1 · default: "Roboto"
      • baseSize
        optional
        number
        maximum: 18 · minimum: 7 · default: 10.5
    • page
      optional
      object
      default: {}
      • paper
        optional
        a4
        or
        us-letter
        default: "a4"
      • margins
        optional
        object
        default: {}
        • top
          optional
          number
          maximum: 5 · minimum: 1 · default: 2.2
        • bottom
          optional
          number
          maximum: 5 · minimum: 1 · default: 2.2
        • left
          optional
          number
          maximum: 5 · minimum: 1 · default: 2
        • right
          optional
          number
          maximum: 5 · minimum: 1 · default: 2
      • headerText
        optional
        string
        maxLength: 200 · default: ""
      • footerText
        optional
        string
        maxLength: 200 · default: ""
      • pageNumbers
        optional
        boolean
        default: true
    • headings
      optional
      object
      default: {}
      • numbered
        optional
        boolean
        default: false
      • color
        optional
        primary
        or
        text
        default: "primary"
    • table
      optional
      object
      default: {}
      • headerFill
        optional
        primary
        or
        secondary
        or
        none
        default: "secondary"
      • stroke
        optional
        boolean
        default: true
    • isDefault
      optional
      boolean
      default: false

400

validation_failed — a field is outside its allowed value space.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

403

forbidden — changing the organization’s brand is an admin action.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

422

unknown_font_family — the family is not one the renderer carries (the sentence lists the legal ones); logo_too_large / logo_unavailable — the logo file is over 2 MiB or has no stored bytes; template_render_failed — the profile does not compile, with the typst diagnostic.
JSON
  • error
    string
    required

    The sentence a human reads.

  • error_code
    string
    required

    The stable snake_case branch key.

  • issues
    optional
    array of
    object

    Per-field detail, present only on a validation failure.

    • path
      string
      required
    • code
      string
      required
    • message
      string
      required

Type to search…

↑↓ navigate↵ selectEsc close