# Public profile

3 endpoints.

## Read the workspace's public-page settings

```http
GET https://orbitwrite.com/api/v1/public-profile
```

The page's custom links, channel order and linkable channels (each with the public URL the page links to and whether it is hidden). Any member may read (`publicProfile:read`).

**Authentication:** session cookie.

### Query parameters

- `organizationId` (string, required)

### Responses

#### 200

The page's settings

- `links` (PublicProfileLinkView[], required)
  - `id` (string, required)
  - `title` (string, required)
  - `url` (string, required)
  - `icon` (object, optional) — The site's icon. Absent until it has been looked up, which happens in the background after a save.
    - `host` (string, required) — The link host the icon was looked up for.
    - `url` (string | any | null, required) — Our copy of the site's icon, or null when there is none to show (the site has no usable icon, or the page draws its own logo for that network).
- `channelOrder` (string[], required) — Channel ids in the order they appear on the page. Empty when the workspace hasn't set an explicit order.
- `channels` (PublicProfileChannel[], required) — The connected channels that can appear on the page — those with a public profile URL — in the page's saved order, hidden ones included. Slack, Discord and any channel without a resolvable profile URL are omitted; a custom link covers those.
  - `id` (string, required)
  - `platform` (string, required)
  - `handle` (string | any | null, required)
  - `displayName` (string | any | null, required)
  - `url` (string, required) — The public profile URL the page links this channel to.
  - `hidden` (boolean, required) — Whether the workspace has hidden this channel from the page.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

## Save the workspace's public-page settings

```http
PATCH https://orbitwrite.com/api/v1/public-profile
```

Requires `publicProfile:update`. A partial save — an omitted field is left unchanged, so reordering channels can't wipe the custom links.

**Authentication:** session cookie.

### Request body (`application/json`)

- `organizationId` (string, required)
- `links` (PublicProfileLink[], optional)
  - `id` (string, required)
  - `title` (string, required)
  - `url` (string, required)
- `channelOrder` (string[], optional)

### Responses

#### 200

The saved settings

- `links` (PublicProfileLinkView[], required)
  - `id` (string, required)
  - `title` (string, required)
  - `url` (string, required)
  - `icon` (object, optional) — The site's icon. Absent until it has been looked up, which happens in the background after a save.
    - `host` (string, required) — The link host the icon was looked up for.
    - `url` (string | any | null, required) — Our copy of the site's icon, or null when there is none to show (the site has no usable icon, or the page draws its own logo for that network).
- `channelOrder` (string[], required) — Channel ids in the order they appear on the page. Empty when the workspace hasn't set an explicit order.
- `channels` (PublicProfileChannel[], required) — The connected channels that can appear on the page — those with a public profile URL — in the page's saved order, hidden ones included. Slack, Discord and any channel without a resolvable profile URL are omitted; a custom link covers those.
  - `id` (string, required)
  - `platform` (string, required)
  - `handle` (string | any | null, required)
  - `displayName` (string | any | null, required)
  - `url` (string, required) — The public profile URL the page links this channel to.
  - `hidden` (boolean, required) — Whether the workspace has hidden this channel from the page.

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

## Show or hide one channel on the public page

```http
POST https://orbitwrite.com/api/v1/public-profile/channels/{accountId}/visibility
```

Requires `publicProfile:update`. The flag is stored on the channel row, but showing a channel publicly is a public-profile decision, not a channel-management one.

**Authentication:** session cookie.

### Path parameters

- `accountId` (string, required)

### Request body (`application/json`)

- `hidden` (boolean, required)

### Responses

#### 200

The mutation was applied

- `ok` (boolean, required, one of `true`)

#### 400

Invalid request

- `error` (string, required)
- `issues` (any[], optional)

#### 401

Not signed in

- `error` (string, required)
- `issues` (any[], optional)

#### 403

Not a member of the organization

- `error` (string, required)
- `issues` (any[], optional)

#### 404

The resource does not exist

- `error` (string, required)
- `issues` (any[], optional)
