---
title: "Adjust habits with AI asynchronously"
method: POST
path: "/activity-library/adjust-habits-with-ai/async"
tags: ["activity-library"]
---

# Adjust habits with AI asynchronously

`POST /activity-library/adjust-habits-with-ai/async`

## 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/activity-library/adjust-habits-with-ai/async`
- Auth: HTTP bearer

## Request body

- AdjustHabitsWithAiDto
  - `current_habits` AdjustHabitDto[], required
    - `name` string, required
    - `is_office_friendly` boolean
    - `take_notes` 'NO_NOTE' | 'DURING_ACTIVITY' | 'END_OF_ACTIVITY'
    - `priority` 'STANDARD' | 'HIGH'
    - `allowed_focus_mode_id` string, uuid
    - `video_urls` string[]
    - `include_in_every_break` boolean
    - `habit_icon` string
    - `habit_icon_generation_failed` boolean
    - `log_quantity_question` string
    - `choice_type` 'random' | 'normal' | 'competency' | 'check_list'
    - `allowed_apps` string[]
    - `allowed_mobile_apps` string[]
    - `allowed_urls` string[]
    - `break_type` 'micro' | 'pomodoro'
    - `linked_project_ids` string[]
    - `tags` string[]
    - `linked_project_id` string, uuid: First of linked_project_ids, for older clients
    - `log_quantity` boolean
    - `duration_seconds` number
    - `completion_requirements` string
    - `log_summary_type` 'SUM' | 'AVG'
    - `choices` ActivityChoiceData[]
      - `id` string, uuid, required
      - `name` string, required
      - `completion_requirements` string
      - `log_quantity` boolean
      - `log_quantity_question` string
      - `log_quantity_questions` LogQuantityQuestion[]
        - `id` string
        - `created_at` string
        - `updated_at` string
      - `log_summary_type` 'SUM' | 'AVG'
      - `video_urls` string[]
      - `allowed_apps` string[]
      - `allowed_mobile_apps` string[]
      - `allowed_urls` string[]
      - `geofence_id` string, uuid, nullable
      - `duration_seconds` number
      - `competency_level` number
      - `activity_template_id` string, uuid
      - `linked_activity_id` string, uuid
      - `linked_activity_template_id` string, uuid
      - `habit_icon` string
    - `days_of_week` string[]
    - `impact_category` 'hours_of_sleep' | 'energy_level_upon_awakening' | 'mood' | 'perception_of_productivity' | 'minutes_spent_on_distracting_websites' | 'minutes_spent_postponing_app_blocks' | 'minutes_spent_postponing_habits'
    - `geofence_id` string, uuid, nullable
    - `id` string, uuid, required
    - `activity_template_id` string, uuid
    - `is_default` boolean
    - `run_micro_breaks` boolean
    - `log_quantity_questions` LogQuantityQuestion[]
      - `id` string
      - `created_at` string
      - `updated_at` string
    - `linked_activity_id` string, uuid
    - `linked_activity_template_id` string, uuid
    - `check_list` string[]
    - `activity_type` string
    - `tutorial` string, uuid
    - `cutoff_time_for_doing_activity` string
    - `category` string
    - `text_instructions` string
    - `image_urls` ActivityImageData[]
      - `file_path` string: R2 object key (e.g. `activity_images/{activityId}/...`); required when `url` is not set.
      - `url` string: External image URL; required when `file_path` is not set (e.g. R2-only entries use `file_path` alone).
    - `current_competency_level` number
    - `competency_level` number
    - `show_saved_distracting_websites` boolean
    - `pack_id` string, uuid
    - `emoji` string
  - `user_feedback` string, required
  - `user_goals` string[]
  - `routine_duration` number
  - `groupByGoals` boolean
  - `language` 'en' | 'es' | 'de' | 'ja' | 'vi' | 'pt-BR' | 'pt-PT' | 'zh-CN' | 'zh-TW' | 'nl' | 'tl' | 'fr' | 'it' | 'pl' | 'ru' | 'ar' | 'ro'

## Response `202`

Adjust habits task accepted

---

[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)
