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

# Manage customer portals and branding

> Integration guide for Manage customer portals and branding

Read the current portal address and brand, then change only the fields you intend to update. Use a verified personal MCP credential or a signed-in Firebase user. A team API key cannot act as its creator. These settings affect the team across live and test modes.

## Read the current configuration

```bash theme={null}
export GIGSTACK_API_BASE="https://api.gigstack.io/v2"
export TEAM_ID="team_example"

curl --fail-with-body "$GIGSTACK_API_BASE/teams/$TEAM_ID/customer-portal" \
  -H "Authorization: Bearer $GIGSTACK_API_KEY"

curl --fail-with-body "$GIGSTACK_API_BASE/teams/$TEAM_ID/brand" \
  -H "Authorization: Bearer $GIGSTACK_API_KEY"
```

Current unblocked members, owners and the team's billing administrators can read these settings. Portal results include `slug`, `url`, `can_register` and `can_rename`; a missing slug or URL is `null`. Brand results include `alias`, `primary_color`, `secondary_color`, `logo` and `voice`. Missing or cleared brand values are `null`.

## Register or rename a portal

For the first registration, a current member can send `PUT /teams/{id}/customer-portal` with `{"slug":"examplecompany"}`. Use 1–128 ASCII letters or digits. The server normalizes the slug to lowercase and checks uniqueness against both API and dashboard registrations.

Renaming changes customer-facing links. Read the existing slug first and obtain approval for that change, then a current administrator can send:

```json theme={null}
{
  "slug": "newexamplecompany",
  "expected_slug": "examplecompany",
  "confirm_existing_links_change": true
}
```

A stale `expected_slug`, missing confirmation or occupied slug returns `409`; read the current state before deciding what to do next. An administrator resending the current slug receives the existing state. There is no unregister operation.

## Update brand fields

A current administrator can send a partial update:

```bash theme={null}
curl --fail-with-body -X PATCH "$GIGSTACK_API_BASE/teams/$TEAM_ID/brand" \
  -H "Authorization: Bearer $GIGSTACK_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"alias":"Example Company","primary_color":"#527A16"}'
```

Omitted fields remain unchanged. Use `null` or an empty string to clear a supplied field. Limits are 200 characters for alias, 40 for each color and 20,000 for voice. Unknown fields are rejected. Read the brand afterward to confirm the stored values.

## Upload or remove a logo

Upload one PNG or JPEG file, up to 10 MiB, as multipart field `file`:

```bash theme={null}
curl --fail-with-body "$GIGSTACK_API_BASE/teams/$TEAM_ID/brand/logo" \
  -H "Authorization: Bearer $GIGSTACK_API_KEY" \
  -F 'file=@./logo.png'
```

Use `DELETE /teams/{id}/brand/logo` to clear the current logo. Both actions require an administrator and return the brand plus `storage_cleanup`. `removed` confirms managed previous-object cleanup; `retained` means the previous object remains in storage. Historical paths and arbitrary URLs are retained. Do not interpret clearing the logo as confirmation that every old file was deleted. The returned logo URL grants access to the uploaded media; share it only as intended.

## Analyze and review brand voice

Send `POST /teams/{id}/brand/analyze-voice` with `{"url":"https://example.com"}`. This administrator action reads a public website and uses model compute. The response contains an analysis with tone, style, audience, vocabulary and examples, plus `analyzedUrl`, `pagesAnalyzed` and `saved: false`.

Review the suggested analysis and write the desired voice text separately through `PATCH /brand` with `{"voice":"Your reviewed voice instructions"}`. Analysis never updates the stored voice automatically.

## Handle errors

`401` requires a verified personal credential. For `403`, check current administrator access; a blocked or removed seat cannot retain authority through an old token. `404` means the team was not found or is inaccessible. For `409`, inspect the current portal and team state. After a timeout or `500` on a write, read the current state before retrying; these operations do not provide universal idempotency keys.

The routes and contracts have offline coverage. Their presence in a feature branch does not establish deployed availability.


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