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

# Set Trigger Mode

> Persist the onboarding trigger-mode choice (SMMT content-driven).

This is the wizard's first question, posted after the team already exists
(checkout/webhook create it strategy-driven). Flipping to "content-driven"
makes the wizard show the Content Sources step and makes cycle-start skip
strategy generation. Validated server-side (flag + team-type gate).



## OpenAPI

````yaml /openapi.json post /api/v1/teams/{team_id}/onboarding/trigger-mode
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams/{team_id}/onboarding/trigger-mode:
    post:
      tags:
        - Team Onboarding
      summary: Set Trigger Mode
      description: >-
        Persist the onboarding trigger-mode choice (SMMT content-driven).


        This is the wizard's first question, posted after the team already
        exists

        (checkout/webhook create it strategy-driven). Flipping to
        "content-driven"

        makes the wizard show the Content Sources step and makes cycle-start
        skip

        strategy generation. Validated server-side (flag + team-type gate).
      operationId: set_trigger_mode_api_v1_teams__team_id__onboarding_trigger_mode_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerModeUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TriggerModeUpdateRequest:
      properties:
        trigger_mode:
          type: string
          enum:
            - strategy-driven
            - content-driven
          title: Trigger Mode
          description: '''strategy-driven'' or ''content-driven'''
      type: object
      required:
        - trigger_mode
      title: TriggerModeUpdateRequest
      description: >-
        Persist the onboarding trigger-mode choice (SMMT content-driven).


        Validated server-side: "content-driven" requires the feature flag + a

        content-driven-capable team type, else 400.


        `trigger_mode` is deliberately REQUIRED here (no None): this request is

        the wizard's explicit set-trigger-mode action, so the client always
        sends

        a concrete choice. The nullable state lives on the STORED column —

        `AgentTeam.trigger_mode` may be NULL (= classic strategy-driven default,

        resolved by `team_service._resolve_trigger_mode`) for teams that never

        answered the wizard question. Don't widen this Literal to `| None`; a

        client with nothing to set simply doesn't call the endpoint.
    OnboardingStatusResponse:
      properties:
        step:
          type: string
          title: Step
        connections:
          items:
            $ref: '#/components/schemas/ConnectionRequirement'
          type: array
          title: Connections
        cycle_configured:
          type: boolean
          title: Cycle Configured
          default: false
        loops_configured:
          type: boolean
          title: Loops Configured
          default: false
        lifecycle_type:
          type: string
          title: Lifecycle Type
          default: cyclical
        requires_brand:
          type: string
          title: Requires Brand
          default: optional
        chat_enabled:
          type: boolean
          title: Chat Enabled
          default: true
        cycle_start_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Cycle Start Mode
        trigger_types:
          items:
            type: string
          type: array
          title: Trigger Types
        trigger_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger Mode
      type: object
      required:
        - step
      title: OnboardingStatusResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConnectionRequirement:
      properties:
        provider:
          type: string
          title: Provider
        label:
          type: string
          title: Label
        required:
          type: boolean
          title: Required
          default: false
        type:
          type: string
          title: Type
          default: oauth
        connected:
          type: boolean
          title: Connected
          default: false
        fields:
          items:
            $ref: '#/components/schemas/ConnectionFieldDef'
          type: array
          title: Fields
      type: object
      required:
        - provider
        - label
      title: ConnectionRequirement
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConnectionFieldDef:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        type:
          type: string
          title: Type
          default: text
        placeholder:
          type: string
          title: Placeholder
          default: ''
        help:
          type: string
          title: Help
          default: ''
        default:
          type: string
          title: Default
          default: ''
      type: object
      required:
        - key
        - label
      title: ConnectionFieldDef
      description: Describes a single field in a config-type connection form.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````