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

# API для обновления брендинга White label

> Обновляйте white-label брендинг Didit через Management API: меняйте цвета, шрифты и радиусы скругления, загружайте логотипы и настраивайте UI проверки.



Промпт для обновления брендинга
        Скопировать промпт в буфер обмена



      
      

\<pre>

\`Goal: Update the white-label branding for the application tied to an API key.

Endpoint: PATCH https://verification.didit.me/v3/customization/
Auth header: x-api-key: <DIDIT_API_KEY>

Two content types:
\- application/json  -> change colors, fonts, radii and UI options
\- multipart/form-data -> upload logo images (image_square, image_rectangular, image_rectangular_dark, image_favicon)

PARTIAL update: only the fields you send are changed. The application is resolved from the API key (no path params).

JSON body fields:
\- Colors (hex '#RRGGBB' or '#RRGGBBAA'): color_primary, color_secondary, color_background, color_panel, color_panel_10, color_on_panel_1, color_on_panel_2, color_on_background, color_button_1, color_button_2, color_button_text_1, color_button_text_2, color_pill_text
\- border_radius_panel, border_radius_buttons (integers >= 0)
\- font_family (Google Font name), font_weight (must be available for the family)
\- app_public_name (string|null), privacy_policy_url (string|null)
\- skip_welcome_screen, disable_login_with_didit, hide_progress_bar (boolean)
\- callback_seconds (integer >= 0)
\- delete_logo_square, delete_logo_rectangular, delete_logo_rectangular_dark, delete_favicon (boolean) -> remove an existing logo; an upload sent in the same request wins over its delete flag

Logo upload (multipart/form-data) fields:
\- image_square (1:1)
\- image_rectangular (2:1)
\- image_rectangular_dark (2:1, the rectangular logo for dark mode; returned as logo_rectangular_dark)
\- image_favicon (max 500 KB)
Logo rules for image_square, image_rectangular and image_rectangular_dark: PNG, JPG or WebP (SVG is refused), at least 512 px on the long side, max 1 MB.

NOT allowed here (Business Console only): custom domain and white-label email.

curl (JSON):
curl -X PATCH 'https://verification.didit.me/v3/customization/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"color_primary": "#123456", "font_family": "AR One Sans"}'

curl (logo upload):
curl -X PATCH 'https://verification.didit.me/v3/customization/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'image_rectangular=@logo.png' \
-F 'image_rectangular_dark=@logo-dark.png' \
-F 'image_favicon=@favicon.ico'

Response 200: the full updated BrandingCustomization object (same shape as GET).

Failure modes:
\- 400: validation. Examples: { "color_primary": ["Invalid color format. Use '#RRGGBB' or '#RRGGBBAA' format."] }, { "image_rectangular": ["Image aspect ratio must be 2:1. Got 1024x1024 image dimensions"] }, { "image_rectangular_dark": ["Upload a PNG, JPG or WebP image."] }, { "image_rectangular": ["Image must be at least 512 px on its long side. Got 400x200 image dimensions"] }, { "image_square": ["File size should not exceed 1 MB"] }
\- 401 — missing/invalid x-api-key.

For end-to-end Didit integration, paste in the full prompt at /integration/integration-prompt.`

\</pre>



      
      

Вставьте в

## ОбзорВыполняет частичное обновление White label брендинга для приложения, которое определяется по вашему API-ключу. Отправьте `application/json`, чтобы изменить цвета, шрифты, радиусы скругления и параметры интерфейса, или `multipart/form-data`, чтобы загрузить логотипы. Изменяются только поля, которые вы передаёте; всё остальное остаётся без изменений.## Когда использовать- **Оформите сценарий**: задайте цвета бренда, шрифт и радиусы скругления углов.
- **Загрузите логотипы**: задайте квадратный логотип, прямоугольный логотип и его версию для тёмной темы, а также favicon.
- **Настройте работу интерфейса**: задайте публичное название приложения, URL политики конфиденциальности и переключатели, например пропуск приветственного экрана или скрытие индикатора прогресса.## Загрузка логотиповОтправляйте логотипы в формате `multipart/form-data`:- `image_square`: соотношение сторон 1:1.
- `image_rectangular`: соотношение сторон 2:1.
- `image_rectangular_dark`: соотношение сторон 2:1. Прямоугольный логотип для тёмной темы, который отображается на тёмном фоне.
- `image_favicon`: не более **500 КБ**.`image_square`, `image_rectangular` и `image_rectangular_dark` должны быть изображениями в формате PNG, JPG или WebP, с длинной стороной не менее 512 px и размером не более **1 МБ**.
Файлы SVG не принимаются.
В ответе возвращаются URL-адреса `logo_square`, `logo_rectangular`, `logo_rectangular_dark` и `favicon`.Чтобы удалить логотип, отправьте соответствующий флаг `delete_logo_square`, `delete_logo_rectangular`, `delete_logo_rectangular_dark` или `delete_favicon` со значением `true`.
После удаления логотипа для тёмной темы поле `logo_rectangular_dark` принимает значение `null`.
Если в одном запросе загружается логотип и передаётся его флаг удаления, приоритет имеет загрузка.Отклонённая загрузка возвращает `400` с названием поля и причиной, например:- `{"image_rectangular_dark": ["Upload a PNG, JPG or WebP image."]}`
- `{"image_rectangular": ["Image must be at least 512 px on its long side. Got 400x200 image dimensions"]}`
- `{"image_rectangular": ["Image aspect ratio must be 2:1. Got 1024x1024 image dimensions"]}`
- `{"image_square": ["File size should not exceed 1 MB"]}`## Примечания- Приложение определяется по API-ключу, поэтому параметры пути отсутствуют.
- HEX-цвета принимаются в форматах `#RRGGBB` или `#RRGGBBAA`. Значение `font_weight` должно быть доступно для выбранного `font_family`.
- **Пользовательский домен и White label email здесь не настраиваются.** Управляйте ими в [Business Console](https://docs.didit.me/ru/console/white-label.md).## РазрешенияAPI-ключ должен иметь право обновлять настройки приложения.## Связанные материалы- [Получить брендинг](https://docs.didit.me/ru/management-api/customization/get.md)
- [White label в консоли](https://docs.didit.me/ru/console/white-label.md)


## OpenAPI

````yaml ru/openapi-25.json PATCH /v3/customization/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: >-
    API верификации личности. Аутентификация выполняется с помощью заголовка
    x-api-key.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/customization/:
    patch:
      tags:
        - Customization
      summary: Обновить параметры брендинга
      description: >-
        Частичное обновление брендинга приложения по модели White label.
        Отправьте `application/json` для изменения цветов, шрифтов, радиусов
        скругления и параметров интерфейса или `multipart/form-data` для
        загрузки файлов логотипа. Изменяются только переданные поля.
        Пользовательский домен и email в стиле White label нельзя настроить
        через этот endpoint — используйте для этого Business Console.
      operationId: update_customization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandingCustomizationUpdate'
            examples:
              Update colors and font:
                summary: Изменить цвета брендинга и шрифт
                value:
                  color_primary: '#123456'
                  color_button_1: '#2567FF'
                  font_family: AR One Sans
                  border_radius_buttons: 16
              Update UI options:
                summary: Изменить публичное имя и параметры сценария
                value:
                  app_public_name: Acme Verify
                  privacy_policy_url: https://acme.com/privacy
                  skip_welcome_screen: true
                  hide_progress_bar: true
                  callback_seconds: 5
              Remove a logo:
                summary: Удалить текущий прямоугольный логотип
                value:
                  delete_logo_rectangular: true
              Remove the dark-mode logo:
                summary: Удалить текущий логотип для темной темы
                value:
                  delete_logo_rectangular_dark: true
          multipart/form-data:
            schema:
              type: object
              description: >-
                Используйте multipart/form-data только для загрузки изображений
                логотипа. Приведённые выше поля брендинга также можно передать
                как поля формы в том же запросе.
              properties:
                image_square:
                  type: string
                  format: binary
                  description: >-
                    Квадратный логотип (соотношение сторон 1:1). PNG, JPG или
                    WebP, не менее 512 px по длинной стороне, не более **1 МБ**.
                image_rectangular:
                  type: string
                  format: binary
                  description: >-
                    Прямоугольный логотип (соотношение сторон 2:1). PNG, JPG или
                    WebP, не менее 512 пикселей по длинной стороне, не более **1
                    MB**.
                image_rectangular_dark:
                  type: string
                  format: binary
                  description: >-
                    Прямоугольный логотип для тёмной темы (соотношение сторон
                    2:1), отображаемый на тёмном фоне. PNG, JPG или WebP, не
                    менее 512 пикселей по длинной стороне, не более **1 MB**.
                    Возвращается как `logo_rectangular_dark`.
                image_favicon:
                  type: string
                  format: binary
                  description: Изображение favicon. Макс. **500 KB**.
            example:
              image_rectangular: (binary PNG logo, 2:1)
              image_rectangular_dark: (binary PNG logo for dark mode, 2:1)
              image_favicon: (binary favicon)
      responses:
        '200':
          description: >-
            Брендинг обновлён. Возвращается ПОЛНЫЙ объект брендинга (все поля, а
            не только изменённые).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandingCustomization'
              examples:
                Updated:
                  value:
                    color_primary: '#123456'
                    color_secondary: '#9DA1A1'
                    color_background: '#FFFFFF'
                    color_panel: '#2567FF'
                    color_panel_10: '#1A1A1A'
                    color_on_panel_1: '#9DA1A1'
                    color_on_panel_2: '#F4F4F6'
                    color_on_background: '#000000'
                    color_button_1: '#2567FF'
                    color_button_2: '#F8F8F8'
                    color_button_text_1: '#FFFFFF'
                    color_button_text_2: '#000000'
                    color_pill_text: '#111827'
                    border_radius_panel: 10
                    border_radius_buttons: 16
                    font_family: AR One Sans
                    font_weight: '400'
                    font_url: https://fonts.googleapis.com/css2?family=AR+One+Sans
                    logo_square: null
                    logo_rectangular: https://cdn.didit.me/white_label/logo_rectangular/...
                    logo_rectangular_dark: null
                    favicon: null
                    app_public_name: Acme Verify
                    privacy_policy_url: https://acme.com/privacy
                    skip_welcome_screen: true
                    disable_login_with_didit: false
                    hide_progress_bar: false
                    callback_seconds: 3
        '400':
          description: >-
            Недопустимое тело запроса. Например: некорректный шестнадцатеричный
            цвет (HEX), неизвестное семейство или начертание шрифта, поле только
            для Business Console (`domain`, `from_email`, `verify_domain`,
            `force_remove_domain`, `verify_email_domain`,
            `force_remove_email_domain` и связанные с ними поля только для
            чтения), либо загрузка логотипа, который не является изображением
            PNG, JPG или WebP, имеет размер менее 512 px по длинной стороне,
            превышает 1 МБ или имеет неверное соотношение сторон. Также
            возвращается при установке `disable_login_with_didit` в значение
            `false`, если настроен собственный домен.
          content:
            application/json:
              examples:
                Bad color:
                  value:
                    color_primary:
                      - >-
                        Invalid color format. Use '#RRGGBB' or '#RRGGBBAA'
                        format.
                Bad logo:
                  value:
                    image_rectangular:
                      - >-
                        Image aspect ratio must be 2:1. Got 1024x1024 image
                        dimensions
                Unsupported logo format:
                  summary: Изображение не в формате PNG, JPG или WebP (например, SVG)
                  value:
                    image_rectangular_dark:
                      - Upload a PNG, JPG or WebP image.
                Logo too small:
                  summary: Менее 512 px по длинной стороне
                  value:
                    image_rectangular:
                      - >-
                        Image must be at least 512 px on its long side. Got
                        400x200 image dimensions
                Logo too large:
                  summary: Более 1 МБ
                  value:
                    image_square:
                      - File size should not exceed 1 MB
                Console-only field:
                  value:
                    domain:
                      - Manage this field in the Business Console.
                Bad font weight:
                  value:
                    font_weight:
                      - >-
                        Font weight 950 is not available for Inter. Available
                        weights are: 100, 200, 300, 400, 500, 600, 700, 800, 900
        '403':
          description: >-
            API-ключ отсутствует, сформирован некорректно, истёк или относится к
            другому приложению. При отсутствии ключа возвращается `403`; при
            неверном, отозванном или истёкшем ключе возвращается `401`.
          content:
            application/json:
              examples:
                Invalid token:
                  value:
                    detail: You do not have permission to perform this action.
        '429':
          description: >-
            Превышен лимит запросов. Повторите попытку с экспоненциальной
            задержкой.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: |-
            curl -X PATCH 'https://verification.didit.me/v3/customization/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"color_primary": "#123456", "font_family": "AR One Sans"}'
        - lang: curl
          label: curl (logo upload)
          source: |-
            curl -X PATCH 'https://verification.didit.me/v3/customization/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -F 'image_rectangular=@logo.png' \
              -F 'image_rectangular_dark=@logo-dark.png' \
              -F 'image_favicon=@favicon.ico'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.customization.update(
                image_rectangular=open("image_rectangular.jpg", "rb"),
                image_rectangular_dark=open("image_rectangular_dark.jpg", "rb"),
                image_favicon=open("image_favicon.jpg", "rb"),
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit, { fileFromPath } from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.customization.update({
              image_rectangular: await fileFromPath("image_rectangular.jpg"),
              image_rectangular_dark: await fileFromPath("image_rectangular_dark.jpg"),
              image_favicon: await fileFromPath("image_favicon.jpg"),
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Customization.Update(ctx, didit.CustomizationUpdateParams{\n\tImageRectangular:     didit.Some(didit.FileFromPath(\"image_rectangular.jpg\")),\n\tImageRectangularDark: didit.Some(didit.FileFromPath(\"image_rectangular_dark.jpg\")),\n\tImageFavicon:         didit.Some(didit.FileFromPath(\"image_favicon.jpg\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.nio.file.Path;

            import me.didit.Didit;

            import me.didit.types.CustomizationUpdateParams;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.customization().update(CustomizationUpdateParams.builder()
                    .imageRectangular(Path.of("image_rectangular.jpg"))
                    .imageRectangularDark(Path.of("image_rectangular_dark.jpg"))
                    .imageFavicon(Path.of("image_favicon.jpg"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;
            use Didit\File;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->customization->update([
                'image_rectangular' => File::fromPath('image_rectangular.jpg'),
                'image_rectangular_dark' => File::fromPath('image_rectangular_dark.jpg'),
                'image_favicon' => File::fromPath('image_favicon.jpg'),
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: |-
            require "didit"

            # Reads DIDIT_API_KEY.
            didit = Didit::Client.new

            result = didit.customization.update(
              image_rectangular: Pathname("image_rectangular.jpg"),
              image_rectangular_dark: Pathname("image_rectangular_dark.jpg"),
              image_favicon: Pathname("image_favicon.jpg")
            )
            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Customization.UpdateAsync(new
            CustomizationUpdateParams

            {
                ImageRectangular = FileUpload.FromPath("image_rectangular.jpg"),
                ImageRectangularDark = FileUpload.FromPath("image_rectangular_dark.jpg"),
                ImageFavicon = FileUpload.FromPath("image_favicon.jpg"),
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    BrandingCustomizationUpdate:
      type: object
      description: >-
        Тело частичного обновления брендинга. Передавайте только те поля,
        которые хотите изменить. Шестнадцатеричные цвета принимают `#RRGGBB` или
        `#RRGGBBAA`. Пользовательский домен и email в стиле White label здесь не
        принимаются.
      properties:
        color_primary:
          type: string
          description: Цвет заголовков / основного текста.
        color_secondary:
          type: string
          description: Цвет абзаца / вторичного текста.
        color_background:
          type: string
          description: Цвет фона страницы.
        color_panel:
          type: string
          description: Цвет панели / акцентный цвет.
        color_panel_10:
          type: string
          description: Цвет панели при непрозрачности 10%.
        color_on_panel_1:
          type: string
          description: Цвет вспомогательного текста на панелях.
        color_on_panel_2:
          type: string
          description: Цвет плашки / бейджа на панелях.
        color_on_background:
          type: string
          description: Цвет текста на фоне.
        color_button_1:
          type: string
          description: Основной цвет кнопки.
        color_button_2:
          type: string
          description: Цвет вторичной кнопки.
        color_button_text_1:
          type: string
          description: Цвет текста основной кнопки.
        color_button_text_2:
          type: string
          description: Цвет текста вторичной кнопки.
        color_pill_text:
          type: string
          description: Цвет текста для индикаторов, полей ввода и селекторов.
        border_radius_panel:
          type: integer
          minimum: 0
          description: Радиус скругления углов панели в пикселях.
        border_radius_buttons:
          type: integer
          minimum: 0
          description: Радиус скругления углов кнопки в пикселях.
        font_family:
          type: string
          description: >-
            Название семейства шрифтов Google Fonts (например, `Inter`, `AR One
            Sans`).
        font_weight:
          type: string
          description: >-
            Насыщенность шрифта, доступная для выбранного семейства (например,
            `regular`, `500`, `700`).
        app_public_name:
          type: string
          nullable: true
          description: Публичное название, отображаемое в процессе верификации.
        privacy_policy_url:
          type: string
          nullable: true
          description: >-
            URL политики конфиденциальности, отображаемый конечному
            пользователю.
        skip_welcome_screen:
          type: boolean
          description: Пропустить начальный экран приветствия.
        disable_login_with_didit:
          type: boolean
          description: >-
            Продолжить как гость вместо отображения экрана входа через Didit. Не
            может быть переключено обратно на `false`, пока настроен
            пользовательский домен (400).
        hide_progress_bar:
          type: boolean
          description: Скрыть индикатор прогресса во время прохождения сценария.
        callback_seconds:
          type: integer
          minimum: 0
          description: >-
            Задержка (в секундах) перед перенаправлением на URL обратного
            вызова.
        delete_logo_square:
          type: boolean
          description: Когда `true`, удаляет текущий квадратный логотип.
        delete_logo_rectangular:
          type: boolean
          description: Когда `true`, удаляет текущий прямоугольный логотип.
        delete_logo_rectangular_dark:
          type: boolean
          description: >-
            Когда `true`, удаляет текущий логотип для темной темы, после чего
            `logo_rectangular_dark` принимает значение `null`. Если в том же
            multipart-запросе также загружается `image_rectangular_dark`,
            приоритет отдается загрузке.
        delete_favicon:
          type: boolean
          description: Когда `true`, удаляет текущий favicon.
    BrandingCustomization:
      type: object
      description: >-
        Брендинг White label для приложения: цвета, шрифты, радиусы скругления,
        URL-адреса логотипов и параметры UI/UX. URL-адреса логотипов доступны
        только для чтения (они задаются путём загрузки изображений).
        Пользовательский домен и email в стиле White label не включены.
      properties:
        color_primary:
          type: string
        color_secondary:
          type: string
        color_background:
          type: string
        color_panel:
          type: string
        color_panel_10:
          type: string
        color_on_panel_1:
          type: string
        color_on_panel_2:
          type: string
        color_on_background:
          type: string
        color_button_1:
          type: string
        color_button_2:
          type: string
        color_button_text_1:
          type: string
        color_button_text_2:
          type: string
        color_pill_text:
          type: string
        border_radius_panel:
          type: integer
        border_radius_buttons:
          type: integer
        font_family:
          type: string
        font_weight:
          type: string
        font_url:
          type: string
          nullable: true
          description: >-
            Только для чтения. Разрешённый URL таблицы стилей Google Fonts для
            выбранного семейства шрифтов.
        logo_square:
          type: string
          nullable: true
          description: >-
            URL квадратного логотипа только для чтения. Загружается через
            `image_square`.
        logo_rectangular:
          type: string
          nullable: true
          description: >-
            URL прямоугольного логотипа только для чтения. Загружается через
            `image_rectangular`.
        logo_rectangular_dark:
          type: string
          format: uri
          nullable: true
          description: >-
            Только для чтения. Временный подписанный URL прямоугольного логотипа
            для тёмной темы, отображаемого на тёмном фоне. `null`, если тёмный
            логотип не задан или прямоугольные логотипы не отображаются для
            вашего аккаунта. Загрузите его через `image_rectangular_dark`.
        favicon:
          type: string
          nullable: true
          description: URL фавикона только для чтения. Загружается через `image_favicon`.
        app_public_name:
          type: string
          nullable: true
        privacy_policy_url:
          type: string
          nullable: true
        skip_welcome_screen:
          type: boolean
        disable_login_with_didit:
          type: boolean
        hide_progress_bar:
          type: boolean
        callback_seconds:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API-ключ вашего приложения из раздела «Разработчикам» -> «API-ключи» в
        Business Console. Основной ключ имеет полный доступ. Именованный ключ
        может иметь ограниченную область действия: без доступа, чтение или
        запись для каждого ресурса, ограничение определенными сценариями или
        одобренными сессиями, списком IP-адресов и сроком действия. 401
        означает, что ключ неверен, отозван или его срок действия истек; 403
        означает, что ключ не был передан, у ключа нет доступа к этому ресурсу
        или действию, либо запрос поступил с адреса вне его списка IP-адресов;
        404 на маршруте сессии означает, что сессия не входит в сценарии или
        статусы ключа. Ключ без доступа к медиа получает URL изображений, видео
        и PDF как null, а ключ без прав на запись сессий получает ссылки на
        сессии и токены как null. См. https://docs.didit.me/console/api-keys.

````

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