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

# Activate conditional task group

> Manually activate a conditional task group (branch) entry point, bypassing its conditions and the prior-task requirement. A previously skipped entry point can be overridden and activated, but an already activated branch cannot be activated again. The branch's tasks are launched into the project and the entry point is completed. The response includes one resolution per resolved entry point (nested groups included) with the launched tasks and their insertion index.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /todo/task/{task}/_activate_branch
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /todo/task/{task}/_activate_branch:
    post:
      tags:
        - todo
      summary: Activate conditional task group
      description: >-
        Manually activate a conditional task group (branch) entry point,
        bypassing its conditions and the prior-task requirement. A previously
        skipped entry point can be overridden and activated, but an already
        activated branch cannot be activated again. The branch's tasks are
        launched into the project and the entry point is completed. The response
        includes one resolution per resolved entry point (nested groups
        included) with the launched tasks and their insertion index.
      parameters:
        - description: Branch entry point task ID
          name: task
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Activation result
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_todo_task.ActivateBranchResponse
        '400':
          description: Bad request - invalid task ID or not an entry point
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Task not found or no access
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_todo_task.ActivateBranchResponse:
      type: object
      properties:
        activated:
          type: boolean
        branches:
          type: array
          items:
            $ref: >-
              #/components/schemas/stax_ai_cx_cx-api_pkg_routes_helpers.BranchResolution
        ok:
          type: boolean
    stax_ai_cx_cx-api_pkg_routes_helpers.BranchResolution:
      type: object
      properties:
        activated:
          description: >-
            Activated is true when the branch's tasks were launched into the
            project
          type: boolean
        entry:
          description: Entry is the entry point task that was resolved (now completed)
          type: string
        index:
          description: >-
            Index is the position in the project's task list (order) where the
            launched

            tasks were inserted; subsequent tasks were shifted by len(Tasks)
          type: integer
        skipped:
          description: >-
            Skipped is true when the entry was completed with its conditions
            unmet
          type: boolean
        tasks:
          description: Tasks are the newly launched tasks, in order
          type: array
          items:
            $ref: '#/components/schemas/types.Task'
    types.Task:
      type: object
      properties:
        _id:
          type: string
        access:
          description: >-
            Access control - this is essentially just a list of user IDs who
            have tasks the project this task belongs to that are assigned to
            them.
          type: array
          items:
            type: string
        activity:
          type: array
          items:
            $ref: '#/components/schemas/types.Activity'
        assignee:
          type: string
        automation:
          description: An automation may be used to complete the task
          type: string
        automation_config:
          type: array
          items:
            $ref: '#/components/schemas/types.Field'
        automation_data: {}
        automation_logs:
          type: array
          items:
            $ref: '#/components/schemas/types.AutomationLog'
        automation_timing:
          description: >-
            AutomationTiming, when non-nil, schedules the automation to run
            later

            instead of immediately (nil = immediate). See AutomationTiming in

            project_template.go.
          allOf:
            - $ref: '#/components/schemas/types.AutomationTiming'
        billable:
          type: boolean
        blocked_fields:
          description: >-
            BlockingFields are project field keys that must be populated before
            the

            task can be completed. Unlike FieldsToComplete, these cannot be
            overridden.
          type: array
          items:
            type: string
        client:
          type: string
        client_task_data:
          description: JSON data for the client task
          allOf:
            - $ref: '#/components/schemas/types.ClientTaskData'
        client_task_type:
          description: >-
            If this is a task for the client to do, a client task type should be
            set - eg. "Census Data Collection", "Census Data Review",
            "Participant Notices", "Fill Web or Document Form", "Testing
            Corrections", "Other"
          type: string
        completed_at:
          type: string
        created_at:
          description: Time tracking
          type: string
        deleted_at:
          type: string
        description:
          type: string
        due:
          type: string
        fields_to_complete:
          description: >-
            If the task belongs to a project, it can require collecting
            specified fields for the project
          type: array
          items:
            type: string
        flagged_at:
          description: By automation
          type: string
        in_queue:
          type: boolean
        internal_task_data:
          description: JSON data for the internal task
          allOf:
            - $ref: '#/components/schemas/types.InternalTaskData'
        internal_task_type:
          description: >-
            If this is a special type (eg. payroll mapping, form selection,
            etc.), an internal task type should be set.
          type: string
        log_completion_to:
          type: string
        log_completion_type:
          description: Log completion time to project variable?
          type: string
        meeting:
          $ref: '#/components/schemas/types.Meeting'
        message:
          description: For returning when loading
          allOf:
            - $ref: '#/components/schemas/types.Message'
        next_at:
          type: string
        notes:
          type: string
        order:
          description: If the task is part of a project, the order should be tracked
          type: integer
        plan:
          type: string
        priority:
          type: integer
        project:
          type: string
        queue_group:
          description: Queue routing
          type: string
        queued_at:
          type: string
        scheduled_at:
          description: >-
            ScheduledAt is the absolute UTC instant a scheduled automation
            should fire,

            computed once from AutomationTiming at scheduling time (ENG-8103).

            Semantics: {ScheduledAt set, StartedAt nil} = pending;

            StartedAt set = claimed/fired; AutomationTiming nil = immediate.
          type: string
        started_at:
          type: string
        suggestion:
          type: integer
        team:
          type: string
        team_wide_access:
          description: >-
            Team-wide access - if true, all team members have access to this
            project
          type: boolean
        template:
          type: string
        work_logs:
          description: Work logs
          type: array
          items:
            $ref: '#/components/schemas/types.WorkLog'
    types.Activity:
      type: object
      properties:
        _id:
          type: string
        action:
          type: string
        changes:
          type: array
          items:
            $ref: '#/components/schemas/types.Change'
        client:
          type: string
        on_id:
          type: string
        on_py:
          type: integer
        on_type:
          type: string
        team:
          type: string
        timestamp:
          type: string
        user:
          type: string
    types.Field:
      type: object
      properties:
        key:
          type: string
        value: {}
    types.AutomationLog:
      type: object
      properties:
        code:
          description: |-
            Code is a stable machine-readable reason (e.g. "missing_fields") so
            clients can branch on it without parsing Message.
          type: string
        execution_time:
          type: number
        message:
          type: string
        timestamp:
          type: string
        traceback:
          type: string
        type:
          type: string
    types.AutomationTiming:
      type: object
      properties:
        anchor:
          type: string
        date:
          description: YYYY-MM-DD, team-local; anchor "date" only
          type: string
        run_after_days:
          description: >-
            anchor "": >= 0 after the trigger; "project_due": signed, negative
            is before
          type: integer
        run_hour:
          description: 0..23, wall-clock in the team's local timezone
          type: integer
    types.ClientTaskData:
      type: object
      properties:
        allow_skip_census_upload:
          type: string
        census_upload_instructions:
          type: string
        census_v2_employee_data_policy:
          $ref: '#/components/schemas/sharedtypes.CensusV2EmployeeDataPolicy'
        census_v2_export_field:
          type: string
        census_v2_export_file_type:
          type: string
        census_v2_flow_preset:
          $ref: '#/components/schemas/sharedtypes.CensusV2FlowPreset'
        destination:
          type: string
        download_file:
          type: string
        file_upload:
          type: string
        follow_up_interval:
          type: integer
        follow_up_to:
          type: array
          items:
            type: string
        form_file:
          type: string
        form_response:
          description: Results
          type: string
        form_template:
          type: string
        last_follow_up:
          type: string
        notice_file:
          type: string
        payroll_connect_instructions:
          type: string
        payroll_enabled:
          type: string
        payroll_upload_instructions:
          type: string
        py:
          type: string
        url:
          type: string
        w2_upload_instructions:
          type: string
    types.InternalTaskData:
      type: object
      properties:
        efast_data:
          $ref: '#/components/schemas/types.EFastData'
        form_id:
          type: string
        py:
          type: string
        task_type:
          type: string
        url:
          type: string
    types.Meeting:
      type: object
      properties:
        _id:
          type: string
        added_tasks:
          type: array
          items:
            type: string
        attendees:
          type: array
          items:
            $ref: '#/components/schemas/types.MeetingAttendee'
        client:
          type: string
        created_at:
          type: string
        date:
          type: string
        deleted_at:
          type: string
        duration:
          type: number
        format:
          type: string
        location:
          type: string
        notes:
          type: string
        raw_transcript:
          type: string
        tasks:
          type: array
          items:
            type: string
        team:
          type: string
        transcript:
          type: array
          items:
            $ref: '#/components/schemas/types.MeetingTranscriptSpeech'
    types.Message:
      type: object
      properties:
        _id:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/types.Attachment'
        bcc:
          type: string
        bookmark:
          type: boolean
        brief:
          description: Single-line summary
          type: string
        cc:
          type: string
        checksum:
          description: Checksum for de-duplication
          type: string
        clients:
          description: Is this message to/from a client?
          type: array
          items:
            type: string
        created_at:
          type: string
        date:
          type: string
        deleted_at:
          type: string
        domains:
          type: array
          items:
            type: string
        draft:
          type: boolean
        from:
          type: string
        html:
          type: string
        importance:
          type: integer
        in_reply_to:
          type: string
        internal:
          description: Is this message to/from only internal users?
          type: boolean
        message_folders:
          description: >-
            MessageFolders references the `folders` catalog rows this message
            belongs to

            (by their local ObjectID) — the per-mailbox equivalent of Tags
            (which is a

            team-wide label system). Each catalog row carries the provider's
            external_id;

            storing the local _id keeps renames free and gives referential
            integrity.

            Gmail = multi-label, Outlook = single-folder; the array models both.
          type: array
          items:
            type: string
        outbox:
          description: Magical stuff
          type: boolean
        private:
          description: >-
            The private flag is used if the message is from/to only internal
            admins (regardless of how many external users) that have the
            memberships.email.private flag set.

            This prevents other users from seeing external messages that may be
            private.
          type: boolean
        read:
          type: string
        references:
          type: string
        reply:
          type: string
        requires_response:
          type: boolean
        responses:
          type: array
          items:
            type: string
        safe_for_everyone:
          type: boolean
        schedule_id:
          description: >-
            ScheduleID is the Nylas message-schedule id returned by a native
            send_at

            (scheduled) send, used to reconcile the eventual Sent-folder message
            back

            onto this row (Nylas migration, Stage 4). Mirror of
            legacytypes.Message.
          type: string
        schedule_send_at:
          description: Schedule sending this at a specific time
          type: string
        secure:
          type: boolean
        send_failed:
          description: >-
            SendFailed marks a message whose provider-side send failed (Nylas

            message.send_failed webhook — typically a scheduled send) so the UI
            can

            flag it for the user to retry. Mirror of legacytypes.Message.
          type: boolean
        send_scheduled:
          type: boolean
        send_state:
          description: >-
            SendState records the provider-reported delivery state. Mirror of
            legacytypes.Message.
          type: string
        sentiment:
          type: integer
        source:
          type: string
        source_history_id:
          type: string
        source_id:
          type: string
        subject:
          type: string
        summary:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        tasks:
          type: array
          items:
            type: string
        team:
          type: string
        text:
          type: string
        thread:
          type: string
        to:
          type: string
        unique_key:
          type: string
        user:
          type: string
    types.WorkLog:
      type: object
      properties:
        _id:
          type: string
        ended_at:
          type: string
        notes:
          type: string
        started_at:
          type: string
        time_spent:
          type: integer
        user:
          type: string
    types.Change:
      type: object
      properties:
        data:
          type: string
        field:
          type: string
        from:
          type: string
        to:
          type: string
    sharedtypes.CensusV2EmployeeDataPolicy:
      type: string
      enum:
        - any
        - payroll_or_census
        - census_only
        - census_or_w2
        - w2_only
      x-enum-varnames:
        - CensusV2EmployeeDataPolicyAny
        - CensusV2EmployeeDataPolicyPayrollOrCensus
        - CensusV2EmployeeDataPolicyCensusOnly
        - CensusV2EmployeeDataPolicyCensusOrW2
        - CensusV2EmployeeDataPolicyW2Only
    sharedtypes.CensusV2FlowPreset:
      type: string
      enum:
        - company_contacts_ownership_payroll_census
        - company_contacts_ownership
        - payroll_census_only
      x-enum-varnames:
        - CensusV2FlowPresetCompanyContactsOwnershipPayrollCensus
        - CensusV2FlowPresetCompanyContactsOwnership
        - CensusV2FlowPresetPayrollCensusOnly
    types.EFastData:
      type: object
      properties:
        attachments:
          type: array
          items: {}
        dcg_attachments:
          type: array
          items: {}
        file_names:
          type: array
          items:
            type: string
        form:
          type: string
        schedule_instances:
          type: object
          additionalProperties:
            type: array
            items: {}
        schedules:
          type: array
          items:
            type: string
    types.MeetingAttendee:
      type: object
      properties:
        address:
          type: string
        name:
          type: string
        user:
          type: string
    types.MeetingTranscriptSpeech:
      type: object
      properties:
        speaker:
          type: string
        text:
          type: string
        timestamp:
          description: in seconds
          type: number
    types.Attachment:
      type: object
      properties:
        content_id:
          type: string
        file:
          type: string
        filename:
          type: string
        isInline:
          type: boolean
        size:
          type: integer
        source_id:
          type: string
        url:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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