> ## Documentation Index
> Fetch the complete documentation index at: https://docs.widgetic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update the Brand Kit

> Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic's default one. The response lists what is worth fixing in `warnings`.



## OpenAPI

````yaml /openapi/widgetic-api-public.json patch /brand-kit
openapi: 3.0.0
info:
  title: Widgetic API
  version: 1.0.0
  description: >-
    Create, publish and embed Widgetic widgets from your own code. Every request
    goes to `https://api.widgetic.com/v1` over HTTPS, with an API key as a
    bearer token.
  license:
    name: Widgetic Integration License
    url: https://docs.widgetic.com/resources/license
  termsOfService: https://widgetic.com/legal/terms
  contact:
    name: Widgetic developer support
    url: https://docs.widgetic.com/docs/introduction#need-help
servers:
  - url: https://api.widgetic.com/v1
    description: Production server
security: []
tags:
  - name: Widgets
    description: >-
      The reusable pieces compositions are made from. The widgets of your
      account are your own library.
  - name: Compositions
    description: >-
      A widget set up for one place: its content, design and embed settings, and
      what visitors sent to it.
  - name: Canvases
    description: >-
      The editing surface where a widget is designed and configured. A canvas
      holds one widget.
  - name: Workflows
    description: >-
      Compositions chained together, with filters that decide which one a
      visitor sees next.
  - name: A/B Testing
    description: >-
      Show two to four versions of a composition to different visitors, and see
      which one reaches the goal you chose.
  - name: Translations
    description: >-
      Copies of a composition in other languages, translated by a language
      model, and the views each language gets.
  - name: Uploads
    description: The files a workspace keeps, and the limits on what it accepts.
  - name: Brand Kit
    description: >-
      The colors, fonts, icons, corner radius and style notes every widget your
      account makes is generated with.
  - name: Tokens
    description: >-
      Check which account and workspace an API key belongs to, and what it may
      do.
  - name: Users
    description: The adapter connections of an account.
  - name: Credits
    description: The credits an account holds, and the ledger of how they were spent.
  - name: Organizations
    description: >-
      The websites a workspace lets its widgets appear on, the API keys of a
      workspace and the translations made in it.
  - name: Operations
    description: Follow work that carries on after the response that started it.
  - name: Partners
    description: >-
      Run Widgetic for your own customers: contract, billing, presets, storage,
      notifications, analytics and embeds. These endpoints need a partner key.
  - name: Managed Users
    description: >-
      The customers of a partner, with their editor sessions, limits and usage.
      Only partners can make and work with managed users, with an active partner
      API key.
  - name: Invoices
    description: The invoices issued to a partner.
  - name: Entitlements
    description: What a partner and its managed users are entitled to.
  - name: Public Embed
    description: >-
      What a published widget calls from a visitor's browser. These endpoints
      take no key.
externalDocs:
  description: Widgetic developer documentation
  url: https://docs.widgetic.com
paths:
  /brand-kit:
    patch:
      tags:
        - Brand Kit
      summary: Change part of the Brand Kit
      description: >-
        Changes only what is sent: the colors, a font role, the text styles, a
        spacing step, one corner radius (0 for square corners) or the style
        notes, and keeps the rest of the saved kit, text styles included. An
        account that never saved a kit starts from Widgetic's default one. The
        response lists what is worth fixing in `warnings`.
      operationId: patchBrandKit
      parameters:
        - in: query
          name: organizationId
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchBrandKitRequest'
      responses:
        '200':
          description: The saved kit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandKitViewResponse'
        '400':
          description: validation_error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: not_a_member or not_allowed_to_edit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: brand_kit_version_conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: brand_kit_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request PATCH \
              --url 'https://api.widgetic.com/v1/brand-kit' \
              --header "Authorization: Bearer $WIDGETIC_API_KEY" \
              --header 'Content-Type: application/json' \
              --data '{
              "cornerRadius": 0,
              "instructions": "Use the dark color as the background always and the light color for titles.",
              "colors": [
                {
                  "name": "Example name",
                  "hex": "#1D4ED8",
                  "role": "primary"
                }
              ],
              "fonts": {
                "title": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "subtitle": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "body": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "caption": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                }
              }
            }'
        - lang: typescript
          label: TypeScript
          source: |-
            import { BrandKitApi } from '@widgetic/api-sdk-ts';

            const brandKitApi = new BrandKitApi(process.env.WIDGETIC_API_KEY!);

            const result = await brandKitApi.patchBrandKit({
              patchBrandKitRequest: {
                cornerRadius: 0,
                instructions: 'Use the dark color as the background always and the light color for titles.',
                colors: [
                  {
                    name: 'Example name',
                    hex: '#1D4ED8',
                    role: 'primary',
                  },
                ],
                fonts: {
                  title: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42,
                  },
                  subtitle: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42,
                  },
                  body: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42,
                  },
                  caption: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42,
                  },
                },
              },
            });
            console.log(result);
        - lang: python
          label: Python
          source: >-
            import os


            import api_sdk_py


            configuration =
            api_sdk_py.Configuration(access_token=os.environ["WIDGETIC_API_KEY"])


            with api_sdk_py.ApiClient(configuration) as api_client:
                brand_kit_api = api_sdk_py.BrandKitApi(api_client)
                result = brand_kit_api.patch_brand_kit(
                    patch_brand_kit_request={
                        "cornerRadius": 0,
                        "instructions": "Use the dark color as the background always and the light color for titles.",
                        "colors": [
                            {
                                "name": "Example name",
                                "hex": "#1D4ED8",
                                "role": "primary",
                            },
                        ],
                        "fonts": {
                            "title": {
                                "family": "Example family",
                                "source": "google",
                                "weight": 100,
                                "sizeMax": 42,
                            },
                            "subtitle": {
                                "family": "Example family",
                                "source": "google",
                                "weight": 100,
                                "sizeMax": 42,
                            },
                            "body": {
                                "family": "Example family",
                                "source": "google",
                                "weight": 100,
                                "sizeMax": 42,
                            },
                            "caption": {
                                "family": "Example family",
                                "source": "google",
                                "weight": 100,
                                "sizeMax": 42,
                            },
                        },
                    },
                )
                print(result)
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\twidgetic \"github.com/widgetic/api-sdk-go\"\n)\n\nfunc main() {\n\tctx := context.WithValue(context.Background(), widgetic.ContextAccessToken, os.Getenv(\"WIDGETIC_API_KEY\"))\n\tclient := widgetic.NewAPIClient(widgetic.NewConfiguration())\n\n\tpatchBrandKitRequestJSON := `{\n  \"cornerRadius\": 0,\n  \"instructions\": \"Use the dark color as the background always and the light color for titles.\",\n  \"colors\": [\n    {\n      \"name\": \"Example name\",\n      \"hex\": \"#1D4ED8\",\n      \"role\": \"primary\"\n    }\n  ],\n  \"fonts\": {\n    \"title\": {\n      \"family\": \"Example family\",\n      \"source\": \"google\",\n      \"weight\": 100,\n      \"sizeMax\": 42\n    },\n    \"subtitle\": {\n      \"family\": \"Example family\",\n      \"source\": \"google\",\n      \"weight\": 100,\n      \"sizeMax\": 42\n    },\n    \"body\": {\n      \"family\": \"Example family\",\n      \"source\": \"google\",\n      \"weight\": 100,\n      \"sizeMax\": 42\n    },\n    \"caption\": {\n      \"family\": \"Example family\",\n      \"source\": \"google\",\n      \"weight\": 100,\n      \"sizeMax\": 42\n    }\n  }\n}`\n\tvar patchBrandKitRequest widgetic.PatchBrandKitRequest\n\tif err := json.Unmarshal([]byte(patchBrandKitRequestJSON), &patchBrandKitRequest); err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tresult, _, err := client.BrandKitAPI.PatchBrandKit(ctx).\n\t\tPatchBrandKitRequest(patchBrandKitRequest).\n\t\tExecute()\n\tif err != nil {\n\t\tfmt.Fprintln(os.Stderr, err)\n\t\tos.Exit(1)\n\t}\n\tfmt.Println(result)\n}"
        - lang: java
          label: Java
          source: |-
            import com.widgetic.api.ApiClient;
            import com.widgetic.api.ApiException;
            import com.widgetic.api.Configuration;
            import com.widgetic.api.JSON;
            import com.widgetic.api.api.BrandKitApi;
            import com.widgetic.api.model.PatchBrandKitRequest;

            public class Example {
                public static void main(String[] args) throws ApiException {
                    ApiClient client = Configuration.getDefaultApiClient();
                    client.setBearerToken(System.getenv("WIDGETIC_API_KEY"));

                    BrandKitApi brandKitApi = new BrandKitApi(client);

                    String patchBrandKitRequestJson = """
                            {
                              "cornerRadius": 0,
                              "instructions": "Use the dark color as the background always and the light color for titles.",
                              "colors": [
                                {
                                  "name": "Example name",
                                  "hex": "#1D4ED8",
                                  "role": "primary"
                                }
                              ],
                              "fonts": {
                                "title": {
                                  "family": "Example family",
                                  "source": "google",
                                  "weight": 100,
                                  "sizeMax": 42
                                },
                                "subtitle": {
                                  "family": "Example family",
                                  "source": "google",
                                  "weight": 100,
                                  "sizeMax": 42
                                },
                                "body": {
                                  "family": "Example family",
                                  "source": "google",
                                  "weight": 100,
                                  "sizeMax": 42
                                },
                                "caption": {
                                  "family": "Example family",
                                  "source": "google",
                                  "weight": 100,
                                  "sizeMax": 42
                                }
                              }
                            }
                            """;
                    PatchBrandKitRequest patchBrandKitRequest = JSON.deserialize(patchBrandKitRequestJson, PatchBrandKitRequest.class);

                    var result = brandKitApi.patchBrandKit(patchBrandKitRequest, null);
                    System.out.println(result);
                }
            }
        - lang: csharp
          label: C#
          source: >-
            using System;

            using Newtonsoft.Json;

            using Widgetic.ApiSdk.Cs.Api;

            using Widgetic.ApiSdk.Cs.Client;

            using Widgetic.ApiSdk.Cs.Model;


            var configuration = new Configuration

            {
                AccessToken = Environment.GetEnvironmentVariable("WIDGETIC_API_KEY")!,
            };

            var brandKitApi = new BrandKitApi(configuration);


            var patchBrandKitRequest =
            JsonConvert.DeserializeObject<PatchBrandKitRequest>("""
                {
                  "cornerRadius": 0,
                  "instructions": "Use the dark color as the background always and the light color for titles.",
                  "colors": [
                    {
                      "name": "Example name",
                      "hex": "#1D4ED8",
                      "role": "primary"
                    }
                  ],
                  "fonts": {
                    "title": {
                      "family": "Example family",
                      "source": "google",
                      "weight": 100,
                      "sizeMax": 42
                    },
                    "subtitle": {
                      "family": "Example family",
                      "source": "google",
                      "weight": 100,
                      "sizeMax": 42
                    },
                    "body": {
                      "family": "Example family",
                      "source": "google",
                      "weight": 100,
                      "sizeMax": 42
                    },
                    "caption": {
                      "family": "Example family",
                      "source": "google",
                      "weight": 100,
                      "sizeMax": 42
                    }
                  }
                }
                """)!;

            var result = brandKitApi.PatchBrandKit(patchBrandKitRequest:
            patchBrandKitRequest);

            Console.WriteLine(result);
        - lang: ruby
          label: Ruby
          source: |-
            require 'api-sdk-rb'

            ApiSdkRb.configure do |config|
              config.access_token = ENV['WIDGETIC_API_KEY']
            end

            brand_kit_api = ApiSdkRb::BrandKitApi.new

            result = brand_kit_api.patch_brand_kit(
              {
                cornerRadius: 0,
                instructions: 'Use the dark color as the background always and the light color for titles.',
                colors: [
                  {
                    name: 'Example name',
                    hex: '#1D4ED8',
                    role: 'primary'
                  }
                ],
                fonts: {
                  title: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42
                  },
                  subtitle: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42
                  },
                  body: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42
                  },
                  caption: {
                    family: 'Example family',
                    source: 'google',
                    weight: 100,
                    sizeMax: 42
                  }
                }
              }
            )
            puts result
        - lang: php
          label: PHP
          source: >-
            <?php


            require_once __DIR__ . '/vendor/autoload.php';


            use WidgeticApi\Api\BrandKitApi;

            use WidgeticApi\Configuration;

            use WidgeticApi\Model\PatchBrandKitRequest;

            use WidgeticApi\ObjectSerializer;


            $config =
            Configuration::getDefaultConfiguration()->setAccessToken(getenv('WIDGETIC_API_KEY'));

            $brandKitApi = new BrandKitApi(new GuzzleHttp\Client(), $config);


            $patchBrandKitRequestJson = '{
              "cornerRadius": 0,
              "instructions": "Use the dark color as the background always and the light color for titles.",
              "colors": [
                {
                  "name": "Example name",
                  "hex": "#1D4ED8",
                  "role": "primary"
                }
              ],
              "fonts": {
                "title": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "subtitle": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "body": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "caption": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                }
              }
            }';

            $patchBrandKitRequest =
            ObjectSerializer::deserialize(json_decode($patchBrandKitRequestJson),
            PatchBrandKitRequest::class);


            $result = $brandKitApi->patchBrandKit(patch_brand_kit_request:
            $patchBrandKitRequest);

            print_r($result);
        - lang: bash
          label: CLI
          source: |-
            widgetic api brand-kit patch-brand-kit --data - <<'EOF'
            {
              "cornerRadius": 0,
              "instructions": "Use the dark color as the background always and the light color for titles.",
              "colors": [
                {
                  "name": "Example name",
                  "hex": "#1D4ED8",
                  "role": "primary"
                }
              ],
              "fonts": {
                "title": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "subtitle": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "body": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                },
                "caption": {
                  "family": "Example family",
                  "source": "google",
                  "weight": 100,
                  "sizeMax": 42
                }
              }
            }
            EOF
components:
  schemas:
    PatchBrandKitRequest:
      type: object
      minProperties: 1
      description: >-
        Changes part of the kit and leaves the rest as it is. Only the keys that
        are sent change.
      properties:
        colors:
          type: array
          maxItems: 24
          description: The whole list of colors (it replaces the saved list).
          items:
            $ref: '#/components/schemas/BrandColor'
        fonts:
          type: object
          description: >-
            The text roles to change; the roles that are left out keep their
            font.
          properties:
            title:
              $ref: '#/components/schemas/BrandFont'
            subtitle:
              $ref: '#/components/schemas/BrandFont'
            body:
              $ref: '#/components/schemas/BrandFont'
            caption:
              $ref: '#/components/schemas/BrandFont'
        textStyles:
          type: array
          maxItems: 12
          description: >-
            The whole list of text styles (it replaces the saved list). An empty
            list removes them, and the fonts by role apply again. Left out, the
            saved text styles stay as they are.
          items:
            $ref: '#/components/schemas/BrandTextStyle'
        spacing:
          type: object
          description: >-
            The spacing and radius steps to change; the steps that are left out
            keep their value.
          properties:
            xs:
              type: integer
              minimum: 0
              maximum: 128
            s:
              type: integer
              minimum: 0
              maximum: 128
            m:
              type: integer
              minimum: 0
              maximum: 128
            l:
              type: integer
              minimum: 0
              maximum: 128
            xl:
              type: integer
              minimum: 0
              maximum: 128
            radiusS:
              type: integer
              minimum: 0
              maximum: 40
            radiusM:
              type: integer
              minimum: 0
              maximum: 40
            radiusL:
              type: integer
              minimum: 0
              maximum: 40
        cornerRadius:
          type: integer
          minimum: 0
          maximum: 40
          description: >-
            One corner radius in pixels for the whole kit; the small, medium and
            large radii are made from it. 0 gives square corners. A radius step
            sent in `spacing` wins over the one made from this value.
        instructions:
          type: string
          maxLength: 500
          description: >-
            The kit owner's style notes (see `tokens.instructions`). An empty
            string removes them.
        expectedVersion:
          type: integer
          description: >-
            Refuse the change with a 409 when the kit was saved again since this
            version was read.
      example:
        cornerRadius: 0
        instructions: >-
          Use the dark color as the background always and the light color for
          titles.
    BrandKitViewResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          description: Always `true` on a success.
          example: true
        data:
          $ref: '#/components/schemas/BrandKitView'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      example:
        success: true
        data: null
        meta: null
    ErrorResponse:
      type: object
      required:
        - success
        - message
        - error
      additionalProperties: true
      properties:
        success:
          type: boolean
          description: Always `false` on a failure.
          example: false
        message:
          type: string
          description: The same text as `error.message`, for a caller that reads one line.
        error:
          $ref: '#/components/schemas/ErrorDetail'
    BrandColor:
      type: object
      required:
        - name
        - hex
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 40
        hex:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
        role:
          type: string
          enum:
            - primary
            - secondary
            - accent
            - background
            - surface
            - text
            - title
            - sub
            - border
            - error
      example:
        name: Example name
        hex: Example hex
        role: Example role
    BrandFont:
      type: object
      required:
        - family
        - source
      properties:
        family:
          type: string
          minLength: 1
          maxLength: 80
        source:
          type: string
          enum:
            - google
            - upload
        weight:
          type: integer
          enum:
            - 100
            - 200
            - 300
            - 400
            - 500
            - 600
            - 700
            - 800
            - 900
        sizeMax:
          type: integer
          minimum: 8
          maximum: 200
      example:
        family: Example family
        source: Example source
        weight: 42
        sizeMax: 42
    BrandTextStyle:
      type: object
      required:
        - family
        - weight
        - size
      description: >-
        One text style of the kit: a font family, a weight and a size in pixels,
        for example Inter 400 at 12px or Inter 500 at 18px. A family with a font
        file in the kit is an uploaded font; any other family is loaded from
        Google Fonts. The size is the size of the widget at full size.
      properties:
        family:
          type: string
          minLength: 1
          maxLength: 80
        weight:
          type: integer
          enum:
            - 100
            - 200
            - 300
            - 400
            - 500
            - 600
            - 700
            - 800
            - 900
        size:
          type: integer
          minimum: 8
          maximum: 200
      example:
        family: Example family
        weight: 42
        size: 42
    BrandKitView:
      type: object
      required:
        - owner
        - isDefault
        - canEdit
        - version
        - tokens
        - assets
      properties:
        owner:
          type: object
          description: The workspace the kit belongs to. Every kit belongs to a workspace.
          required:
            - type
            - organizationId
          properties:
            type:
              type: string
              enum:
                - organization
            organizationId:
              type: string
              format: uuid
              description: The workspace the kit belongs to.
        isDefault:
          type: boolean
        canEdit:
          type: boolean
        version:
          type: integer
        tokens:
          $ref: '#/components/schemas/BrandKitTokens'
        assets:
          type: array
          items:
            $ref: '#/components/schemas/BrandKitAssetView'
        figmaSource:
          $ref: '#/components/schemas/BrandKitFigmaSource'
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        updatedBy:
          type: string
          format: uuid
          nullable: true
        warnings:
          type: array
          description: >-
            Things worth fixing in the saved kit, such as a text color that is
            hard to read on the background, or fonts by role that are not used
            because the kit has text styles. The kit is saved either way.
          items:
            type: string
      example:
        owner: {}
        isDefault: true
        canEdit: true
        version: 42
        tokens: null
        assets:
          - Example BrandKitAssetView
        figmaSource: null
        updatedAt: '2026-01-15T09:30:00.000Z'
        updatedBy: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        warnings: []
    ResponseMeta:
      type: object
      description: >-
        Extra information about the answer: where a page sits in a list, the
        cursor of the next page, or warnings about a call that succeeded with a
        caveat.
      additionalProperties: true
      properties:
        page:
          type: integer
          description: The page that was read, counting from 1.
          example: 1
        size:
          type: integer
          description: How many items one page holds.
          example: 20
        total:
          type: integer
          description: How many items the whole list has.
          example: 135
        limit:
          type: integer
          description: The same as `size`.
          example: 20
        offset:
          type: integer
          description: How many items come before this page.
          example: 0
        hasNextPage:
          type: boolean
          example: true
        hasPreviousPage:
          type: boolean
          example: false
        nextCursor:
          type: string
          nullable: true
          description: >-
            Pass this as `cursor` to read the next page of a list that is read
            by cursor. `null` on the last page.
        warnings:
          type: array
          items:
            type: string
          description: >-
            Things the call did not do, though it succeeded (for example a table
            that could not be created just now).
    ErrorDetail:
      type: object
      required:
        - code
        - message
        - timestamp
      properties:
        code:
          type: string
          description: Machine-readable error code.
          example: RESOURCE_NOT_FOUND
        message:
          type: string
          description: Human-readable explanation.
          example: Composition not found
        param:
          type: string
          description: The field that caused the error, when one did.
          example: name
        docUrl:
          type: string
          description: Where this error is explained.
        suggestedAction:
          type: string
          description: What to do about it.
        retryAfter:
          type: integer
          description: >-
            Seconds to wait before trying again (rate limits). The same number
            is in the `Retry-After` header.
          example: 60
        details:
          type: object
          additionalProperties: true
          description: >-
            More about the error: the fields that failed, a limit that was
            reached.
        correlationId:
          type: string
          description: Quote this when you ask support about the call.
          example: req_123e4567-e89b-12d3-a456-426614174000
        timestamp:
          type: string
          format: date-time
          example: '2026-10-15T10:00:00.000Z'
    BrandKitTokens:
      type: object
      required:
        - colors
        - fonts
        - spacing
      description: >-
        Colors, fonts by role, text styles, spacing and corner radii of a Brand
        Kit.
      properties:
        colors:
          type: array
          maxItems: 24
          items:
            $ref: '#/components/schemas/BrandColor'
        fonts:
          type: object
          properties:
            title:
              $ref: '#/components/schemas/BrandFont'
            subtitle:
              $ref: '#/components/schemas/BrandFont'
            body:
              $ref: '#/components/schemas/BrandFont'
            caption:
              $ref: '#/components/schemas/BrandFont'
        textStyles:
          type: array
          maxItems: 12
          description: >-
            The owner's text styles (family, weight and size). When there are
            some, they are what every widget made with the kit is told about
            type and the fonts by role are not used; with none, the fonts by
            role apply. A font file that is deleted takes the text styles made
            from it with it. Left out when the kit has none.
          items:
            $ref: '#/components/schemas/BrandTextStyle'
        spacing:
          $ref: '#/components/schemas/BrandSpacing'
        instructions:
          type: string
          maxLength: 500
          description: >-
            The kit owner's own style notes, taken into account in every widget
            made with the kit, for example "Use the dark color as the background
            always and the light color for titles". They are about how a widget
            looks and never about what it holds, and what a request names itself
            wins over them. Left out, Widgetic's default note applies ("Widget
            backgrounds to be white whenever possible."); an empty string means
            none.
      example:
        colors:
          - Example BrandColor
        fonts: {}
        textStyles:
          - Example BrandTextStyle
        spacing: null
        instructions: Example instructions
    BrandKitAssetView:
      type: object
      required:
        - id
        - kind
        - name
        - createdAt
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - font
            - icon
        name:
          type: string
        createdAt:
          type: string
          format: date-time
        family:
          type: string
        weight:
          type: integer
        style:
          type: string
          enum:
            - normal
            - italic
        format:
          type: string
          enum:
            - woff2
            - woff
            - ttf
            - otf
        bytes:
          type: integer
        url:
          type: string
          nullable: true
        slug:
          type: string
        exportName:
          type: string
        svg:
          type: string
      example:
        id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        kind: Example kind
        name: Example name
        createdAt: '2026-01-15T09:30:00.000Z'
        family: Example family
        weight: 42
        style: Example style
        format: Example format
        bytes: 42
        url: Example url
        slug: Example slug
        exportName: Example exportName
        svg: Example svg
    BrandKitFigmaSource:
      type: object
      required:
        - url
        - fileKey
        - nodeId
        - fileName
        - importedAt
      properties:
        url:
          type: string
        fileKey:
          type: string
        nodeId:
          type: string
          nullable: true
        fileName:
          type: string
          nullable: true
        importedAt:
          type: string
          format: date-time
      example:
        url: Example url
        fileKey: Example fileKey
        nodeId: Example nodeId
        fileName: Example fileName
        importedAt: '2026-01-15T09:30:00.000Z'
    BrandSpacing:
      type: object
      required:
        - xs
        - s
        - m
        - l
        - xl
        - radiusS
        - radiusM
        - radiusL
      properties:
        xs:
          type: integer
          minimum: 0
          maximum: 128
        s:
          type: integer
          minimum: 0
          maximum: 128
        m:
          type: integer
          minimum: 0
          maximum: 128
        l:
          type: integer
          minimum: 0
          maximum: 128
        xl:
          type: integer
          minimum: 0
          maximum: 128
        radiusS:
          type: integer
          minimum: 0
          maximum: 40
        radiusM:
          type: integer
          minimum: 0
          maximum: 40
        radiusL:
          type: integer
          minimum: 0
          maximum: 40
      example:
        xs: 42
        s: 42
        m: 42
        l: 42
        xl: 42
        radiusS: 42
        radiusM: 42
        radiusL: 42
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Send your API key as a bearer token: `Authorization: Bearer <your API
        key>`. Make a key in the dashboard under **Settings → API keys**; a
        workspace key starts with `wdg_org_` and works in the workspace it was
        made in. See [API keys](/docs/api-keys) and
        [Authentication](/docs/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.