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

# Branding

> Manage team-level branding (logo, colors, QR code, embed styles) and generate AI logos.

All requests use a single endpoint: `POST /functions/v1/api` with `resource: "branding"`.

## Access control

<Note>
  All branding actions require authentication. The user must belong to a team. Branding is stored at the team level.
</Note>

| Action          | Any user | Team member | Team owner | Admin |
| --------------- | -------- | ----------- | ---------- | ----- |
| `get` / `all`   | No       | Yes         | Yes        | Yes   |
| `update`        | No       | No          | Yes        | Yes   |
| `clear`         | No       | No          | Yes        | Yes   |
| `generate-logo` | No       | Yes         | Yes        | Yes   |

***

## Get branding

Retrieves the team's branding configuration.

<ParamField body="resource" type="string" required>
  Must be `"branding"`
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"get"` or `"all"`
</ParamField>

<CodeGroup>
  ```typescript TypeScript theme={null}
  const { team, branding } = await ApiService.invoke({
    resource: "branding",
    action: "get",
  });
  ```

  ```bash cURL theme={null}
  curl https://api.helpgenie.ai/v1/branding \
    -H "Authorization: Bearer hg_live_..."
  ```
</CodeGroup>

<ResponseField name="team" type="object">
  Team object with `id`, `name`, `branding`
</ResponseField>

<ResponseField name="branding" type="object | null">
  The branding object, or `null` if no branding is set. Contains `primaryColor`, `secondaryColor`, `logoUrl`, `gradientEnabled`, `gradientAngle`, `qrCodeStyle`, `embedStyle`, `extractedPalette`, etc.
</ResponseField>

***

## Update branding

Updates the team's branding configuration.

<ParamField body="resource" type="string" required>
  Must be `"branding"`
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"update"`
</ParamField>

<ParamField body="branding" type="object" required>
  The branding object to set. Replaces the entire branding configuration.
</ParamField>

<ParamField body="name" type="string">
  Optional team name update (applied alongside branding).
</ParamField>

<CodeGroup>
  ```typescript TypeScript theme={null}
  const { team, branding } = await ApiService.invoke({
    resource: "branding",
    action: "update",
    data: {
      branding: {
        primaryColor: "#1B5E8C",
        secondaryColor: "#4E9CFF",
        logoUrl: "https://...",
        gradientEnabled: true,
        gradientAngle: 135,
      },
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helpgenie.ai/v1/branding \
    -H "Authorization: Bearer hg_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "action": "update",
      "branding": {
        "primaryColor": "#1B5E8C",
        "secondaryColor": "#4E9CFF",
        "logoUrl": "https://...",
        "gradientEnabled": true
      }
    }'
  ```
</CodeGroup>

***

## Clear branding

Resets the team's branding to `null` (removes all custom branding).

<ParamField body="resource" type="string" required>
  Must be `"branding"`
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"clear"`
</ParamField>

<CodeGroup>
  ```typescript TypeScript theme={null}
  const { team } = await ApiService.invoke({
    resource: "branding",
    action: "clear",
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helpgenie.ai/v1/branding \
    -H "Authorization: Bearer hg_live_..." \
    -H "Content-Type: application/json" \
    -d '{"action": "clear"}'
  ```
</CodeGroup>

***

## Generate logo

Generate a professional AI logo icon. Returns a transparent PNG uploaded to storage. The logo is an icon/symbol only (no text). Generation takes 15-60 seconds.

<ParamField body="resource" type="string" required>
  Must be `"branding"`
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"generate-logo"`
</ParamField>

<ParamField body="name" type="string" required>
  Brand or business name. Used as a thematic hint to inspire the icon design (not rendered as text in the logo).
</ParamField>

<ParamField body="description" type="string">
  Short business description for prompt context. Example: `"A residential plumbing business in Austin, TX"`
</ParamField>

<ParamField body="style" type="string">
  Style preset. One of: `modern` (default), `classic`, `bold`, `friendly`, `tech`, `luxury`.
</ParamField>

<ParamField body="industry" type="string">
  Industry context for relevant iconography. One of: `automotive`, `marine`, `appliances`, `office-equipment`, `home-builders`, `travel-hospitality`, `manufacturing`, `industrial`, `trades`, `plumbing`, `electrical`, `hvac`, `landscaping`, `real-estate`, `healthcare`, `fitness`, `restaurant`, `retail`, `technology`, `education`, `finance`, `legal`.
</ParamField>

<CodeGroup>
  ```typescript TypeScript theme={null}
  const { image_url } = await ApiService.invoke({
    resource: "branding",
    action: "generate-logo",
    data: {
      name: "Plumbing Pros",
      description: "Residential plumbing in Austin, TX",
      industry: "plumbing",
      style: "modern",
    },
  });

  // Then apply the logo to branding:
  await ApiService.invoke({
    resource: "branding",
    action: "update",
    data: {
      branding: { ...existingBranding, logoUrl: image_url },
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST https://api.helpgenie.ai/v1/branding \
    -H "Authorization: Bearer hg_live_..." \
    -H "Content-Type: application/json" \
    -d '{
      "action": "generate-logo",
      "name": "Plumbing Pros",
      "description": "Residential plumbing in Austin, TX",
      "industry": "plumbing",
      "style": "modern"
    }'
  ```
</CodeGroup>

<ResponseField name="image_url" type="string">
  Public URL of the generated logo PNG (transparent background). Can be used directly as the `logoUrl` in a branding update.
</ResponseField>

<ResponseField name="storage_path" type="string">
  Supabase Storage path: `generated-logos/{filename}.png`
</ResponseField>

<ResponseField name="replicate_prediction_id" type="string">
  Replicate prediction ID for debugging/tracking.
</ResponseField>

<Note>
  The generated logo is a transparent PNG icon/symbol with no text. To apply it to your branding, take the returned `image_url` and pass it as `logoUrl` in a subsequent `update` call.
</Note>
