Skip to content

Brands

Import a site's theme

POST/v1/brands/{brandId}/import-theme

Read a website's styling and return it as theme values. It picks up the button color, text and background colors, corner radius, and the font with its Google Fonts, Bunny or Adobe stylesheet. It uses no AI, so the same page gives the same theme. It always returns a complete, readable theme. When the page can't be fetched, because it is down, blocked or not a web page, you get the default theme and warnings says why.

Path parameters

  • brandIdstringrequired

    The brand's id.

Body

JSON, with Content-Type: application/json.

  • urlstringrequired

    The public page to read, usually the brand's home page. Private and local addresses are refused with 400 import_failed.

    max 2000 chars · uri

  • applyboolean

    Set to true to also merge the result into the brand's theme. The backdrop is never changed. The default, false, only previews.

Response

  • themeobjectrequired

    The imported theme values.

    Show 13 fields
    • accentstring
    • accentTextstring
    • backgroundstring
    • surfacestring
    • textstring
    • mutedstring
    • borderstring
    • radiusnumber

      0–48

    • buttonRadiusnumber

      0–48

    • fontstring
    • headingFontstring

      max 500 chars

    • backdropstring
    • fontStylesheetstring

      max 2000 chars · uri

  • sourcesobjectrequired

    Where each value came from, by theme key. For example, ".btn-primary" background.

  • warningsarray of stringrequired

    Which values fell back to a default. If the page couldn't be read, this says why.

  • notesarray of stringrequired

    Things good to know that need no fixing, such as a self-hosted Google font.

  • brandobject

    The brand with the merged theme. Only present with apply: true.

    Show 11 fields
    • idstringrequired

      The brand's id.

    • namestringrequired

      The brand's name.

    • domainsarray of stringrequired

      Hostnames the brand's forms may be embedded on. Subdomains match too. An empty list means any site.

    • avatarUrlstring or nullrequired

      The brand's favicon, fetched in the background from its first public domain. It is fetched again when the first public domain changes. Null until there is one, so show initials instead.

    • themeobjectrequired

      The theme values the brand sets. The rest use the defaults.

      Show 13 fields
      • accentstring
      • accentTextstring
      • backgroundstring
      • surfacestring
      • textstring
      • mutedstring
      • borderstring
      • radiusnumber

        0–48

      • buttonRadiusnumber

        0–48

      • fontstring
      • headingFontstring

        max 500 chars

      • backdropstring
      • fontStylesheetstring

        max 2000 chars · uri

    • trackingobjectrequired

      The tracking settings in effect, which are the brand's values on top of the defaults.

      Show 4 fields
      • metaobjectrequired
        Show 4 fields
        • enabledbooleanrequired
        • pageViewbooleanrequired
        • capibooleanrequired
        • pixelIdstring
      • ga4objectrequired
        Show 2 fields
        • enabledbooleanrequired
        • measurementIdstring
      • jornayaobjectrequired
        Show 2 fields
        • enabledbooleanrequired
        • campaignKeystring
      • trustedFormobjectrequired
        Show 1 field
        • enabledbooleanrequired
    • hasMetaCapiTokenbooleanrequired

      Whether a Meta Conversions API token is saved. The token itself is never returned.

    • webhookCountintegerrequired

      How many webhooks the brand has, its own and its forms', counted up to 100. GET /v1/webhooks lists them.

      -9007199254740991–9007199254740991

    • starterbooleanrequired

      True for a guest's starter brand, which has no website or name yet. False for every other brand.

    • createdAtnumberrequired

      When the brand was made, in milliseconds since the epoch.

    • workspaceIdstringrequired

      The workspace the brand belongs to.

Errors answer with a status and the error shape.