---
title: "Create a team-shared focus mode (team admin only)"
method: POST
path: "/focus-mode/shared"
tags: ["focus-mode"]
---

# Create a team-shared focus mode (team admin only)

`POST /focus-mode/shared`

## Request

- Base URL: `https://api.focusbear.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.focusbear.io/focus-mode/shared`
- Auth: HTTP bearer

## Request body

- CreateSharedFocusModeDto
  - `allowed_urls` string[]
  - `allowed_apps` string[]
  - `is_ai_enabled` boolean: Enable or disable AI-powered URL and app evaluation for this focus mode
  - `categories` FocusModeCategoryDto[]: Category assigned to each blocked URL/app entry in this block list
    - `entry` string, required: The blocked URL, keyword or app path this category applies to
    - `category` string, required: Client taxonomy id, e.g. social_media, news, video
  - `app_identities` AppIdentityDto[]: Platform identities for this mode's app entries, keyed by `entry`. Same omit/replace rules as `categories`: omitted keeps the stored ones, `[]` clears what the client supplied. Either way the server fills in identities for common apps from the catalog, so a client that only knows names never has to send this.
    - `entry` string, required: The allowed_apps value this identity describes, verbatim
    - `name` string
    - `common_app_id` string: Id of the GET /common-apps entry this app was picked from
    - `mac_bundle_id` string
    - `windows_identity` WindowsAppIdentityDto
      - `exe` string, required
      - `exes` string[]: Every executable the app ships as, exe included, when it has more than one
      - `publisher` string: Authenticode signer organisation
  - `team_id` string, uuid, required
  - `name` string, required
  - `id` string, uuid
  - `metadata` object: Older macOS builds copy every top-level key they receive back into `metadata` on save, so once a newer client stores `categories` or `app_identities` they would echo a (possibly stale) copy here. The columns are the only home for those; drop the copies so no client can persist them.
  - `tags` CreateFocusModeTagDto[]
    - `id` string, uuid, required
    - `text` string, required

## Response `201`

- object

---

[API](https://skmtc.dev/focusbear/apis/focusbear-api.md) - [All operations](https://skmtc.dev/focusbear/apis/focusbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/focusbear/apis/focusbear-api/revisions/3a83a3b9a811?raw)
