components:
  schemas:
    ACULimitResponse:
      properties:
        cycle_acu_limit:
          title: Cycle Acu Limit
          type: integer
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        scope:
          enum:
          - enterprise
          - org
          - user
          title: Scope
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - cycle_acu_limit
      - scope
      title: ACULimitResponse
      type: object
    ActiveUserMetricsListResponse:
      description: Validated list of active user metrics with ascending order and
        no overlapping periods.
      items:
        $ref: '#/components/schemas/ActiveUserMetricsResponse'
      title: ActiveUserMetricsListResponse
      type: array
    ActiveUserMetricsResponse:
      description: Single entry for active users over time.
      properties:
        active_users:
          title: Active Users
          type: integer
        end_time:
          title: End Time
          type: integer
        start_time:
          title: Start Time
          type: integer
      required:
      - start_time
      - end_time
      - active_users
      title: ActiveUserMetricsResponse
      type: object
    ActorResponse:
      description: A user or service-user principal attributed to an action or resource.
      properties:
        id:
          description: User id or service-user id.
          title: Id
          type: string
        name:
          anyOf:
          - type: string
          - type: 'null'
          description: Display name, resolved server-side; null when deleted.
          title: Name
        type:
          description: Kind of principal.
          enum:
          - user
          - service_user
          title: Type
          type: string
      required:
      - type
      - id
      title: ActorResponse
      type: object
    AcusByProduct:
      description: 'ACUs per product for one day; the buckets sum to the day''s ``acus``.


        ``devin`` is ACUs from Devin sessions a person or service user started,

        including code-scan and on-call sessions. ``automation`` is ACUs spent by

        automations: sessions an automation started plus its code steps that run

        without a session. ``automation`` is ``null`` where the per-product

        breakdown is not available.'
      properties:
        automation:
          anyOf:
          - type: number
          - type: 'null'
          title: Automation
        cascade:
          title: Cascade
          type: number
        devin:
          title: Devin
          type: number
        review:
          anyOf:
          - type: number
          - type: 'null'
          title: Review
        terminal:
          title: Terminal
          type: number
      required:
      - devin
      - cascade
      - terminal
      title: AcusByProduct
      type: object
    AiGatewayMetric:
      enum:
      - requests
      - tokens
      - inter_delta_gap
      - request_itl
      - ttft
      - e2e_latency
      - output_tps
      - streaming_share
      title: AiGatewayMetric
      type: string
    AiGatewayMetricPointResponse:
      properties:
        bucket_duration_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          description: Actual complete bucket duration; null for boundary/in-progress
            or unknown-width buckets.
          title: Bucket Duration Seconds
        per_minute:
          anyOf:
          - type: number
          - type: 'null'
          description: "Counter per_second \xD7 60 (including aggregate TPM); otherwise\
            \ null."
          title: Per Minute
        per_second:
          anyOf:
          - type: number
          - type: 'null'
          description: Counter value / complete bucket duration (QPS or aggregate
            token/s); otherwise null.
          title: Per Second
        timestamp:
          description: Actual bucket start, in Unix seconds.
          title: Timestamp
          type: integer
        value:
          anyOf:
          - type: number
          - type: 'null'
          description: Bucket value; null means no observation.
          title: Value
      required:
      - timestamp
      - value
      - bucket_duration_seconds
      - per_second
      - per_minute
      title: AiGatewayMetricPointResponse
      type: object
    AiGatewayMetricProvenanceResponse:
      properties:
        environment:
          const: production
          default: production
          title: Environment
          type: string
        kind:
          description: Counter, distribution, or derived ratio.
          enum:
          - counter
          - distribution
          - ratio
          title: Kind
          type: string
        metric_name:
          description: Source OTel instrument exported to Datadog.
          title: Metric Name
          type: string
        scope:
          const: account
          default: account
          title: Scope
          type: string
        source:
          const: otel
          default: otel
          title: Source
          type: string
      required:
      - metric_name
      - kind
      title: AiGatewayMetricProvenanceResponse
      type: object
    AiGatewayMetricSeriesResponse:
      properties:
        dimensions:
          additionalProperties:
            type: string
          description: Fixed metric-specific dimensions.
          title: Dimensions
          type: object
        points:
          description: Time-ordered actual buckets.
          items:
            $ref: '#/components/schemas/AiGatewayMetricPointResponse'
          title: Points
          type: array
      required:
      - dimensions
      - points
      title: AiGatewayMetricSeriesResponse
      type: object
    AiGatewayMetricsResponse:
      properties:
        aggregation:
          enum:
          - sum
          - avg
          - p50
          - p90
          - p95
          - p99
          - ratio
          title: Aggregation
          type: string
        effective_interval_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          description: Observed timestamp spacing; null if fewer than two timestamps.
          title: Effective Interval Seconds
        metric:
          $ref: '#/components/schemas/AiGatewayMetric'
        provenance:
          $ref: '#/components/schemas/AiGatewayMetricProvenanceResponse'
        requested_interval_seconds:
          title: Requested Interval Seconds
          type: integer
        sampled:
          const: false
          default: false
          description: OTel measurements are independent of trace sampling; not lossless
            or billing-grade.
          title: Sampled
          type: boolean
        series:
          items:
            $ref: '#/components/schemas/AiGatewayMetricSeriesResponse'
          title: Series
          type: array
        time_after:
          description: Inclusive requested start.
          title: Time After
          type: integer
        time_before:
          description: Exclusive requested end.
          title: Time Before
          type: integer
        unit:
          enum:
          - request
          - token
          - ms
          - token/s
          - percent
          title: Unit
          type: string
      required:
      - metric
      - unit
      - aggregation
      - time_after
      - time_before
      - requested_interval_seconds
      - effective_interval_seconds
      - provenance
      - series
      title: AiGatewayMetricsResponse
      type: object
    ApiKeyResponse:
      description: Shared response model for API key details (used by both PAT and
        service user endpoints).
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        api_key_name:
          title: Api Key Name
          type: string
        created_at:
          title: Created At
          type: integer
        expires_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Expires At
        is_active:
          title: Is Active
          type: boolean
        last_used_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Used At
        revoked_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Revoked At
      required:
      - api_key_id
      - api_key_name
      - created_at
      - expires_at
      - revoked_at
      - last_used_at
      - is_active
      title: ApiKeyResponse
      type: object
    ApiKeyWithTokenResponse:
      description: Shared response model for API key creation/rotation (includes one-time
        token).
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        api_key_name:
          title: Api Key Name
          type: string
        token:
          description: The raw API token. This is only shown once at creation/rotation
            time.
          title: Token
          type: string
      required:
      - api_key_id
      - api_key_name
      - token
      title: ApiKeyWithTokenResponse
      type: object
    AttachmentResponse:
      properties:
        attachment_id:
          title: Attachment Id
          type: string
        name:
          title: Name
          type: string
        url:
          title: Url
          type: string
      required:
      - attachment_id
      - name
      - url
      title: AttachmentResponse
      type: object
    AuditLogAction:
      enum:
      - login
      - create_org
      - update_org
      - delete_org
      - revoke_all_enterprise_api_keys
      - add_enterprise_member
      - delete_member
      - add_member
      - assign_roles
      - update_role
      - create_role
      - delete_role
      - add_group_membership
      - update_group_membership
      - delete_group_membership
      - create_idp_group
      - update_idp_group
      - delete_idp_group
      - add_idp_group_member
      - remove_idp_group_member
      - create_scim_user
      - update_scim_user
      - delete_scim_user
      - create_knowledge
      - edit_knowledge
      - delete_knowledge
      - create_folder
      - update_folder
      - delete_folder
      - create_session
      - sleep_session
      - terminate_session
      - archive_session
      - unarchive_session
      - schedule_session_deletion
      - cancel_session_deletion
      - send_message
      - authorize_ssh_access
      - grant_ssh_access
      - enroll_ssh_key
      - remove_ssh_key
      - expose_port
      - request_local_tools_access
      - authorize_local_tools_access
      - revoke_local_tools_access
      - request_local_tools_approval_mode
      - create_service_api_key
      - revoke_enterprise_api_key
      - create_gitlab_integration
      - update_gitlab_integration
      - reconnect_gitlab_integration
      - delete_gitlab_integration
      - create_perforce_integration
      - update_perforce_integration
      - delete_perforce_integration
      - create_gitlab_app_config
      - delete_gitlab_app_config
      - create_bitbucket_app_config
      - delete_bitbucket_app_config
      - install_gitlab_webhook
      - create_azure_devops_integration
      - reconnect_azure_devops_integration
      - delete_azure_devops_integration
      - create_tracker_connection
      - update_tracker_connection
      - rotate_tracker_connection_token
      - delete_tracker_connection
      - link_work_item
      - unlink_work_item
      - remove_repo_from_devin
      - update_enterprise_hypervisor_settings
      - update_enterprise_settings
      - update_commit_signing_mode
      - update_commit_email
      - update_webhook_ip_access_list
      - update_git_manager_outpost_ip_access_list
      - update_org_settings
      - update_code_snippet_telemetry
      - update_local_controls
      - update_local_enterprise_config
      - update_local_org_config
      - ai_guardrail_violation
      - update_ai_guardrail
      - approve_deploy
      - approve_test_app
      - permission_response
      - search_query
      - create_org_api_key
      - create_user_api_key
      - view_org_api_key
      - view_user_api_key
      - create_secret
      - update_secret
      - delete_secret
      - create_playbook
      - update_playbook
      - delete_playbook
      - create_billing_tag
      - add_billing_tag_member
      - assign_billing_tag_session
      - enable_persona
      - disable_persona
      - delete_persona
      - start_repo_setup
      - delete_repo_setup
      - finish_repo_setup
      - github_integration_deleted
      - create_github_integration
      - update_github_owned_public_repos_in_automations
      - delete_github_integration
      - refresh_github_integration
      - create_bitbucket_integration
      - update_bitbucket_integration
      - delete_bitbucket_integration
      - create_gerrit_integration
      - delete_gerrit_integration
      - mcp_server_install
      - mcp_server_update
      - mcp_server_enable
      - mcp_server_disable
      - mcp_server_delete
      - mcp_server_secret_link
      - mcp_server_secret_unlink
      - link_jira_agent_installation
      - unlink_jira_agent_installation
      - mcp_server_credential_set
      - mcp_server_credential_delete
      - mcp_server_oauth_initiate
      - mcp_server_oauth_tokens_granted
      - mcp_server_oauth_tokens_revoked
      - mcp_enterprise_server_targets_update
      - mcp_enterprise_server_credential_set
      - mcp_enterprise_server_credential_delete
      - customer_network_ca_bundle_set
      - customer_network_ca_bundle_delete
      - create_mcp_validation_session
      - mcp_server_tools_list_secrets_resolved
      - mcp_server_connect_secrets_resolved
      - set_account_managed_plugins
      - set_org_managed_plugins
      - set_user_managed_plugins
      - set_managed_plugin_bundle
      - delete_managed_plugin_bundle
      - secure_mode_profile_created
      - secure_mode_profile_updated
      - secure_mode_profile_deleted
      - secure_mode_binding_created
      - secure_mode_binding_updated
      - secure_mode_binding_deleted
      - create_service_user
      - update_service_user
      - delete_service_user
      - assign_service_user_role
      - remove_service_user_role
      - enable_service_user_for_automations
      - disable_service_user_for_automations
      - set_default_automation_service_user
      - create_git_permission
      - delete_git_permission
      - update_git_permission
      - update_provider_sync_policy
      - create_provider_sync_purge_preview
      - purge_provider_sync_human_access
      - git_pr_author_collaborator
      - git_pr_author_collaborator_denied
      - git_pr_merge
      - git_pr_merge_denied
      - create_maintenance_task
      - update_maintenance_task
      - delete_maintenance_task
      - create_snapshot_script
      - schedule_snapshot_script
      - execute_snapshot_script
      - update_repo_setup_steering_knowledge
      - delete_repo_setup_steering_knowledge
      - set_org_group_limits
      - create_join_request
      - approve_join_request
      - automatic_join_event
      - reject_join_request
      - create_seat_request
      - approve_seat_request
      - decline_seat_request
      - create_service_user_api_key
      - revoke_service_user_api_key
      - rotate_service_user_api_key
      - create_pat
      - revoke_pat
      - rotate_pat
      - update_pat_policy
      - bulk_revoke_pats
      - policy_revoke_pat
      - create_pat_request
      - approve_pat_request
      - deny_pat_request
      - cancel_pat_request
      - complete_pat_request
      - create_blueprint
      - create_blueprint_version
      - rollback_blueprint_version
      - delete_blueprint
      - reorder_blueprints
      - create_enterprise_blueprint
      - create_enterprise_blueprint_version
      - rollback_enterprise_blueprint_version
      - delete_enterprise_blueprint
      - accept_skill_pr
      - trigger_blueprint_build
      - cancel_blueprint_build
      - create_environment
      - update_environment
      - delete_environment
      - upload_blueprint_file
      - delete_blueprint_file
      - sync_repo_blueprints
      - detach_blueprint_from_git
      - create_blueprint_pr
      - update_blueprint_settings
      - pin_build
      - unpin_build
      - delete_build
      - trigger_automation
      - create_automation
      - update_automation
      - delete_automation
      - reset_automation_monitor
      - update_automation_scratch
      - regenerate_automation_webhook_secret
      - automation_target_write_approver
      - automation_target_write_approver_denied
      - acknowledge_session_hard_cap
      - create_audit_log_export
      - update_audit_log_export
      - delete_audit_log_export
      - start_code_scan
      - switch_code_scan_profile
      - create_code_scan_profile
      - update_code_scan_profile
      - update_code_scan_effort
      - update_code_scan_finding_status
      - import_code_scan
      - update_code_scan_platform
      - rehost_code_scan
      - create_outpost_pool
      - update_outpost_pool
      - delete_outpost_pool
      - claim_outpost_session
      - release_outpost_session
      - create_gateway
      - regenerate_gateway_token
      - update_gateway_hostnames
      - update_gateway_dial_address
      - delete_gateway
      - update_review_comment_language
      - report_pr_review_triage
      - create_review_trigger
      - update_review_trigger
      - delete_review_trigger
      - create_review_profile
      - update_review_profile
      - create_federated_identity_provider
      - update_federated_identity_provider
      - delete_federated_identity_provider
      - create_federated_credential
      - revoke_federated_credential
      - update_service_user_key_policy
      - exchange_federated_token
      title: AuditLogAction
      type: string
    AuditLogResponse:
      properties:
        action:
          $ref: '#/components/schemas/AuditLogAction'
        audit_log_id:
          title: Audit Log Id
          type: string
        created_at:
          title: Created At
          type: integer
        data:
          additionalProperties: true
          title: Data
          type: object
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        service_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Service User Id
        service_user_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Service User Name
        user_email:
          anyOf:
          - type: string
          - type: 'null'
          title: User Email
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - audit_log_id
      - action
      - created_at
      - org_id
      - user_id
      - user_email
      - service_user_id
      - service_user_name
      - data
      title: AuditLogResponse
      type: object
    AutoScanScheduleCreateRequest:
      description: Request to create a scan's recurring auto-scan schedule.
      properties:
        effort:
          anyOf:
          - enum:
            - normal
            - deep
            type: string
          - type: 'null'
          description: 'Effort to apply to future incremental runs of the scan, including
            the scheduled ones: ''normal'' or ''deep''. Omit to keep the scan''s current
            effort. Rejected with 409 while a scan run is active.'
          title: Effort
        enabled:
          default: true
          description: Whether the schedule starts enabled.
          title: Enabled
          type: boolean
        rrule:
          description: iCal RRULE string (e.g. "FREQ=DAILY") driving the schedule
            on which new commits are scanned.
          minLength: 1
          title: Rrule
          type: string
      required:
      - rrule
      title: AutoScanScheduleCreateRequest
      type: object
    AutoScanScheduleResponse:
      description: The recurring auto-scan schedule configured for a code scan.
      properties:
        automation_id:
          description: ID of the automation backing the schedule.
          title: Automation Id
          type: string
        enabled:
          description: Whether the schedule is enabled.
          title: Enabled
          type: boolean
        rrule:
          description: iCal RRULE string driving the schedule.
          title: Rrule
          type: string
        scan_id:
          description: The scan the schedule belongs to.
          title: Scan Id
          type: string
      required:
      - scan_id
      - automation_id
      - rrule
      - enabled
      title: AutoScanScheduleResponse
      type: object
    AutomationCodeScanFindingRemediation:
      additionalProperties: false
      description: Assign Devin to findings of the scans this action starts.
      properties:
        max_findings_per_scan:
          anyOf:
          - minimum: 1.0
            type: integer
          - type: 'null'
          description: Most findings remediated per scan; defaults to 50.
          title: Max Findings Per Scan
        severities:
          description: Finding severities to remediate.
          items:
            enum:
            - critical
            - high
            - medium
            - low
            type: string
          minItems: 1
          title: Severities
          type: array
      title: AutomationCodeScanFindingRemediation
      type: object
    AutomationCodeScanRepo:
      additionalProperties: false
      properties:
        host:
          anyOf:
          - type: string
          - type: 'null'
          title: Host
        repo_name:
          description: Repository (owner/name).
          title: Repo Name
          type: string
      required:
      - repo_name
      title: AutomationCodeScanRepo
      type: object
    AutomationComparisonCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - eq
          - neq
          title: Operator
          type: string
        value:
          anyOf:
          - type: string
          - type: integer
          - type: number
          - type: boolean
          title: Value
      required:
      - field
      - operator
      - value
      title: AutomationComparisonCondition
      type: object
    AutomationConcurrency:
      additionalProperties: false
      properties:
        max_concurrent_runs:
          anyOf:
          - minimum: 1.0
            type: integer
          - type: 'null'
          description: Maximum in-flight runs for this automation; further triggered
            events wait in its queue. A run stops counting toward the limit once its
            session finishes and is awaiting further instructions, not only when the
            session stops. null = unlimited.
          title: Max Concurrent Runs
        max_queue_depth:
          anyOf:
          - minimum: 0.0
            type: integer
          - type: 'null'
          description: Maximum triggered events waiting in the automation's queue
            to run; events beyond this are dropped. Requires max_concurrent_runs to
            be set. null = unlimited.
          title: Max Queue Depth
      title: AutomationConcurrency
      type: object
    AutomationConditionGroup:
      additionalProperties: false
      properties:
        all:
          description: 'AND: every condition in the group must match.'
          items:
            discriminator:
              mapping:
                between: '#/components/schemas/AutomationRangeCondition'
                contains: '#/components/schemas/AutomationStringCondition'
                ends_with: '#/components/schemas/AutomationStringCondition'
                eq: '#/components/schemas/AutomationComparisonCondition'
                globs: '#/components/schemas/AutomationGlobCondition'
                gt: '#/components/schemas/AutomationNumericCondition'
                gte: '#/components/schemas/AutomationNumericCondition'
                in: '#/components/schemas/AutomationListCondition'
                is_empty: '#/components/schemas/AutomationEmptyCondition'
                is_not_empty: '#/components/schemas/AutomationEmptyCondition'
                lt: '#/components/schemas/AutomationNumericCondition'
                lte: '#/components/schemas/AutomationNumericCondition'
                matches: '#/components/schemas/AutomationMatchCondition'
                neq: '#/components/schemas/AutomationComparisonCondition'
                not_contains: '#/components/schemas/AutomationStringCondition'
                not_ends_with: '#/components/schemas/AutomationStringCondition'
                not_globs: '#/components/schemas/AutomationGlobCondition'
                not_in: '#/components/schemas/AutomationListCondition'
                not_matches: '#/components/schemas/AutomationMatchCondition'
                not_starts_with: '#/components/schemas/AutomationStringCondition'
                recurrence: '#/components/schemas/AutomationRecurrenceCondition'
                starts_with: '#/components/schemas/AutomationStringCondition'
              propertyName: operator
            oneOf:
            - $ref: '#/components/schemas/AutomationComparisonCondition'
            - $ref: '#/components/schemas/AutomationStringCondition'
            - $ref: '#/components/schemas/AutomationNumericCondition'
            - $ref: '#/components/schemas/AutomationEmptyCondition'
            - $ref: '#/components/schemas/AutomationRangeCondition'
            - $ref: '#/components/schemas/AutomationListCondition'
            - $ref: '#/components/schemas/AutomationMatchCondition'
            - $ref: '#/components/schemas/AutomationRecurrenceCondition'
            - $ref: '#/components/schemas/AutomationGlobCondition'
          title: All
          type: array
      required:
      - all
      title: AutomationConditionGroup
      type: object
    AutomationConditions-Input:
      additionalProperties: false
      properties:
        any:
          description: OR of AND-groups (fixed two-level DNF).
          items:
            $ref: '#/components/schemas/AutomationConditionGroup'
          title: Any
          type: array
      required:
      - any
      title: AutomationConditions
      type: object
    AutomationConditions-Output:
      additionalProperties: false
      properties:
        any:
          description: OR of AND-groups (fixed two-level DNF).
          items:
            $ref: '#/components/schemas/AutomationConditionGroup'
          title: Any
          type: array
      required:
      - any
      title: AutomationConditions
      type: object
    AutomationCreateRequest:
      additionalProperties: false
      properties:
        actions:
          description: 'Non-empty. Caps: at most one start_session; monitor_session
            must be the only action.'
          items:
            discriminator:
              mapping:
                message_session: '#/components/schemas/AutomationMessageSessionAction'
                monitor_session: '#/components/schemas/AutomationMonitorSessionAction'
                start_session: '#/components/schemas/AutomationStartSessionAction-Input'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/AutomationStartSessionAction-Input'
            - $ref: '#/components/schemas/AutomationMessageSessionAction'
            - $ref: '#/components/schemas/AutomationMonitorSessionAction'
          title: Actions
          type: array
        concurrency:
          anyOf:
          - $ref: '#/components/schemas/AutomationConcurrency'
          - type: 'null'
        enabled:
          default: true
          title: Enabled
          type: boolean
        limits:
          anyOf:
          - $ref: '#/components/schemas/AutomationLimits'
          - type: 'null'
        metadata:
          additionalProperties:
            type: string
          default: {}
          description: Org-visible key/value labels for organizing/filtering automations.
            At most 16 pairs; keys at most 32 chars; values at most 128.
          title: Metadata
          type: object
        name:
          maxLength: 500
          minLength: 1
          title: Name
          type: string
        notifications:
          anyOf:
          - $ref: '#/components/schemas/AutomationNotifications'
          - type: 'null'
        run_as:
          description: 'Required: explicitly choose the identity spawned sessions
            run under (organization, creator, or service_user).'
          discriminator:
            mapping:
              creator: '#/components/schemas/AutomationRunAsCreator'
              organization: '#/components/schemas/AutomationRunAsOrganization'
              service_user: '#/components/schemas/AutomationRunAsServiceUser'
            propertyName: type
          oneOf:
          - $ref: '#/components/schemas/AutomationRunAsOrganization'
          - $ref: '#/components/schemas/AutomationRunAsCreator'
          - $ref: '#/components/schemas/AutomationRunAsServiceUser'
          title: Run As
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/AutomationSecurityProfileSelection'
          - type: 'null'
          description: The automation's own security-profile binding; omitted = inherit
            from the org/enterprise. Requires the security-profile management permission.
        session_settings:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionSettings-Input'
          - type: 'null'
          description: Applied to sessions this automation spawns.
        slack_reply_access:
          default: slack_users
          description: 'Who may reply into existing sessions from Slack threads: devin_users
            (linked Devin accounts only), slack_users (anyone in the organization''s
            connected Slack workspaces), or external_slack_users (also Slack Connect
            users). Does not affect who can trigger the automation.'
          enum:
          - devin_users
          - slack_users
          - external_slack_users
          title: Slack Reply Access
          type: string
        teams_reply_access:
          default: teams_users
          description: 'Who may reply into existing sessions from Microsoft Teams
            threads: devin_users (linked Devin accounts only) or teams_users (anyone
            in the organization''s connected Microsoft tenant; the default). Does
            not affect who can trigger the automation.'
          enum:
          - devin_users
          - teams_users
          title: Teams Reply Access
          type: string
        template_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Create-only provenance marker; resolve ids via the templates
            endpoint. When set and tools.mcp_servers is omitted, the template's required_mcps
            apply.
          title: Template Id
        tools:
          anyOf:
          - $ref: '#/components/schemas/AutomationTools'
          - type: 'null'
        triggers:
          description: Fires when any trigger matches; once per event. At most one
            webhook:incoming trigger.
          items:
            $ref: '#/components/schemas/AutomationTriggerRequest-Input'
          title: Triggers
          type: array
      required:
      - name
      - triggers
      - actions
      - run_as
      title: AutomationCreateRequest
      type: object
    AutomationEmailNotification:
      additionalProperties: false
      properties:
        recipients:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: null = the automation creator; required for service-user-created
            automations.
          title: Recipients
        when:
          enum:
          - always
          - dispatch_failed
          - dispatch_succeeded
          title: When
          type: string
      required:
      - when
      title: AutomationEmailNotification
      type: object
    AutomationEmptyCondition:
      additionalProperties: false
      description: 'Unary operator: matches on the field''s emptiness; `value` carries
        no data.'
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - is_empty
          - is_not_empty
          title: Operator
          type: string
        value:
          title: Value
          type: 'null'
      required:
      - field
      - operator
      title: AutomationEmptyCondition
      type: object
    AutomationEventSchemaResponse:
      additionalProperties: false
      properties:
        category:
          title: Category
          type: string
        event_type:
          title: Event Type
          type: string
        fields:
          additionalProperties:
            $ref: '#/components/schemas/AutomationSchemaFieldDef'
          description: "Condition field path \u2192 field definition (type, label,\
            \ required, options, ...)."
          title: Fields
          type: object
        name:
          title: Name
          type: string
        supported_replies:
          description: Valid replies[].type verbs for this event type.
          items:
            type: string
          title: Supported Replies
          type: array
      required:
      - event_type
      - name
      - category
      - supported_replies
      - fields
      title: AutomationEventSchemaResponse
      type: object
    AutomationGlobCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - globs
          - not_globs
          title: Operator
          type: string
        value:
          description: Glob patterns; any changed path matches (github:push, gitlab:push).
          items:
            type: string
          title: Value
          type: array
      required:
      - field
      - operator
      - value
      title: AutomationGlobCondition
      type: object
    AutomationHostnameDestination:
      additionalProperties: false
      properties:
        hostname:
          title: Hostname
          type: string
      required:
      - hostname
      title: AutomationHostnameDestination
      type: object
    AutomationInvocationLimits:
      additionalProperties: false
      properties:
        max_per_window:
          minimum: 1.0
          title: Max Per Window
          type: integer
        window_seconds:
          minimum: 60.0
          title: Window Seconds
          type: integer
      required:
      - max_per_window
      - window_seconds
      title: AutomationInvocationLimits
      type: object
    AutomationIpv4Destination:
      additionalProperties: false
      properties:
        ipv4:
          title: Ipv4
          type: string
      required:
      - ipv4
      title: AutomationIpv4Destination
      type: object
    AutomationIpv6Destination:
      additionalProperties: false
      properties:
        ipv6:
          title: Ipv6
          type: string
      required:
      - ipv6
      title: AutomationIpv6Destination
      type: object
    AutomationLastInvocation:
      additionalProperties: false
      properties:
        fired_at:
          title: Fired At
          type: integer
        status:
          description: "succeeded | failed | skipped \u2014 open enum, clients must\
            \ tolerate new values."
          title: Status
          type: string
      required:
      - fired_at
      - status
      title: AutomationLastInvocation
      type: object
    AutomationLimits:
      additionalProperties: false
      properties:
        invocations:
          anyOf:
          - $ref: '#/components/schemas/AutomationInvocationLimits'
          - type: 'null'
          description: Rate-limits the automation's own firing.
        max_acu_limit:
          anyOf:
          - maximum: 1000.0
            minimum: 1.0
            type: integer
          - type: 'null'
          description: Per spawned session (same name as the sessions API).
          title: Max Acu Limit
      title: AutomationLimits
      type: object
    AutomationListCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - in
          - not_in
          title: Operator
          type: string
        value:
          items:
            type: string
          title: Value
          type: array
      required:
      - field
      - operator
      - value
      title: AutomationListCondition
      type: object
    AutomationLlmCheckRequest:
      additionalProperties: false
      description: 'The automation''s LLM check configuration. On update the filter
        prompt is

        replaced; ``enabled`` alone may be omitted to keep its state.'
      properties:
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Whether the check gates the automation's runs. Omitted keeps
            the current state; a new configuration starts enabled.
          title: Enabled
        filter_prompt:
          description: Plain-language description of which trigger events should run
            the automation. Events that do not match it are skipped.
          maxLength: 4000
          minLength: 1
          title: Filter Prompt
          type: string
      required:
      - filter_prompt
      title: AutomationLlmCheckRequest
      type: object
    AutomationMatchCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - matches
          - not_matches
          title: Operator
          type: string
        value:
          description: Regular expression.
          title: Value
          type: string
      required:
      - field
      - operator
      - value
      title: AutomationMatchCondition
      type: object
    AutomationMessageSessionAction:
      additionalProperties: false
      properties:
        auto_create:
          default: false
          description: When true, the first trigger creates a new long-running session
            owned by the automation and subsequent triggers message it.
          title: Auto Create
          type: boolean
        prompt:
          description: The triggering event's payload is appended automatically.
          title: Prompt
          type: string
        target_devin_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Must belong to the org; editing an automation containing this
            action requires write access to the target session (enable/disable-only
            edits exempt). Required unless auto_create is true, in which case it is
            set server-side once the first trigger creates the session; client-supplied
            values are ignored.
          title: Target Devin Id
        type:
          const: message_session
          default: message_session
          title: Type
          type: string
      required:
      - prompt
      title: AutomationMessageSessionAction
      type: object
    AutomationMessageSessionActionUpdate:
      additionalProperties: false
      properties:
        auto_create:
          default: false
          description: When true, the first trigger creates a new long-running session
            owned by the automation and subsequent triggers message it.
          title: Auto Create
          type: boolean
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          description: The triggering event's payload is appended automatically. Required
            when creating or adding this action; on a merge-semantics update, omit
            it to keep the stored value (null is invalid).
          title: Prompt
        target_devin_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Must belong to the org; editing an automation containing this
            action requires write access to the target session (enable/disable-only
            edits exempt). Required unless auto_create is true, in which case it is
            set server-side once the first trigger creates the session; client-supplied
            values are ignored.
          title: Target Devin Id
        type:
          const: message_session
          default: message_session
          title: Type
          type: string
      title: AutomationMessageSessionActionUpdate
      type: object
    AutomationMonitorSessionAction:
      additionalProperties: false
      properties:
        setup_prompt:
          description: Injected into the session's system prompt. Same reference-token
            grammar as prompt.
          title: Setup Prompt
          type: string
        slack_monitor_config:
          $ref: '#/components/schemas/AutomationSlackMonitorConfig'
          description: Requires exactly one slack:message trigger on the same channel.
        type:
          const: monitor_session
          default: monitor_session
          title: Type
          type: string
      required:
      - setup_prompt
      - slack_monitor_config
      title: AutomationMonitorSessionAction
      type: object
    AutomationMonitorSessionActionUpdate:
      additionalProperties: false
      properties:
        setup_prompt:
          anyOf:
          - type: string
          - type: 'null'
          description: Injected into the session's system prompt. Same reference-token
            grammar as prompt. Required when creating or adding this action; on a
            merge-semantics update, omit it to keep the stored value (null is invalid).
          title: Setup Prompt
        slack_monitor_config:
          anyOf:
          - $ref: '#/components/schemas/AutomationSlackMonitorConfig'
          - type: 'null'
          description: Requires exactly one slack:message trigger on the same channel.
            Required when creating or adding this action; on a merge-semantics update,
            omit it to keep the stored value (null is invalid).
        type:
          const: monitor_session
          default: monitor_session
          title: Type
          type: string
      title: AutomationMonitorSessionActionUpdate
      type: object
    AutomationNetPolicy:
      additionalProperties: false
      properties:
        allow:
          items:
            anyOf:
            - $ref: '#/components/schemas/AutomationHostnameDestination'
            - $ref: '#/components/schemas/AutomationIpv4Destination'
            - $ref: '#/components/schemas/AutomationIpv6Destination'
          title: Allow
          type: array
      required:
      - allow
      title: AutomationNetPolicy
      type: object
    AutomationNotifications:
      additionalProperties: false
      properties:
        email:
          anyOf:
          - $ref: '#/components/schemas/AutomationEmailNotification'
          - type: 'null'
        slack:
          anyOf:
          - $ref: '#/components/schemas/AutomationSlackNotification'
          - type: 'null'
      title: AutomationNotifications
      type: object
    AutomationNumericCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - gt
          - lt
          - gte
          - lte
          title: Operator
          type: string
        value:
          anyOf:
          - type: integer
          - type: number
          title: Value
      required:
      - field
      - operator
      - value
      title: AutomationNumericCondition
      type: object
    AutomationPreflightRequest:
      additionalProperties: false
      description: 'The automation''s Preflight check configuration. On update the
        whole

        group is replaced; ``enabled`` alone may be omitted to keep its state.'
      properties:
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Whether the script gates the automation's runs. Omitted keeps
            the current state; a new configuration starts enabled.
          title: Enabled
        runtime:
          description: 'Script runtime. One of: python, node, bash.'
          title: Runtime
          type: string
        secret_names:
          description: Org secrets exposed to the script as environment variables.
            Requires the manage-org-secrets permission whenever non-empty.
          items:
            type: string
          title: Secret Names
          type: array
        source:
          description: 'The script source (at most 256KB). It reads the trigger event
            from $EVENT_FILE, may read/write a small JSON object at $STATE_FILE that
            persists across runs, and must write its decision to $OUTPUT_FILE: {"run":
            true}, {"run": false, "reason": "..."}, or {"items": [...]} (one action
            run per item).'
          minLength: 1
          title: Source
          type: string
        timeout_seconds:
          default: 60
          description: Wall-clock limit for one run; a run past it fails closed (no
            actions start).
          maximum: 300.0
          minimum: 1.0
          title: Timeout Seconds
          type: integer
      required:
      - runtime
      - source
      title: AutomationPreflightRequest
      type: object
    AutomationRangeCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          const: between
          title: Operator
          type: string
        value:
          description: Inclusive [low, high] range.
          maxItems: 2
          minItems: 2
          prefixItems:
          - anyOf:
            - type: integer
            - type: number
          - anyOf:
            - type: integer
            - type: number
          title: Value
          type: array
      required:
      - field
      - operator
      - value
      title: AutomationRangeCondition
      type: object
    AutomationReadinessScanAction:
      additionalProperties: false
      description: Run an Agent Readiness assessment of the repository.
      properties:
        devin_mode:
          anyOf:
          - type: string
          - type: 'null'
          title: Devin Mode
        max_scopes:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Scopes
        repo_name:
          title: Repo Name
          type: string
        type:
          const: readiness_scan
          default: readiness_scan
          title: Type
          type: string
      required:
      - repo_name
      title: AutomationReadinessScanAction
      type: object
    AutomationRecurrenceCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          const: recurrence
          title: Operator
          type: string
        value:
          description: iCalendar RRULE for schedule:recurring's rrule field, e.g.
            FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0
          title: Value
          type: string
      required:
      - field
      - operator
      - value
      title: AutomationRecurrenceCondition
      type: object
    AutomationRemediateFindingAction:
      additionalProperties: false
      description: 'Launch the built-in remediation session for the triggering code-scan

        finding. Fully determined by the ``code_scan:finding`` event, so it carries

        no configuration.'
      properties:
        type:
          const: remediate_finding
          default: remediate_finding
          title: Type
          type: string
      title: AutomationRemediateFindingAction
      type: object
    AutomationReply:
      additionalProperties: false
      properties:
        type:
          description: 'notify_thread: dispatch-time one-way ''session started'' breadcrumb
            in the triggering thread (Slack triggers). attach_thread: dispatch-time
            two-way binding to the triggering thread (Slack triggers). post_response:
            deliver the agent''s response to the triggering context.'
          enum:
          - notify_thread
          - attach_thread
          - post_response
          title: Type
          type: string
      required:
      - type
      title: AutomationReply
      type: object
    AutomationResponse:
      additionalProperties: false
      properties:
        actions:
          items:
            discriminator:
              mapping:
                message_session: '#/components/schemas/AutomationMessageSessionAction'
                monitor_session: '#/components/schemas/AutomationMonitorSessionAction'
                start_session: '#/components/schemas/AutomationStartSessionAction-Output'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/AutomationStartSessionAction-Output'
            - $ref: '#/components/schemas/AutomationMessageSessionAction'
            - $ref: '#/components/schemas/AutomationMonitorSessionAction'
          title: Actions
          type: array
        automation_id:
          title: Automation Id
          type: string
        concurrency:
          anyOf:
          - $ref: '#/components/schemas/AutomationConcurrency'
          - type: 'null'
        created_at:
          title: Created At
          type: integer
        created_by:
          $ref: '#/components/schemas/ActorResponse'
        enabled:
          title: Enabled
          type: boolean
        last_edited_by:
          anyOf:
          - $ref: '#/components/schemas/ActorResponse'
          - type: 'null'
        last_invocation:
          anyOf:
          - $ref: '#/components/schemas/AutomationLastInvocation'
          - type: 'null'
        limits:
          anyOf:
          - $ref: '#/components/schemas/AutomationLimits'
          - type: 'null'
        metadata:
          additionalProperties:
            type: string
          default: {}
          title: Metadata
          type: object
        name:
          title: Name
          type: string
        next_run_at:
          anyOf:
          - type: integer
          - type: 'null'
          description: When the automation's schedule triggers next fire. null when
            it has no schedule trigger, is disabled, or every schedule has passed
            its end date.
          title: Next Run At
        notifications:
          anyOf:
          - $ref: '#/components/schemas/AutomationNotifications'
          - type: 'null'
        run_as:
          description: "Identity the spawned sessions run under. organization: the\
            \ org's automation identity. When the organization has a default service\
            \ user for automations, sessions run as that service user and the response\
            \ returns run_as service_user with its id; saving requires every permission\
            \ that service user holds. Otherwise it is the System User in the app\
            \ \u2014 sessions use system permissions, so MCP servers installed with\
            \ a personal (user-scoped) connection cannot be selected, and switching\
            \ an automation to organization removes them from its selection. creator:\
            \ personal automation \u2014 runs with the creator's own permissions and\
            \ is visible only to the creator and org admins; rejected for service-user-created\
            \ automations. service_user: runs as the given service user, with its\
            \ roles, grants and ACU limits; requires permission to manage that service\
            \ user. Required on create; null on update resets to organization."
          discriminator:
            mapping:
              creator: '#/components/schemas/AutomationRunAsCreator'
              organization: '#/components/schemas/AutomationRunAsOrganization'
              service_user: '#/components/schemas/AutomationRunAsServiceUser'
            propertyName: type
          oneOf:
          - $ref: '#/components/schemas/AutomationRunAsOrganization'
          - $ref: '#/components/schemas/AutomationRunAsCreator'
          - $ref: '#/components/schemas/AutomationRunAsServiceUser'
          title: Run As
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/AutomationSecurityProfileResponse'
          - type: 'null'
          description: The automation's security-profile binding and the resolved
            governing profiles. null when security profiles are not enabled for the
            organization.
        session_settings:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionSettings-Output'
          - type: 'null'
        slack_reply_access:
          default: slack_users
          description: 'Who may reply into existing sessions from Slack threads: devin_users
            (linked Devin accounts only), slack_users (anyone in the organization''s
            connected Slack workspaces), or external_slack_users (also Slack Connect
            users). Does not affect who can trigger the automation.'
          enum:
          - devin_users
          - slack_users
          - external_slack_users
          title: Slack Reply Access
          type: string
        teams_reply_access:
          default: teams_users
          description: 'Who may reply into existing sessions from Microsoft Teams
            threads: devin_users (linked Devin accounts only) or teams_users (anyone
            in the organization''s connected Microsoft tenant; the default). Does
            not affect who can trigger the automation.'
          enum:
          - devin_users
          - teams_users
          title: Teams Reply Access
          type: string
        template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Id
        tools:
          anyOf:
          - $ref: '#/components/schemas/AutomationTools'
          - type: 'null'
        triggers:
          items:
            $ref: '#/components/schemas/AutomationTriggerResponse'
          title: Triggers
          type: array
        updated_at:
          title: Updated At
          type: integer
      required:
      - automation_id
      - name
      - enabled
      - triggers
      - actions
      - created_by
      - created_at
      - updated_at
      title: AutomationResponse
      type: object
    AutomationRunAsCreator:
      additionalProperties: false
      properties:
        type:
          const: creator
          default: creator
          title: Type
          type: string
      title: AutomationRunAsCreator
      type: object
    AutomationRunAsOrganization:
      additionalProperties: false
      properties:
        type:
          const: organization
          default: organization
          title: Type
          type: string
      title: AutomationRunAsOrganization
      type: object
    AutomationRunAsServiceUser:
      additionalProperties: false
      properties:
        service_user_id:
          title: Service User Id
          type: string
        type:
          const: service_user
          default: service_user
          title: Type
          type: string
      required:
      - service_user_id
      title: AutomationRunAsServiceUser
      type: object
    AutomationScanNewCommitsAction:
      additionalProperties: false
      properties:
        scan_id:
          description: The finished code scan to extend with newly landed commits.
          title: Scan Id
          type: string
        type:
          const: scan_new_commits
          default: scan_new_commits
          title: Type
          type: string
      required:
      - scan_id
      title: AutomationScanNewCommitsAction
      type: object
    AutomationScanNewCommitsActionUpdate:
      additionalProperties: false
      properties:
        scan_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The finished code scan to extend with newly landed commits.
            Required when creating or adding this action; on a merge-semantics update,
            omit it to keep the stored value (null is invalid).
          title: Scan Id
        type:
          const: scan_new_commits
          default: scan_new_commits
          title: Type
          type: string
      title: AutomationScanNewCommitsActionUpdate
      type: object
    AutomationSchemaFieldDef:
      additionalProperties: false
      description: 'Flattened view of a condition field definition.


        Kind-specific attributes (``options``, ``min``/``max``/``unit``,

        ``granularity``, ``placeholder``) are populated only for the relevant

        ``type``.'
      properties:
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        fixed:
          default: false
          title: Fixed
          type: boolean
        granularity:
          anyOf:
          - enum:
            - date
            - datetime
            type: string
          - type: 'null'
          title: Granularity
        label:
          title: Label
          type: string
        max:
          anyOf:
          - type: number
          - type: 'null'
          title: Max
        min:
          anyOf:
          - type: number
          - type: 'null'
          title: Min
        multiple:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Multiple
        options:
          anyOf:
          - items:
              $ref: '#/components/schemas/AutomationSchemaSelectOption'
            type: array
          - type: 'null'
          title: Options
        placeholder:
          anyOf:
          - type: string
          - type: 'null'
          title: Placeholder
        required:
          default: false
          title: Required
          type: boolean
        type:
          enum:
          - string
          - number
          - boolean
          - date
          - select
          - rrule
          - slack_channel
          - linear_team
          - incident_io_team
          - incident_io_severity
          - incident_io_status
          - incident_io_incident_type
          - pagerduty_service
          - pagerduty_team
          - pagerduty_priority
          - github_repo
          - gitlab_repo
          - azure_devops_repo
          - bitbucket_data_center_repo
          - linear_label
          - linear_state
          - linear_assignee
          - linear_project
          - jira_project
          - jira_label
          - jira_status
          - jira_assignee
          - jira_epic
          - slack_user
          - slack_reaction
          - slack_usergroup
          - pylon_tag
          - pylon_status
          - teams_team
          - teams_channel
          - file_paths
          title: Type
          type: string
        unit:
          anyOf:
          - type: string
          - type: 'null'
          title: Unit
      required:
      - type
      - label
      title: AutomationSchemaFieldDef
      type: object
    AutomationSchemaSelectOption:
      additionalProperties: false
      properties:
        label:
          title: Label
          type: string
        value:
          title: Value
          type: string
      required:
      - value
      - label
      title: AutomationSchemaSelectOption
      type: object
    AutomationSchemasResponse:
      additionalProperties: false
      properties:
        available_devin_modes:
          description: 'Modes session_settings.devin_mode accepts for a new selection
            right now, as the organization''s automation identity: the stable modes
            it can spawn plus, when the organization''s preview rollout allows, the
            research previews. A stored mode outside this list is preserved by edits
            that do not change it.'
          items:
            enum:
            - normal
            - fast
            - lite
            - ultra
            - fusion
            - swe-2-medium
            - swe-2-high
            - swe-2-max
            type: string
          title: Available Devin Modes
          type: array
        default_fallback_devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - lite
            - ultra
            - fusion
            type: string
          - type: 'null'
          description: 'Stable mode to prefill session_settings.fallback_devin_mode
            with when a research preview is selected: the organization''s default
            mode when it is stable and available, else the first available stable
            mode; null when none is available.'
          title: Default Fallback Devin Mode
        default_net_policy:
          anyOf:
          - $ref: '#/components/schemas/AutomationNetPolicy'
          - type: 'null'
          description: 'Network policy clients should start new automations from:
            the deployment''s Git Manager-only policy (add only the destinations the
            task requires), or null when the governing security profile (see security_profile)
            has a network policy. In that case sessions use the profile''s policy;
            omit session_settings.net_policy unless the task must restrict further.'
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/AutomationSchemasSecurityProfile'
          - type: 'null'
          description: Security profile governing this organization's automation sessions,
            or null when none applies.
        sources:
          additionalProperties:
            additionalProperties:
              $ref: '#/components/schemas/AutomationEventSchemaResponse'
            type: object
          description: "Event source \u2192 event name \u2192 schema."
          title: Sources
          type: object
        update_semantics:
          description: "PATCH semantics active for this organization: 'replace_groups'\
            \ (a config group present in the request replaces the stored group wholesale)\
            \ or 'merge_patch' (RFC 7396 for objects: omitted members of a present\
            \ group keep their stored values, explicit nulls clear; list membership\
            \ still replaces wholesale \u2014 deletion is resending the list without\
            \ the element \u2014 but each sent element merges onto the stored element\
            \ of the same type when that type appears exactly once on both sides;\
            \ repeated types must be restated fully). Open enum \u2014 clients must\
            \ tolerate new values."
          title: Update Semantics
          type: string
      required:
      - default_net_policy
      - update_semantics
      - sources
      title: AutomationSchemasResponse
      type: object
    AutomationSchemasSecurityProfile:
      additionalProperties: false
      description: 'The security profile that governs this organization''s automation

        sessions (enterprise, organization, or automations default binding).'
      properties:
        governs_network:
          description: Whether the profile has a network policy. When true, sessions
            are already restricted to the profile's destinations and an automation
            needs its own session_settings.net_policy only to restrict further.
          title: Governs Network
          type: boolean
        mcp_servers:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: MCP server slugs the profile allows (the ceiling for tools.mcp_servers),
            or null when the profile does not restrict MCP servers.
          title: Mcp Servers
        name:
          description: Profile name, for display.
          title: Name
          type: string
      required:
      - name
      - governs_network
      - mcp_servers
      title: AutomationSchemasSecurityProfile
      type: object
    AutomationSecurityProfileResponse:
      additionalProperties: false
      properties:
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Profile Id
        selection:
          description: 'The automation''s own binding: inherit (no binding), none
            (explicit opt-out), or profile (pins profile_id). Sessions resolve the
            full enterprise -> org -> automation chain: the automation''s network
            policy only ever narrows the governing profiles'' policies, and an opt-out
            cannot escape a mandatory org/enterprise profile.'
          enum:
          - inherit
          - none
          - profile
          title: Selection
          type: string
        warnings:
          default: []
          description: Non-blocking configuration conflicts, e.g. a recommended MCP
            server whose endpoint hostname the governing profile blocks (spawned sessions
            will not be able to connect to that server). Only remote MCP endpoint
            hostnames are checked; an empty list does not guarantee every MCP or network
            destination will work. Populated on single-automation reads and writes;
            empty in list responses.
          items:
            type: string
          title: Warnings
          type: array
      required:
      - selection
      title: AutomationSecurityProfileResponse
      type: object
    AutomationSecurityProfileSelection:
      additionalProperties: false
      description: The automation's own security-profile binding.
      properties:
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Security profile to bind to this automation. null records an
            explicit opt-out (no profile, even when the org or enterprise has a recommended
            default). Writing this field requires the security-profile management
            permission; an opt-out cannot escape a mandatory org/enterprise profile.
          title: Profile Id
      title: AutomationSecurityProfileSelection
      type: object
    AutomationSessionConfig-Input:
      additionalProperties: false
      properties:
        bypass_approval:
          default: false
          description: Auto-approves child-session creation (the only check this flag
            bypasses); any future bypassable check requires a new field.
          title: Bypass Approval
          type: boolean
        notifications:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionNotificationsConfig'
          - type: 'null'
          description: Session-content notifications (Slack and Microsoft Teams).
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: VM platform for the session. When null, the session uses the
            organization's default platform at invocation time.
          title: Platform
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Read-only: derived from the first @playbook: token in the
            prompt.'
          title: Playbook Id
        repos:
          default: []
          description: 'Read-only: derived from repo tokens in the prompt.'
          items:
            type: string
          title: Repos
          type: array
        tags:
          default: []
          description: Session tags. For tagging-enforced enterprises exactly one
            allowed value is required.
          items:
            type: string
          title: Tags
          type: array
      title: AutomationSessionConfig
      type: object
    AutomationSessionConfig-Output:
      additionalProperties: false
      properties:
        bypass_approval:
          default: false
          description: Auto-approves child-session creation (the only check this flag
            bypasses); any future bypassable check requires a new field.
          title: Bypass Approval
          type: boolean
        notifications:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionNotificationsConfig'
          - type: 'null'
          description: Session-content notifications (Slack and Microsoft Teams).
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: VM platform for the session. When null, the session uses the
            organization's default platform at invocation time.
          title: Platform
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Read-only: derived from the first @playbook: token in the
            prompt.'
          title: Playbook Id
        repos:
          default: []
          description: 'Read-only: derived from repo tokens in the prompt.'
          items:
            type: string
          title: Repos
          type: array
        tags:
          default: []
          description: Session tags. For tagging-enforced enterprises exactly one
            allowed value is required.
          items:
            type: string
          title: Tags
          type: array
      title: AutomationSessionConfig
      type: object
    AutomationSessionNotificationsConfig:
      additionalProperties: false
      description: 'Where the spawned session''s content goes, as opposed to the

        automation-level ``notifications`` group (dispatch-status pings).'
      properties:
        slack:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionSlackConfig'
          - type: 'null'
          description: 'Gives the session a Slack home: two-way for post_updates/forward_thread
            and post_response after its initial delivery binds the thread.'
        teams:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionTeamsConfig'
          - type: 'null'
          description: Posts the session's final response to the Microsoft Teams channel
            as a new top-level post, then binds its thread for replies (available
            for any trigger). Cannot be combined with a slack post_response/post_updates
            home or a post_response reply.
      title: AutomationSessionNotificationsConfig
      type: object
    AutomationSessionSettings-Input:
      additionalProperties: false
      description: 'Applied to every session this automation spawns (including monitor

        sessions).'
      properties:
        devin_mode:
          anyOf:
          - type: string
          - type: 'null'
          description: null = org default. One of normal, fast, lite, ultra, fusion,
            or a research preview the organization can use (see schemas.available_devin_modes).
            Research previews require fallback_devin_mode; a stored preview the organization
            can no longer use stays stored (unrelated edits preserve it) and its sessions
            start on fallback_devin_mode.
          title: Devin Mode
        fallback_devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - lite
            - ultra
            - fusion
            type: string
          - type: 'null'
          description: Stable mode sessions start in when devin_mode is a research
            preview that is unavailable at run time. Required with a preview devin_mode
            (see schemas.default_fallback_devin_mode), rejected with a stable or null
            devin_mode; cleared with devin_mode.
          title: Fallback Devin Mode
        net_policy:
          anyOf:
          - $ref: '#/components/schemas/AutomationNetPolicy'
          - type: 'null'
      title: AutomationSessionSettings
      type: object
    AutomationSessionSettings-Output:
      additionalProperties: false
      description: 'Applied to every session this automation spawns (including monitor

        sessions).'
      properties:
        devin_mode:
          anyOf:
          - type: string
          - type: 'null'
          description: null = org default. One of normal, fast, lite, ultra, fusion,
            or a research preview the organization can use (see schemas.available_devin_modes).
            Research previews require fallback_devin_mode; a stored preview the organization
            can no longer use stays stored (unrelated edits preserve it) and its sessions
            start on fallback_devin_mode.
          title: Devin Mode
        fallback_devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - lite
            - ultra
            - fusion
            type: string
          - type: 'null'
          description: Stable mode sessions start in when devin_mode is a research
            preview that is unavailable at run time. Required with a preview devin_mode
            (see schemas.default_fallback_devin_mode), rejected with a stable or null
            devin_mode; cleared with devin_mode.
          title: Fallback Devin Mode
        net_policy:
          anyOf:
          - $ref: '#/components/schemas/AutomationNetPolicy'
          - type: 'null'
      title: AutomationSessionSettings
      type: object
    AutomationSessionSlackConfig:
      additionalProperties: false
      properties:
        channel_id:
          title: Channel Id
          type: string
        mode:
          description: 'post_updates: the session converses in a thread in the channel
            (available for non-Slack triggers). forward_thread: the same, plus a backlink
            posted in the triggering thread (requires a Slack trigger). post_response:
            the session''s final response is posted to the channel as a top-level
            message, then its thread is bound for replies and follow-up messages (available
            for any trigger).'
          enum:
          - post_updates
          - forward_thread
          - post_response
          title: Mode
          type: string
      required:
      - mode
      - channel_id
      title: AutomationSessionSlackConfig
      type: object
    AutomationSessionTeamsConfig:
      additionalProperties: false
      properties:
        channel_id:
          description: Conversation id of a channel in that team.
          title: Channel Id
          type: string
        team_id:
          description: Entra group id of a team the Devin app is installed in on the
            organization's Microsoft Teams connection.
          title: Team Id
          type: string
      required:
      - team_id
      - channel_id
      title: AutomationSessionTeamsConfig
      type: object
    AutomationSlackChannel:
      additionalProperties: false
      properties:
        channel_id:
          title: Channel Id
          type: string
        team_id:
          title: Team Id
          type: string
      required:
      - team_id
      - channel_id
      title: AutomationSlackChannel
      type: object
    AutomationSlackMonitorConfig:
      additionalProperties: false
      properties:
        source_channel_id:
          title: Source Channel Id
          type: string
        team_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Team Id
      required:
      - source_channel_id
      title: AutomationSlackMonitorConfig
      type: object
    AutomationSlackNotification:
      additionalProperties: false
      properties:
        channel_id:
          title: Channel Id
          type: string
        when:
          enum:
          - always
          - dispatch_failed
          - dispatch_succeeded
          title: When
          type: string
      required:
      - when
      - channel_id
      title: AutomationSlackNotification
      type: object
    AutomationSlackTriageConfig:
      additionalProperties: false
      properties:
        source_channel_id:
          default: ''
          description: Primary Slack channel ID. Omit for a trigger without channel
            restrictions; every condition group must still have a completed filter.
          title: Source Channel Id
          type: string
        team_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Team Id
      title: AutomationSlackTriageConfig
      type: object
    AutomationStartCodeScanAction:
      additionalProperties: false
      description: 'Start a fresh code scan each time the automation fires. ``scan_mode``

        selects ``single`` (one scan of ``repo_name``) or ``multi`` (one scan

        spanning ``repos``).'
      properties:
        code_scan_effort:
          default: deep
          enum:
          - deep
          - lite
          title: Code Scan Effort
          type: string
        finding_remediation:
          anyOf:
          - $ref: '#/components/schemas/AutomationCodeScanFindingRemediation'
          - type: 'null'
        host:
          anyOf:
          - type: string
          - type: 'null'
          title: Host
        interactive:
          default: false
          title: Interactive
          type: boolean
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Profile Id
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Repository to scan (owner/name); single mode.
          title: Repo Name
        repos:
          anyOf:
          - items:
              $ref: '#/components/schemas/AutomationCodeScanRepo'
            type: array
          - type: 'null'
          description: Repositories covered by the one scan; multi mode.
          title: Repos
        scan_mode:
          default: single
          enum:
          - single
          - multi
          title: Scan Mode
          type: string
        scan_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Scan Type
        type:
          const: start_code_scan
          default: start_code_scan
          title: Type
          type: string
      title: AutomationStartCodeScanAction
      type: object
    AutomationStartSessionAction-Input:
      additionalProperties: false
      properties:
        prompt:
          description: 'The single source of truth: plain text with inline reference
            tokens (@{owner}/{repo}, @{path}, @playbook:{id}, @skills:{name}, !{macro},
            ${SECRET_NAME}). Kind-prefixed tokens are validated at save; unknown ids
            are a 400. The triggering event''s payload is appended automatically.'
          title: Prompt
          type: string
        session:
          $ref: '#/components/schemas/AutomationSessionConfig-Input'
          description: Config for the spawned session.
        type:
          const: start_session
          default: start_session
          title: Type
          type: string
      required:
      - prompt
      title: AutomationStartSessionAction
      type: object
    AutomationStartSessionAction-Output:
      additionalProperties: false
      properties:
        prompt:
          description: 'The single source of truth: plain text with inline reference
            tokens (@{owner}/{repo}, @{path}, @playbook:{id}, @skills:{name}, !{macro},
            ${SECRET_NAME}). Kind-prefixed tokens are validated at save; unknown ids
            are a 400. The triggering event''s payload is appended automatically.'
          title: Prompt
          type: string
        session:
          $ref: '#/components/schemas/AutomationSessionConfig-Output'
          description: Config for the spawned session.
        type:
          const: start_session
          default: start_session
          title: Type
          type: string
      required:
      - prompt
      title: AutomationStartSessionAction
      type: object
    AutomationStartSessionActionUpdate:
      additionalProperties: false
      properties:
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          description: 'The single source of truth: plain text with inline reference
            tokens (@{owner}/{repo}, @{path}, @playbook:{id}, @skills:{name}, !{macro},
            ${SECRET_NAME}). Kind-prefixed tokens are validated at save; unknown ids
            are a 400. The triggering event''s payload is appended automatically.
            Required when creating or adding this action; on a merge-semantics update,
            omit it to keep the stored value (null is invalid).'
          title: Prompt
        session:
          $ref: '#/components/schemas/AutomationSessionConfig-Input'
          description: Config for the spawned session.
        type:
          const: start_session
          default: start_session
          title: Type
          type: string
      title: AutomationStartSessionActionUpdate
      type: object
    AutomationStringCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        operator:
          enum:
          - contains
          - not_contains
          - starts_with
          - not_starts_with
          - ends_with
          - not_ends_with
          title: Operator
          type: string
        value:
          title: Value
          type: string
      required:
      - field
      - operator
      - value
      title: AutomationStringCondition
      type: object
    AutomationTeamsChannel:
      additionalProperties: false
      properties:
        channel_id:
          description: Teams channel id ('19:...@thread.tacv2'), or '*'.
          title: Channel Id
          type: string
        team_id:
          description: Entra group id of the Microsoft Teams team, or '*'.
          title: Team Id
          type: string
      required:
      - team_id
      - channel_id
      title: AutomationTeamsChannel
      type: object
    AutomationTemplateResponse:
      additionalProperties: false
      properties:
        actions:
          items:
            discriminator:
              mapping:
                message_session: '#/components/schemas/AutomationMessageSessionAction'
                monitor_session: '#/components/schemas/AutomationMonitorSessionAction'
                start_session: '#/components/schemas/AutomationStartSessionAction-Output'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/AutomationStartSessionAction-Output'
            - $ref: '#/components/schemas/AutomationMessageSessionAction'
            - $ref: '#/components/schemas/AutomationMonitorSessionAction'
          title: Actions
          type: array
        category:
          title: Category
          type: string
        description:
          title: Description
          type: string
        docs_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Docs Url
        featured:
          default: false
          title: Featured
          type: boolean
        name:
          title: Name
          type: string
        required_integrations:
          items:
            type: string
          title: Required Integrations
          type: array
        required_mcps:
          items:
            type: string
          title: Required Mcps
          type: array
        template_id:
          title: Template Id
          type: string
        triggers:
          items:
            $ref: '#/components/schemas/AutomationTriggerRequest-Output'
          title: Triggers
          type: array
      required:
      - template_id
      - name
      - description
      - category
      - required_integrations
      - required_mcps
      - triggers
      - actions
      title: AutomationTemplateResponse
      type: object
    AutomationTemplatesResponse:
      additionalProperties: false
      properties:
        templates:
          items:
            $ref: '#/components/schemas/AutomationTemplateResponse'
          title: Templates
          type: array
      required:
      - templates
      title: AutomationTemplatesResponse
      type: object
    AutomationTools:
      additionalProperties: false
      properties:
        jira_projects:
          anyOf:
          - items:
              type: string
            minItems: 1
            type: array
          - type: 'null'
          description: Jira project ids the session's Jira tools are limited to. Null
            (the default) allows every project the run identity can access. Projects
            required by the automation's Jira triggers are always included. While
            a project list is set, the Atlassian MCP server is not loaded, since it
            cannot be limited to projects. On update, omitting this member keeps the
            stored list; send null to clear it.
          title: Jira Projects
        linear_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Grant Linear tools.
          title: Linear Enabled
        mcp_servers:
          default: []
          description: Marketplace slugs (the slug field of the mcp-servers resource,
            e.g. 'github', 'notion') enabled for spawned sessions. Servers installed
            with a personal (user-scoped) connection require run_as creator; selecting
            them with run_as organization is rejected since the Automations service
            identity has no personal token for them, and switching an automation's
            run_as to organization removes them from the stored selection.
          items:
            type: string
          title: Mcp Servers
          type: array
        slack_channels:
          default: []
          description: Channels the session's Slack tools may post to.
          items:
            $ref: '#/components/schemas/AutomationSlackChannel'
          title: Slack Channels
          type: array
        slack_dm_scope:
          anyOf:
          - enum:
            - org_members
            - workspace
            type: string
          - type: 'null'
          description: Allow spawned sessions to open 1:1 Slack DMs in the organization's
            connected workspaces. 'org_members' (enterprise accounts only) restricts
            DM targets to members of the organization; 'workspace' (non-enterprise
            accounts only) allows any eligible workspace member. Omit or null to disable
            DMs.
          title: Slack Dm Scope
        teams_channels:
          default: []
          description: 'Microsoft Teams channels the session''s Teams tool may read
            and post to. Teams must have the Devin app installed. A single {team_id:
            ''*'', channel_id: ''*''} entry grants every channel of every team the
            Devin app is installed in. The grant is capped by the organization''s
            Teams Default Access; the channel of a teams:message trigger is always
            granted.'
          items:
            $ref: '#/components/schemas/AutomationTeamsChannel'
          title: Teams Channels
          type: array
        teams_dm_scope:
          anyOf:
          - const: installed_users
            type: string
          - type: 'null'
          description: Allow spawned sessions to open 1:1 Microsoft Teams DMs. DMs
            only reach users who installed the Devin app in Teams personally. Capped
            by Teams Default Access and the governing security profile.
          title: Teams Dm Scope
      title: AutomationTools
      type: object
    AutomationTriageSessionAction:
      additionalProperties: false
      description: 'Auto-triage v2: each message in the source Slack channel is grouped

        into a tracked issue by a per-automation grouping session; genuinely new

        issues spawn an investigation session.'
      properties:
        kind:
          default: auto_triage
          description: 'Which persona the session runs: the issue-tracking auto-triage
            agent or the general-purpose assistant.'
          enum:
          - auto_triage
          - generic_assistant
          title: Kind
          type: string
        setup_prompt:
          description: 'How to triage the channel: what counts as an issue, how to
            investigate, and where to route findings.'
          title: Setup Prompt
          type: string
        slack_triage_config:
          $ref: '#/components/schemas/AutomationSlackTriageConfig'
          description: Slack triage configuration. Use {} when the trigger has no
            channel restriction; routing comes from each matching Slack message.
        type:
          const: triage_session
          default: triage_session
          title: Type
          type: string
      required:
      - setup_prompt
      - slack_triage_config
      title: AutomationTriageSessionAction
      type: object
    AutomationTriageSessionActionUpdate:
      additionalProperties: false
      properties:
        kind:
          default: auto_triage
          description: 'Which persona the session runs: the issue-tracking auto-triage
            agent or the general-purpose assistant.'
          enum:
          - auto_triage
          - generic_assistant
          title: Kind
          type: string
        setup_prompt:
          anyOf:
          - type: string
          - type: 'null'
          description: 'How to triage the channel: what counts as an issue, how to
            investigate, and where to route findings. Required when creating or adding
            this action; on a merge-semantics update, omit it to keep the stored value
            (null is invalid).'
          title: Setup Prompt
        slack_triage_config:
          anyOf:
          - $ref: '#/components/schemas/AutomationSlackTriageConfig'
          - type: 'null'
          description: Requires exactly one slack:message trigger on the same channel.
            Required when creating or adding this action; on a merge-semantics update,
            omit it to keep the stored value (null is invalid).
        type:
          const: triage_session
          default: triage_session
          title: Type
          type: string
      title: AutomationTriageSessionActionUpdate
      type: object
    AutomationTriggerRequest-Input:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
          - $ref: '#/components/schemas/AutomationConditions-Input'
          - type: 'null'
          description: null matches every event, except Slack message triggers require
            a channel restriction or at least one completed filter in every group.
            is_thread_reply alone does not satisfy this requirement.
        event_type:
          description: Trigger event type, e.g. 'github:pull_request'.
          enum:
          - github:issue_comment
          - github:issues
          - github:pull_request
          - github:pull_request_review
          - github:pull_request_review_comment
          - github:check_run
          - github:push
          - gitlab:merge_request
          - gitlab:note
          - gitlab:issue
          - gitlab:issue_note
          - gitlab:push
          - gitlab:pipeline
          - azure_devops:pull_request
          - azure_devops:pull_request_comment
          - azure_devops:push
          - azure_devops:build
          - bitbucket_data_center:pull_request
          - bitbucket_data_center:pull_request_comment
          - bitbucket_data_center:push
          - schedule:recurring
          - slack:message
          - slack:reaction_added
          - slack:usergroup_mentioned
          - teams:message
          - linear:create
          - linear:label_added
          - linear:assigned
          - linear:status_changed
          - linear:priority_changed
          - linear:moved
          - jira:issue_created
          - jira:issue_updated
          - jira:label_added
          - jira:status_changed
          - jira:assigned
          - jira:commented
          - pylon:issue_created
          - pylon:issue_tag_added
          - pylon:issue_status_changed
          - incident_io:incident_created
          - incident_io:status_changed
          - incident_io:severity_changed
          - incident_io:follow_up_created
          - pagerduty:incident_triggered
          - pagerduty:incident_acknowledged
          - pagerduty:incident_resolved
          - pagerduty:incident_updated
          - webhook:incoming
          - snapshot_build:completed
          title: Event Type
          type: string
        replies:
          default: []
          description: Where this trigger's session binds and its response is delivered.
            Only the matched trigger's replies execute, all entries independently;
            entries are deduplicated.
          items:
            $ref: '#/components/schemas/AutomationReply'
          title: Replies
          type: array
      required:
      - event_type
      title: AutomationTriggerRequest
      type: object
    AutomationTriggerRequest-Output:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
          - $ref: '#/components/schemas/AutomationConditions-Output'
          - type: 'null'
          description: null matches every event, except Slack message triggers require
            a channel restriction or at least one completed filter in every group.
            is_thread_reply alone does not satisfy this requirement.
        event_type:
          description: Trigger event type, e.g. 'github:pull_request'.
          enum:
          - github:issue_comment
          - github:issues
          - github:pull_request
          - github:pull_request_review
          - github:pull_request_review_comment
          - github:check_run
          - github:push
          - gitlab:merge_request
          - gitlab:note
          - gitlab:issue
          - gitlab:issue_note
          - gitlab:push
          - gitlab:pipeline
          - azure_devops:pull_request
          - azure_devops:pull_request_comment
          - azure_devops:push
          - azure_devops:build
          - bitbucket_data_center:pull_request
          - bitbucket_data_center:pull_request_comment
          - bitbucket_data_center:push
          - schedule:recurring
          - slack:message
          - slack:reaction_added
          - slack:usergroup_mentioned
          - teams:message
          - linear:create
          - linear:label_added
          - linear:assigned
          - linear:status_changed
          - linear:priority_changed
          - linear:moved
          - jira:issue_created
          - jira:issue_updated
          - jira:label_added
          - jira:status_changed
          - jira:assigned
          - jira:commented
          - pylon:issue_created
          - pylon:issue_tag_added
          - pylon:issue_status_changed
          - incident_io:incident_created
          - incident_io:status_changed
          - incident_io:severity_changed
          - incident_io:follow_up_created
          - pagerduty:incident_triggered
          - pagerduty:incident_acknowledged
          - pagerduty:incident_resolved
          - pagerduty:incident_updated
          - webhook:incoming
          - snapshot_build:completed
          title: Event Type
          type: string
        replies:
          default: []
          description: Where this trigger's session binds and its response is delivered.
            Only the matched trigger's replies execute, all entries independently;
            entries are deduplicated.
          items:
            $ref: '#/components/schemas/AutomationReply'
          title: Replies
          type: array
      required:
      - event_type
      title: AutomationTriggerRequest
      type: object
    AutomationTriggerResponse:
      additionalProperties: false
      properties:
        conditions:
          anyOf:
          - $ref: '#/components/schemas/AutomationConditions-Output'
          - type: 'null'
        event_type:
          title: Event Type
          type: string
        replies:
          default: []
          items:
            $ref: '#/components/schemas/AutomationReply'
          title: Replies
          type: array
        trigger_id:
          description: "Re-minted when triggers is replaced \u2014 not stable across\
            \ edits."
          title: Trigger Id
          type: string
        webhook:
          anyOf:
          - $ref: '#/components/schemas/AutomationWebhookResponse'
          - type: 'null'
          description: Only on webhook:incoming triggers.
      required:
      - trigger_id
      - event_type
      title: AutomationTriggerResponse
      type: object
    AutomationUpdateRequest:
      additionalProperties: false
      description: "PATCH fields merge member-wise by default: omitted members are\
        \ kept,\nexplicit nulls clear, and empty groups are no-ops. Metadata merges\
        \ per key,\nwith null values deleting keys. Lists replace wholesale (deletion\
        \ = resend\nthe list without the element), while each sent element merges\
        \ onto the\nstored element of the same type when that type occurs exactly\
        \ once on both\nsides. Element members that are required on create (``prompt``,\n\
        ``setup_prompt``, the monitor/triage slack configs, ``scan_id``) may be\n\
        omitted when a counterpart exists \u2014 they carry like any other member;\n\
        explicit null is rejected."
      properties:
        actions:
          anyOf:
          - items:
              discriminator:
                mapping:
                  message_session: '#/components/schemas/AutomationMessageSessionActionUpdate'
                  monitor_session: '#/components/schemas/AutomationMonitorSessionActionUpdate'
                  start_session: '#/components/schemas/AutomationStartSessionActionUpdate'
                propertyName: type
              oneOf:
              - $ref: '#/components/schemas/AutomationStartSessionActionUpdate'
              - $ref: '#/components/schemas/AutomationMessageSessionActionUpdate'
              - $ref: '#/components/schemas/AutomationMonitorSessionActionUpdate'
            type: array
          - type: 'null'
          title: Actions
        concurrency:
          anyOf:
          - $ref: '#/components/schemas/AutomationConcurrency'
          - type: 'null'
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        limits:
          anyOf:
          - $ref: '#/components/schemas/AutomationLimits'
          - type: 'null'
        metadata:
          anyOf:
          - additionalProperties:
              anyOf:
              - type: string
              - type: 'null'
            type: object
          - type: 'null'
          title: Metadata
        name:
          anyOf:
          - maxLength: 500
            minLength: 1
            type: string
          - type: 'null'
          title: Name
        notifications:
          anyOf:
          - $ref: '#/components/schemas/AutomationNotifications'
          - type: 'null'
        run_as:
          anyOf:
          - description: "Identity the spawned sessions run under. organization: the\
              \ org's automation identity. When the organization has a default service\
              \ user for automations, sessions run as that service user and the response\
              \ returns run_as service_user with its id; saving requires every permission\
              \ that service user holds. Otherwise it is the System User in the app\
              \ \u2014 sessions use system permissions, so MCP servers installed with\
              \ a personal (user-scoped) connection cannot be selected, and switching\
              \ an automation to organization removes them from its selection. creator:\
              \ personal automation \u2014 runs with the creator's own permissions\
              \ and is visible only to the creator and org admins; rejected for service-user-created\
              \ automations. service_user: runs as the given service user, with its\
              \ roles, grants and ACU limits; requires permission to manage that service\
              \ user. Required on create; null on update resets to organization."
            discriminator:
              mapping:
                creator: '#/components/schemas/AutomationRunAsCreator'
                organization: '#/components/schemas/AutomationRunAsOrganization'
                service_user: '#/components/schemas/AutomationRunAsServiceUser'
              propertyName: type
            oneOf:
            - $ref: '#/components/schemas/AutomationRunAsOrganization'
            - $ref: '#/components/schemas/AutomationRunAsCreator'
            - $ref: '#/components/schemas/AutomationRunAsServiceUser'
          - type: 'null'
          description: null resets to organization.
          title: Run As
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/AutomationSecurityProfileSelection'
          - type: 'null'
          description: 'The automation''s own security-profile binding: a profile_id
            pins that profile, {"profile_id": null} records an explicit opt-out, and
            explicit null reverts to inheriting from the org/enterprise. Requires
            the security-profile management permission.'
        session_settings:
          anyOf:
          - $ref: '#/components/schemas/AutomationSessionSettings-Input'
          - type: 'null'
        slack_reply_access:
          anyOf:
          - enum:
            - devin_users
            - slack_users
            - external_slack_users
            type: string
          - type: 'null'
          description: null resets to slack_users.
          title: Slack Reply Access
        teams_reply_access:
          anyOf:
          - enum:
            - devin_users
            - teams_users
            type: string
          - type: 'null'
          description: null resets to teams_users.
          title: Teams Reply Access
        tools:
          anyOf:
          - $ref: '#/components/schemas/AutomationTools'
          - type: 'null'
        triggers:
          anyOf:
          - items:
              $ref: '#/components/schemas/AutomationTriggerRequest-Input'
            type: array
          - type: 'null'
          title: Triggers
      title: AutomationUpdateRequest
      type: object
    AutomationWebhookResponse:
      additionalProperties: false
      properties:
        secret:
          anyOf:
          - type: string
          - type: 'null'
          description: Present only when newly minted (create or re-add); never retrievable
            again. Replacing triggers preserves the existing secret.
          title: Secret
        url:
          description: The inbox external systems POST to (header X-Webhook-Secret).
          title: Url
          type: string
      required:
      - url
      title: AutomationWebhookResponse
      type: object
    Blueprint:
      description: 'Public ``Blueprint`` resource shape.


        Note: the ``type`` enum may grow in the future; clients MUST gracefully

        handle unknown values.  YAML contents are fetched separately via

        ``GET /blueprints/{id}/contents``.'
      properties:
        blueprint_id:
          title: Blueprint Id
          type: string
        build_on_default_branch_commit:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Whether each push to the repo's default branch builds the environment.
            Null unless this is a repo's root blueprint.
          title: Build On Default Branch Commit
        created_at:
          title: Created At
          type: integer
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Name
        report_check_runs:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Whether each commit build is reported as a GitHub check run
            on the commit. Null unless this is a repo's root blueprint.
          title: Report Check Runs
        source:
          anyOf:
          - enum:
            - git
            - database
            type: string
          - type: 'null'
          description: 'Where the YAML is authored: ''git'' (synced from .devin/blueprint.yaml
            in the repo) or ''database'' (edited via the API/UI). Always null for
            enterprise- and org-tier blueprints.'
          title: Source
        type:
          enum:
          - enterprise
          - org
          - repo
          title: Type
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
      - blueprint_id
      - type
      - repo_name
      - created_at
      - updated_at
      title: Blueprint
      type: object
    BlueprintFile:
      description: Public ``BlueprintFile`` resource shape.
      properties:
        blueprint_id:
          title: Blueprint Id
          type: string
        created_at:
          title: Created At
          type: integer
        env_var_name:
          title: Env Var Name
          type: string
        file_id:
          title: File Id
          type: string
        name:
          title: Name
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
        updated_at:
          title: Updated At
          type: integer
      required:
      - file_id
      - blueprint_id
      - name
      - env_var_name
      - size_bytes
      - created_at
      - updated_at
      title: BlueprintFile
      type: object
    BlueprintFileList:
      description: List envelope for blueprint files.
      properties:
        data:
          items:
            $ref: '#/components/schemas/BlueprintFile'
          title: Data
          type: array
      required:
      - data
      title: BlueprintFileList
      type: object
    BlueprintList:
      description: List envelope for blueprints (returned in execution order).
      properties:
        data:
          items:
            $ref: '#/components/schemas/Blueprint'
          title: Data
          type: array
      required:
      - data
      title: BlueprintList
      type: object
    Body_handle_upload_attachment_v3_organizations__org_id__attachments_post:
      properties:
        file:
          contentMediaType: application/octet-stream
          title: File
          type: string
      required:
      - file
      title: Body_handle_upload_attachment_v3_organizations__org_id__attachments_post
      type: object
    Body_upload_enterprise_blueprint_file_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files_post:
      properties:
        file:
          contentMediaType: application/octet-stream
          title: File
          type: string
      required:
      - file
      title: Body_upload_enterprise_blueprint_file_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files_post
      type: object
    Body_upload_org_blueprint_file_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files_post:
      properties:
        file:
          contentMediaType: application/octet-stream
          title: File
          type: string
      required:
      - file
      title: Body_upload_org_blueprint_file_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files_post
      type: object
    Build:
      description: "Public ``Build`` resource shape \u2014 opaque \"did this succeed\
        \ yet?\" view.\n\nPer spec, no platform/snapshot/per-job introspection is\
        \ exposed.  Future\nadditions (``triggered_by_repo``, build metadata, etc.)\
        \ are additive."
      properties:
        build_id:
          title: Build Id
          type: string
        completed_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Completed At
        created_at:
          title: Created At
          type: integer
        pinned:
          title: Pinned
          type: boolean
        started_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Started At
        status:
          enum:
          - pending
          - running
          - succeeded
          - failed
          - cancelled
          title: Status
          type: string
        trigger:
          anyOf:
          - enum:
            - manual
            - auto
            type: string
          - type: 'null'
          title: Trigger
        triggered_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Triggered By User Id
        updated_at:
          title: Updated At
          type: integer
      required:
      - build_id
      - status
      - trigger
      - triggered_by_user_id
      - pinned
      - started_at
      - completed_at
      - created_at
      - updated_at
      title: Build
      type: object
    BulkIndexRepositoriesRequest:
      properties:
        repositories:
          items:
            $ref: '#/components/schemas/RepositoryIndexingItem'
          maxItems: 100
          minItems: 1
          title: Repositories
          type: array
      required:
      - repositories
      title: BulkIndexRepositoriesRequest
      type: object
    CategoryMetrics:
      properties:
        acus:
          title: Acus
          type: number
        category:
          title: Category
          type: string
        sessions_count:
          title: Sessions Count
          type: integer
        subcategories:
          items:
            $ref: '#/components/schemas/SubcategoryMetrics'
          title: Subcategories
          type: array
      required:
      - category
      - sessions_count
      - acus
      - subcategories
      title: CategoryMetrics
      type: object
    CodeScanAttachmentResponse:
      description: A file attached to a code scan at creation.
      properties:
        filename:
          description: Name of the attached file.
          title: Filename
          type: string
        url:
          description: Devin attachment URL of the file.
          title: Url
          type: string
      required:
      - url
      - filename
      title: CodeScanAttachmentResponse
      type: object
    CodeScanCreateRequest:
      description: Request body for starting a new code scan.
      properties:
        commit_sha:
          anyOf:
          - type: string
          - type: 'null'
          description: Commit to check out before scanning.
          title: Commit Sha
        devin_mode:
          anyOf:
          - enum:
            - fusion
            - swe-2
            type: string
          - type: 'null'
          description: 'Agent the scan''s sessions run on: ''fusion'' or ''swe-2''
            (SWE-2 Max for ''deep'' effort, SWE-2 High for ''normal''). Applies only
            when the mode is enabled for the organization; otherwise, and when omitted,
            the scan runs on the default agent.'
          title: Devin Mode
        effort:
          anyOf:
          - enum:
            - normal
            - deep
            type: string
          - type: 'null'
          description: 'Scan effort: ''normal'' (default) uses lower model reasoning
            effort with larger investigation batches; ''deep'' runs the full pipeline.'
          title: Effort
        host:
          anyOf:
          - type: string
          - type: 'null'
          description: Git host of the repository, if known.
          title: Host
        interactive:
          default: false
          description: When true, the scan pauses for user review between threat modeling
            and investigation.
          title: Interactive
          type: boolean
        locale:
          anyOf:
          - type: string
          - type: 'null'
          description: 'BCP-47 language tag (e.g. ''ja'') for the scan''s user-facing
            output: finding titles, descriptions, and reports. Omitted means English.'
          title: Locale
        platform:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          description: 'Where the scan''s sessions run: a platform label configured
            for the organization (e.g. ''linux'', ''windows'', ''macos'') or the name
            of an outpost (BYOB) pool, case-insensitive; platforms take priority when
            a name matches both. Omitted means the organization default. Unrecognized
            values are rejected with a 400 whose error body lists the available platform
            labels and outpost pool names.'
          title: Platform
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Scan profile to apply to the scan.
          title: Profile Id
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Full name of the repository to scan. Provide exactly one of
            repo_name or repos.
          title: Repo Name
        repos:
          anyOf:
          - items:
              $ref: '#/components/schemas/ScanRepoRequest'
            maxItems: 200
            type: array
          - type: 'null'
          description: Repositories covered by one scan; the first entry is the scan's
            primary repository. Provide exactly one of repo_name or repos.
          title: Repos
        scan_type:
          anyOf:
          - enum:
            - security
            - performance
            - db-queries
            - test-coverage
            - dead-code
            - code-quality
            - cleanup
            - telemetry
            - accessibility
            - compliance
            - general
            - migration-docs
            type: string
          - type: 'null'
          description: Type of scan to run. Must match the profile's scan type when
            a profile is given; defaults to the profile's type, or 'security' for
            profile-less scans. Non-security types require a profile and are rejected
            without one.
          title: Scan Type
      title: CodeScanCreateRequest
      type: object
    CodeScanEffortResponse:
      description: Effort configured on a scan.
      properties:
        effort:
          description: Effort applied to future incremental runs of the scan.
          enum:
          - normal
          - deep
          title: Effort
          type: string
        scan_id:
          description: Unique identifier for the scan.
          title: Scan Id
          type: string
      required:
      - scan_id
      - effort
      title: CodeScanEffortResponse
      type: object
    CodeScanEffortUpdateRequest:
      description: Request to change the effort configured on a scan.
      properties:
        effort:
          description: 'Effort to apply to future incremental runs of the scan: ''normal''
            uses lower model reasoning effort with larger investigation batches; ''deep''
            runs the full pipeline.'
          enum:
          - normal
          - deep
          title: Effort
          type: string
      required:
      - effort
      title: CodeScanEffortUpdateRequest
      type: object
    CodeScanFindingResponse:
      description: A single code scan finding.
      properties:
        category:
          anyOf:
          - type: string
          - type: 'null'
          description: Category (rule name) the finding was classified under, if any.
          title: Category
        code_owners:
          description: Code owners associated with the affected code.
          items:
            type: string
          title: Code Owners
          type: array
        code_scan_run_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Identifier of the scan run that produced the finding, if known.
          title: Code Scan Run Id
        created_at:
          description: When the finding was created (unix seconds).
          title: Created At
          type: integer
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: Detailed description of the vulnerability, if any.
          title: Description
        finding_id:
          description: Unique identifier for the finding.
          title: Finding Id
          type: string
        fix_effort:
          anyOf:
          - enum:
            - small
            - large
            type: string
          - type: 'null'
          description: 'Size of the fix as rated by the scan: small or large. Null
            when the finding has not been rated.'
          title: Fix Effort
        note:
          anyOf:
          - type: string
          - type: 'null'
          description: Additional note attached to the finding, if any.
          title: Note
        orchestrator_session_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Orchestrator session that ran the scan that produced the finding
            (the scan's Devin session), if any.
          title: Orchestrator Session Id
        payoff:
          anyOf:
          - enum:
            - quick_win
            - big_fix
            - easy_fix
            - deprioritize
            type: string
          - type: 'null'
          description: 'Severity x fix_effort quadrant: quick_win (critical/high,
            small fix), big_fix (critical/high, large fix), easy_fix (medium/low,
            small fix), deprioritize (medium/low, large fix). Null when unrated.'
          title: Payoff
        pr_url:
          anyOf:
          - type: string
          - type: 'null'
          description: URL of the remediation PR opened for this finding, if any.
          title: Pr Url
        recommendation:
          anyOf:
          - type: string
          - type: 'null'
          description: Suggested remediation for the finding, if any.
          title: Recommendation
        reference_snippets:
          description: Code snippets referenced by the finding as supporting evidence.
          items:
            $ref: '#/components/schemas/CodeScanReferenceSnippetResponse'
          title: Reference Snippets
          type: array
        related_finding_ids:
          description: Finding IDs of the other links in a realized attack chain.
            Set only on the chain's sink finding.
          items:
            type: string
          title: Related Finding Ids
          type: array
        repo_name:
          description: Repository the finding was reported in.
          title: Repo Name
          type: string
        scan_id:
          description: Identifier of the scan that produced the finding.
          title: Scan Id
          type: string
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Session that remediated the finding (and opened the PR), if
            any.
          title: Session Id
        severity:
          description: 'Severity of the finding: critical, high, medium, or low.'
          enum:
          - critical
          - high
          - medium
          - low
          title: Severity
          type: string
        status:
          description: 'Finding status: open, dismissed, or resolved.'
          enum:
          - open
          - dismissed
          - resolved
          title: Status
          type: string
        title:
          anyOf:
          - type: string
          - type: 'null'
          description: Title of the finding, if any.
          title: Title
        updated_at:
          description: When the finding was last updated (unix seconds).
          title: Updated At
          type: integer
        validation_artifacts:
          description: Attachment URLs recorded by runtime validation.
          items:
            type: string
          title: Validation Artifacts
          type: array
        validation_evidence:
          anyOf:
          - type: string
          - type: 'null'
          description: Evidence summary recorded by runtime validation, if any.
          title: Validation Evidence
        validation_result:
          anyOf:
          - enum:
            - confirmed
            - false_positive
            - inconclusive
            type: string
          - type: 'null'
          description: 'Recorded runtime validation outcome, if any: confirmed, false_positive,
            or inconclusive.'
          title: Validation Result
        validation_session_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Session that recorded the runtime validation outcome, if any.
          title: Validation Session Id
      required:
      - finding_id
      - title
      - description
      - recommendation
      - note
      - code_owners
      - reference_snippets
      - severity
      - category
      - repo_name
      - pr_url
      - scan_id
      - code_scan_run_id
      - session_id
      - orchestrator_session_id
      - status
      - created_at
      - updated_at
      title: CodeScanFindingResponse
      type: object
    CodeScanMetricsResponse:
      description: 'Response model for code scan metrics.


        All metrics are scoped to code scans created within the specified time

        range: findings and remediation PRs are attributed to the scan that

        produced them.'
      properties:
        avg_pr_open_duration_seconds:
          anyOf:
          - type: number
          - type: 'null'
          description: 'Average time a PR is (or was) open, in seconds: creation to
            merge/close for finished PRs, creation to now for open PRs. Null when
            no PRs were created.'
          title: Avg Pr Open Duration Seconds
        avg_pr_time_to_merge_seconds:
          anyOf:
          - type: number
          - type: 'null'
          description: Average time from PR creation to merge, in seconds. Null when
            no PRs have been merged.
          title: Avg Pr Time To Merge Seconds
        open_critical_findings_count:
          description: Number of open findings with critical severity.
          title: Open Critical Findings Count
          type: integer
        open_high_findings_count:
          description: Number of open findings with high severity.
          title: Open High Findings Count
          type: integer
        open_low_findings_count:
          description: Number of open findings with low severity.
          title: Open Low Findings Count
          type: integer
        open_medium_findings_count:
          description: Number of open findings with medium severity.
          title: Open Medium Findings Count
          type: integer
        prs_closed_count:
          description: Number of remediation PRs closed without being merged.
          title: Prs Closed Count
          type: integer
        prs_created_count:
          description: Number of PRs created by the scans' remediation sessions.
          title: Prs Created Count
          type: integer
        prs_merged_count:
          description: Number of remediation PRs merged.
          title: Prs Merged Count
          type: integer
        prs_open_count:
          description: Number of remediation PRs currently in the open state.
          title: Prs Open Count
          type: integer
        repos_scanned_count:
          description: Number of distinct repositories scanned.
          title: Repos Scanned Count
          type: integer
        scans_count:
          description: Number of code scans created within the specified time range.
          title: Scans Count
          type: integer
      required:
      - scans_count
      - repos_scanned_count
      - prs_created_count
      - prs_open_count
      - prs_merged_count
      - prs_closed_count
      - avg_pr_time_to_merge_seconds
      - avg_pr_open_duration_seconds
      - open_critical_findings_count
      - open_high_findings_count
      - open_medium_findings_count
      - open_low_findings_count
      title: CodeScanMetricsResponse
      type: object
    CodeScanProfileDetailResponse:
      description: Full details of a code scan profile, including its guidance.
      properties:
        communication_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the communication phase (acting on final findings,
            e.g. notifying owners or stakeholders), if any.
          title: Communication Guidance
        created_at:
          description: When the profile was created (unix seconds).
          title: Created At
          type: integer
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: Description of the profile, if any.
          title: Description
        exclude_globs:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Glob patterns of files to exclude from the scan, if any.
          title: Exclude Globs
        include_globs:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Glob patterns of files to include in the scan, if any.
          title: Include Globs
        ingestion_source_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance describing the ingestion source, if any.
          title: Ingestion Source Guidance
        investigation_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the investigation phase, if any.
          title: Investigation Guidance
        mode:
          description: 'Profile mode: discover or ingest.'
          enum:
          - discover
          - ingest
          title: Mode
          type: string
        name:
          description: Name of the profile.
          title: Name
          type: string
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Organization that owns the profile. Null when the profile is
            shared account-wide.
          title: Org Id
        post_ingestion_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the post-ingestion phase, if any.
          title: Post Ingestion Guidance
        profile_id:
          description: Unique identifier for the profile.
          title: Profile Id
          type: string
        remediation_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the remediation phase, if any.
          title: Remediation Guidance
        report_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the report phase, if any.
          title: Report Guidance
        scan_paths:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Repository-relative paths the scan is restricted to, if any.
            Null or empty means the whole repository.
          title: Scan Paths
        scan_type:
          description: Type of scan the profile configures.
          enum:
          - security
          - performance
          - db-queries
          - test-coverage
          - dead-code
          - code-quality
          - cleanup
          - telemetry
          - accessibility
          - compliance
          - general
          - migration-docs
          title: Scan Type
          type: string
        threat_model_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance describing the threat model, if any.
          title: Threat Model Guidance
        triage_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the triage phase, if any.
          title: Triage Guidance
        type_config:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          description: Configuration specific to the profile's scan type, if any (e.g.
            a compliance profile's system, framework and criteria).
          title: Type Config
        validation_guidance:
          anyOf:
          - type: string
          - type: 'null'
          description: Guidance for the validation phase, if any.
          title: Validation Guidance
        validation_severities:
          anyOf:
          - items:
              enum:
              - critical
              - high
              - medium
              - low
              type: string
            type: array
          - type: 'null'
          description: Finding severities runtime validation covers. Null means the
            default.
          title: Validation Severities
        visibility:
          description: Whether the profile is owned by a single organization or shared
            across the whole account.
          enum:
          - org
          - account
          title: Visibility
          type: string
      required:
      - profile_id
      - name
      - description
      - visibility
      - org_id
      - scan_type
      - mode
      - include_globs
      - exclude_globs
      - threat_model_guidance
      - investigation_guidance
      - triage_guidance
      - validation_guidance
      - report_guidance
      - remediation_guidance
      - ingestion_source_guidance
      - post_ingestion_guidance
      - created_at
      title: CodeScanProfileDetailResponse
      type: object
    CodeScanProfileResponse:
      description: Summary of the profile a scan ran under.
      properties:
        name:
          description: Name of the profile.
          title: Name
          type: string
        profile_id:
          description: Unique identifier for the profile.
          title: Profile Id
          type: string
      required:
      - profile_id
      - name
      title: CodeScanProfileResponse
      type: object
    CodeScanProfileSummaryResponse:
      description: Summary of a code scan profile, without its guidance.
      properties:
        created_at:
          description: When the profile was created (unix seconds).
          title: Created At
          type: integer
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: Description of the profile, if any.
          title: Description
        mode:
          description: 'Profile mode: discover or ingest.'
          enum:
          - discover
          - ingest
          title: Mode
          type: string
        name:
          description: Name of the profile.
          title: Name
          type: string
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Organization that owns the profile. Null when the profile is
            shared account-wide.
          title: Org Id
        profile_id:
          description: Unique identifier for the profile.
          title: Profile Id
          type: string
        scan_type:
          description: Type of scan the profile configures.
          enum:
          - security
          - performance
          - db-queries
          - test-coverage
          - dead-code
          - code-quality
          - cleanup
          - telemetry
          - accessibility
          - compliance
          - general
          - migration-docs
          title: Scan Type
          type: string
        visibility:
          description: Whether the profile is owned by a single organization or shared
            across the whole account.
          enum:
          - org
          - account
          title: Visibility
          type: string
      required:
      - profile_id
      - name
      - description
      - visibility
      - org_id
      - scan_type
      - mode
      - created_at
      title: CodeScanProfileSummaryResponse
      type: object
    CodeScanProfileSwitchRequest:
      description: Request to switch the profile linked to a scan.
      properties:
        profile_id:
          description: Profile to apply to future incremental runs of the scan.
          title: Profile Id
          type: string
      required:
      - profile_id
      title: CodeScanProfileSwitchRequest
      type: object
    CodeScanProfileSwitchResponse:
      description: Result of switching the profile linked to a scan.
      properties:
        profile:
          $ref: '#/components/schemas/CodeScanProfileResponse'
          description: Profile now linked to the scan, used for future incremental
            runs.
        scan_id:
          description: Unique identifier for the scan.
          title: Scan Id
          type: string
      required:
      - scan_id
      - profile
      title: CodeScanProfileSwitchResponse
      type: object
    CodeScanReferenceSnippetResponse:
      description: A code snippet referenced by a finding as supporting evidence.
      properties:
        code:
          anyOf:
          - type: string
          - type: 'null'
          description: The referenced source code, if captured.
          title: Code
        commentary:
          description: Explanation of why this snippet is relevant to the finding.
          title: Commentary
          type: string
        end_line:
          description: Last line of the referenced range.
          title: End Line
          type: integer
        file_path:
          description: Path to the referenced file.
          title: File Path
          type: string
        start_line:
          description: First line of the referenced range.
          title: Start Line
          type: integer
      required:
      - file_path
      - start_line
      - end_line
      - commentary
      title: CodeScanReferenceSnippetResponse
      type: object
    CodeScanResponse:
      description: A single code scan.
      properties:
        attachments:
          description: Files attached to the scan when it was created.
          items:
            $ref: '#/components/schemas/CodeScanAttachmentResponse'
          title: Attachments
          type: array
        created_at:
          description: When the scan was created (unix seconds).
          title: Created At
          type: integer
        effort:
          description: 'Scan effort: ''normal'' uses lower model reasoning effort
            with larger investigation batches; ''deep'' runs the full pipeline.'
          enum:
          - normal
          - deep
          title: Effort
          type: string
        host:
          anyOf:
          - type: string
          - type: 'null'
          description: Git host of the repository, if known.
          title: Host
        org_id:
          description: Organization the scan belongs to.
          title: Org Id
          type: string
        outpost_pool_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Outpost pool the scan's sessions run on, if one is set.
          title: Outpost Pool Id
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: Hosted platform label the scan's sessions run on. Null when
            the scan runs on an outpost pool or the organization default.
          title: Platform
        profile:
          anyOf:
          - $ref: '#/components/schemas/CodeScanProfileResponse'
          - type: 'null'
          description: Profile the scan ran under, if any.
        repo_full_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Host-qualified identity of the primary repository (e.g. github.com/org/repo).
            Null for Perforce depots, which have no git host.
          title: Repo Full Name
        repo_name:
          description: Primary repository of the scan. Multi-repo scans cover additional
            repositories not listed here.
          title: Repo Name
          type: string
        scan_id:
          description: Unique identifier for the scan.
          title: Scan Id
          type: string
        scan_type:
          description: Type of scan, stamped at creation.
          enum:
          - security
          - performance
          - db-queries
          - test-coverage
          - dead-code
          - code-quality
          - cleanup
          - telemetry
          - accessibility
          - compliance
          - general
          - migration-docs
          title: Scan Type
          type: string
        status:
          description: 'Scan status: waiting, pending, running, awaiting_user_input,
            completed, failed, or cancelled.'
          enum:
          - waiting
          - pending
          - running
          - awaiting_user_input
          - completed
          - failed
          - cancelled
          title: Status
          type: string
        url:
          description: URL of the scan's page in the Devin webapp.
          title: Url
          type: string
      required:
      - scan_id
      - org_id
      - repo_name
      - host
      - status
      - profile
      - scan_type
      - created_at
      - effort
      - url
      title: CodeScanResponse
      type: object
    ConsumptionByDateResponse:
      properties:
        acus:
          title: Acus
          type: number
        acus_by_product:
          $ref: '#/components/schemas/AcusByProduct'
        date:
          title: Date
          type: integer
      required:
      - date
      - acus
      - acus_by_product
      title: ConsumptionByDateResponse
      type: object
    ConsumptionCycle:
      properties:
        after:
          title: After
          type: integer
        before:
          title: Before
          type: integer
      required:
      - before
      - after
      title: ConsumptionCycle
      type: object
    ConsumptionResponse:
      properties:
        consumption_by_date:
          items:
            $ref: '#/components/schemas/ConsumptionByDateResponse'
          title: Consumption By Date
          type: array
        total_acus:
          title: Total Acus
          type: number
      required:
      - total_acus
      - consumption_by_date
      title: ConsumptionResponse
      type: object
    CreateApiKeyRequest:
      properties:
        expires_at:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional expiration as a UNIX timestamp in seconds. Must be
            in the future if provided.
          title: Expires At
        name:
          maxLength: 256
          minLength: 1
          title: Name
          type: string
      required:
      - name
      title: CreateApiKeyRequest
      type: object
    CreateEnterpriseBlueprintBody:
      properties:
        contents:
          anyOf:
          - type: string
          - type: 'null'
          description: YAML body for the new blueprint. Omit to create an empty blueprint.
          title: Contents
      title: CreateEnterpriseBlueprintBody
      type: object
    CreateOrgBlueprintBody:
      properties:
        contents:
          anyOf:
          - type: string
          - type: 'null'
          description: Optional initial YAML body for the blueprint. Not allowed with
            source='git' (contents come from the repo).
          title: Contents
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: If set, creates a repo-tier blueprint for that repository.
            If omitted, creates an org-wide (org-tier) blueprint.
          title: Repo Name
        source:
          anyOf:
          - enum:
            - git
            - database
            type: string
          - type: 'null'
          description: Repo-tier only. 'git' reads .devin/blueprint.yaml (and its
            includes) from the repo's default branch and keeps the blueprint in sync
            with it; 'database' stores the YAML in Devin. Defaults to 'database' when
            omitted.
          title: Source
      title: CreateOrgBlueprintBody
      type: object
    CursorPaginationParams:
      properties:
        after:
          anyOf:
          - type: string
          - type: 'null'
          title: After
        first:
          default: 100
          maximum: 200.0
          minimum: 1.0
          title: First
          type: integer
      title: CursorPaginationParams
      type: object
    DefaultTagRequest:
      properties:
        tag:
          title: Tag
          type: string
      required:
      - tag
      title: DefaultTagRequest
      type: object
    DefaultTagResponse:
      properties:
        default_tag:
          anyOf:
          - type: string
          - type: 'null'
          title: Default Tag
      required:
      - default_tag
      title: DefaultTagResponse
      type: object
    DevinBrainUserSelf:
      description: Identity information for an authenticated Devin brain session.
      properties:
        creator_service_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Creator Service User Id
        devin_id:
          title: Devin Id
          type: string
        org_id:
          title: Org Id
          type: string
        principal_type:
          const: devin_brain
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
      required:
      - principal_type
      - devin_id
      - org_id
      - user_id
      title: DevinBrainUserSelf
      type: object
    DollarsByProduct:
      properties:
        cascade:
          title: Cascade
          type: number
        terminal:
          title: Terminal
          type: number
      required:
      - cascade
      - terminal
      title: DollarsByProduct
      type: object
    EnterpriseUser:
      properties:
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        enterprise_joined_at:
          anyOf:
          - type: integer
          - type: 'null'
          description: When the user was added to this enterprise.
          title: Enterprise Joined At
        idp_identities:
          anyOf:
          - items:
              $ref: '#/components/schemas/IdpIdentity'
            type: array
          - type: 'null'
          description: The user's identities on the enterprise's SSO connections.
            Only returned when enabled for the enterprise.
          title: Idp Identities
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - role_assignments
      title: EnterpriseUser
      type: object
    EnterpriseUserWithIdpRoles:
      properties:
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        enterprise_joined_at:
          anyOf:
          - type: integer
          - type: 'null'
          description: When the user was added to this enterprise.
          title: Enterprise Joined At
        idp_identities:
          anyOf:
          - items:
              $ref: '#/components/schemas/IdpIdentity'
            type: array
          - type: 'null'
          description: The user's identities on the enterprise's SSO connections.
            Only returned when enabled for the enterprise.
          title: Idp Identities
        idp_role_assignments:
          items:
            $ref: '#/components/schemas/IdpRoleAssignment'
          title: Idp Role Assignments
          type: array
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - role_assignments
      title: EnterpriseUserWithIdpRoles
      type: object
    FolderSummary:
      description: One folder in the knowledge folder tree.
      properties:
        folder_id:
          title: Folder Id
          type: string
        name:
          title: Name
          type: string
        note_count:
          title: Note Count
          type: integer
        parent_folder_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Parent Folder Id
        path:
          title: Path
          type: string
      required:
      - folder_id
      - name
      - path
      - note_count
      title: FolderSummary
      type: object
    FolderTreeResponse:
      description: Response for the folder-structure endpoint.
      properties:
        folders:
          items:
            $ref: '#/components/schemas/FolderSummary'
          title: Folders
          type: array
        root_note_count:
          title: Root Note Count
          type: integer
      required:
      - folders
      - root_note_count
      title: FolderTreeResponse
      type: object
    GitConnectionRepositoryResponse:
      properties:
        git_connection_host:
          title: Git Connection Host
          type: string
        git_connection_id:
          title: Git Connection Id
          type: string
        last_updated_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Updated At
        provider_repository_id:
          title: Provider Repository Id
          type: string
        repo_description:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Description
        repo_full_name:
          description: 'Devin''s identifier for the repository, used as repository_path
            by the indexing and blueprint endpoints: the path for github.com (e.g.
            ''org/repo''), host-prefixed for other git hosts (e.g. ''gitlab.example.com/group/repo''),
            or a perforce:// URI.'
          title: Repo Full Name
          type: string
        repo_language:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Language
        repo_name:
          title: Repo Name
          type: string
        repo_path:
          title: Repo Path
          type: string
      required:
      - provider_repository_id
      - git_connection_id
      - git_connection_host
      - repo_name
      - repo_path
      - repo_full_name
      - repo_description
      - last_updated_at
      - repo_language
      title: GitConnectionRepositoryResponse
      type: object
    GitConnectionResponse:
      properties:
        created_at:
          title: Created At
          type: integer
        git_connection_id:
          title: Git Connection Id
          type: string
        git_provider_type:
          enum:
          - github_token
          - github_individual_token
          - github_app
          - gitlab_token
          - gitlab_project_token
          - gitlab_oauth
          - azure_devops_oauth
          - azure_devops_token
          - bitbucket_oauth
          - bitbucket_token
          - bitbucket_cloud_token
          - perforce
          title: Git Provider Type
          type: string
        host:
          title: Host
          type: string
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        perforce_depot_paths:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Depot path scopes for perforce connections, e.g. ["//depot/main/..."].
            Empty list when none are configured. Null for git connections, or for
            a perforce connection whose depot-path lookup failed.
          title: Perforce Depot Paths
        web_viewer_url:
          anyOf:
          - type: string
          - type: 'null'
          description: Base URL of the customer's code viewer (e.g. Helix Swarm) used
            to render browsable file/changelist links
          title: Web Viewer Url
      required:
      - git_connection_id
      - git_provider_type
      - name
      - host
      - created_at
      title: GitConnectionResponse
      type: object
    GitPermissionBulkCreateRequest:
      properties:
        permissions:
          items:
            $ref: '#/components/schemas/GitPermissionCreateRequest'
          maxItems: 200
          title: Permissions
          type: array
      required:
      - permissions
      title: GitPermissionBulkCreateRequest
      type: object
    GitPermissionCreateRequest:
      properties:
        depot_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Depot Path
        git_connection_id:
          title: Git Connection Id
          type: string
        group_prefix:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Prefix
        prefix_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Prefix Path
        read_only:
          default: false
          title: Read Only
          type: boolean
        repo_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Path
      required:
      - git_connection_id
      title: GitPermissionCreateRequest
      type: object
    GitPermissionResponse:
      properties:
        created_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created At
        depot_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Depot Path
        git_connection_id:
          title: Git Connection Id
          type: string
        git_permission_id:
          title: Git Permission Id
          type: string
        group_prefix:
          anyOf:
          - type: string
          - type: 'null'
          title: Group Prefix
        prefix_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Prefix Path
        read_only:
          default: false
          title: Read Only
          type: boolean
        repo_path:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Path
      required:
      - git_permission_id
      - git_connection_id
      title: GitPermissionResponse
      type: object
    GitPermissionUpdateRequest:
      properties:
        read_only:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Read Only
      title: GitPermissionUpdateRequest
      type: object
    GuardrailViolationResponse:
      properties:
        action_taken:
          title: Action Taken
          type: string
        confidence_score:
          title: Confidence Score
          type: number
        created_at:
          title: Created At
          type: integer
        event_id:
          title: Event Id
          type: string
        guardrail_id:
          title: Guardrail Id
          type: string
        guardrail_name:
          title: Guardrail Name
          type: string
        org_id:
          title: Org Id
          type: string
        reasoning:
          title: Reasoning
          type: string
        session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
        user_message:
          title: User Message
          type: string
        violation_id:
          title: Violation Id
          type: integer
      required:
      - violation_id
      - org_id
      - session_id
      - event_id
      - guardrail_id
      - guardrail_name
      - confidence_score
      - action_taken
      - reasoning
      - user_message
      - created_at
      title: GuardrailViolationResponse
      type: object
    HypervisorResponse:
      properties:
        cloud_provider_instance_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Cloud Provider Instance Id
        created_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created At
        hypervisor_id:
          title: Hypervisor Id
          type: string
        last_heartbeat:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Heartbeat
        status:
          title: Status
          type: string
        utilization_percentage:
          title: Utilization Percentage
          type: number
      required:
      - hypervisor_id
      - status
      - utilization_percentage
      - created_at
      - last_heartbeat
      - cloud_provider_instance_id
      title: HypervisorResponse
      type: object
    IdpGroup:
      properties:
        idp_group_name:
          title: Idp Group Name
          type: string
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
      required:
      - idp_group_name
      - role_assignments
      title: IdpGroup
      type: object
    IdpGroupResponse:
      properties:
        idp_group_name:
          title: Idp Group Name
          type: string
      required:
      - idp_group_name
      title: IdpGroupResponse
      type: object
    IdpGroupUpdateRoleRequest:
      properties:
        role_id:
          title: Role Id
          type: string
      required:
      - role_id
      title: IdpGroupUpdateRoleRequest
      type: object
    IdpGroupUser:
      description: A user whose membership is derived from IDP group assignments.
      properties:
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        idp_role_assignments:
          items:
            $ref: '#/components/schemas/IdpRoleAssignment'
          title: Idp Role Assignments
          type: array
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - idp_role_assignments
      title: IdpGroupUser
      type: object
    IdpGroupsBulkCreateRequest:
      properties:
        idp_group_names:
          items:
            type: string
          maxItems: 100
          minItems: 1
          title: Idp Group Names
          type: array
      required:
      - idp_group_names
      title: IdpGroupsBulkCreateRequest
      type: object
    IdpIdentity:
      properties:
        connection_name:
          description: Name of the SSO connection.
          title: Connection Name
          type: string
        subject:
          description: The user's subject identifier at the connection's identity
            provider (SAML NameID or OIDC `sub`).
          title: Subject
          type: string
      required:
      - connection_name
      - subject
      title: IdpIdentity
      type: object
    IdpRoleAssignment:
      description: A role assignment inherited via IDP group membership.
      properties:
        idp_group_name:
          title: Idp Group Name
          type: string
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        role:
          $ref: '#/components/schemas/Role'
      required:
      - role
      - idp_group_name
      title: IdpRoleAssignment
      type: object
    IndexRepositoryRequest:
      properties:
        branch_names:
          items:
            type: string
          title: Branch Names
          type: array
      title: IndexRepositoryRequest
      type: object
    IpAccessListAddRequest:
      properties:
        ip_ranges:
          items:
            type: string
          title: Ip Ranges
          type: array
      required:
      - ip_ranges
      title: IpAccessListAddRequest
      type: object
    IpAccessListReplaceRequest:
      properties:
        ip_ranges:
          items:
            type: string
          title: Ip Ranges
          type: array
      required:
      - ip_ranges
      title: IpAccessListReplaceRequest
      type: object
    IpAccessListResponse:
      properties:
        ip_ranges:
          items:
            type: string
          title: Ip Ranges
          type: array
      required:
      - ip_ranges
      title: IpAccessListResponse
      type: object
    KnowledgeNoteCreateRequest:
      properties:
        body:
          title: Body
          type: string
        folder_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Folder Id
        is_enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Enabled
        name:
          title: Name
          type: string
        pinned_repo:
          anyOf:
          - type: string
          - type: 'null'
          title: Pinned Repo
        trigger:
          title: Trigger
          type: string
      required:
      - name
      - body
      - trigger
      title: KnowledgeNoteCreateRequest
      type: object
    KnowledgeNoteResponse:
      properties:
        access_type:
          enum:
          - enterprise
          - org
          title: Access Type
          type: string
        body:
          title: Body
          type: string
        created_at:
          title: Created At
          type: integer
        folder_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Folder Id
        folder_path:
          title: Folder Path
          type: string
        is_enabled:
          title: Is Enabled
          type: boolean
        macro:
          anyOf:
          - type: string
          - type: 'null'
          title: Macro
        name:
          title: Name
          type: string
        note_id:
          title: Note Id
          type: string
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        pinned_repo:
          anyOf:
          - type: string
          - type: 'null'
          title: Pinned Repo
        trigger:
          title: Trigger
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
      - note_id
      - folder_id
      - folder_path
      - name
      - body
      - trigger
      - is_enabled
      - created_at
      - updated_at
      - access_type
      - org_id
      - macro
      - pinned_repo
      title: KnowledgeNoteResponse
      type: object
    NewScanBudget:
      properties:
        acu_limit:
          description: Per-cycle ACU limit of a new budget that pays for the scan,
            its child sessions and its remediations.
          maximum: 1000000.0
          minimum: 0.0
          title: Acu Limit
          type: integer
      required:
      - acu_limit
      title: NewScanBudget
      type: object
    OrgCodeScanCreateRequest:
      description: Request body for starting a new code scan.
      properties:
        commit_sha:
          anyOf:
          - type: string
          - type: 'null'
          description: Commit to check out before scanning.
          title: Commit Sha
        devin_mode:
          anyOf:
          - enum:
            - fusion
            - swe-2
            type: string
          - type: 'null'
          description: 'Agent the scan''s sessions run on: ''fusion'' or ''swe-2''
            (SWE-2 Max for ''deep'' effort, SWE-2 High for ''normal''). Applies only
            when the mode is enabled for the organization; otherwise, and when omitted,
            the scan runs on the default agent.'
          title: Devin Mode
        effort:
          anyOf:
          - enum:
            - normal
            - deep
            type: string
          - type: 'null'
          description: 'Scan effort: ''normal'' (default) uses lower model reasoning
            effort with larger investigation batches; ''deep'' runs the full pipeline.'
          title: Effort
        host:
          anyOf:
          - type: string
          - type: 'null'
          description: Git host of the repository, if known.
          title: Host
        interactive:
          default: false
          description: When true, the scan pauses for user review between threat modeling
            and investigation.
          title: Interactive
          type: boolean
        locale:
          anyOf:
          - type: string
          - type: 'null'
          description: 'BCP-47 language tag (e.g. ''ja'') for the scan''s user-facing
            output: finding titles, descriptions, and reports. Omitted means English.'
          title: Locale
        new_budget:
          anyOf:
          - $ref: '#/components/schemas/NewScanBudget'
          - type: 'null'
          description: Give the scan its own ACU budget. Requires the ManageAccountServiceUsers
            and ManageAcuLimits permissions.
        platform:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          description: 'Where the scan''s sessions run: a platform label configured
            for the organization (e.g. ''linux'', ''windows'', ''macos'') or the name
            of an outpost (BYOB) pool, case-insensitive; platforms take priority when
            a name matches both. Omitted means the organization default. Unrecognized
            values are rejected with a 400 whose error body lists the available platform
            labels and outpost pool names.'
          title: Platform
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Scan profile to apply to the scan.
          title: Profile Id
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Full name of the repository to scan. Provide exactly one of
            repo_name or repos.
          title: Repo Name
        repos:
          anyOf:
          - items:
              $ref: '#/components/schemas/ScanRepoRequest'
            maxItems: 200
            type: array
          - type: 'null'
          description: Repositories covered by one scan; the first entry is the scan's
            primary repository. Provide exactly one of repo_name or repos.
          title: Repos
        scan_type:
          anyOf:
          - enum:
            - security
            - performance
            - db-queries
            - test-coverage
            - dead-code
            - code-quality
            - cleanup
            - telemetry
            - accessibility
            - compliance
            - general
            - migration-docs
            type: string
          - type: 'null'
          description: Type of scan to run. Must match the profile's scan type when
            a profile is given; defaults to the profile's type, or 'security' for
            profile-less scans. Non-security types require a profile and are rejected
            without one.
          title: Scan Type
      title: OrgCodeScanCreateRequest
      type: object
    OrgDefaultPlatformResponse:
      description: The organization's default placement for new sessions.
      properties:
        outpost_pool_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Outpost pool new sessions run on by default. Null when the
            default is a hosted platform or unset.
          title: Outpost Pool Id
        outpost_pool_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Name of the default outpost pool. Null when the default is
            not an outpost pool, or the pool is no longer available to the organization.
          title: Outpost Pool Name
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: Hosted platform label (e.g. 'linux', 'windows') new sessions
            run on by default. Null when the default is an outpost pool or unset.
          title: Platform
      required:
      - platform
      - outpost_pool_id
      - outpost_pool_name
      title: OrgDefaultPlatformResponse
      type: object
    OrgDefaultPlatformUpdateRequest:
      description: 'Set the organization''s default placement for new sessions.


        Send at most one of ``platform`` and ``outpost_pool_id``; send both as

        null (for example ``{}``) to clear the default.'
      properties:
        outpost_pool_id:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          description: ID of a shared outpost pool available to the organization.
          title: Outpost Pool Id
        platform:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          description: A hosted platform label configured for the organization (e.g.
            'linux', 'windows', 'macos') or the name of a shared outpost pool, case-insensitive;
            platforms take priority when a name matches both. Unrecognized values
            are rejected with a 400 that lists the available platforms and outpost
            pools.
          title: Platform
      title: OrgDefaultPlatformUpdateRequest
      type: object
    OrgGroupConfig:
      properties:
        max_cycle_acus:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acus
        org_ids:
          items:
            type: string
          title: Org Ids
          type: array
          uniqueItems: true
      required:
      - org_ids
      title: OrgGroupConfig
      type: object
    OrgGroupsConfig:
      description: Configuration mapping group names to their settings.
      properties:
        groups:
          additionalProperties:
            $ref: '#/components/schemas/OrgGroupConfig'
          title: Groups
          type: object
      required:
      - groups
      title: OrgGroupsConfig
      type: object
    OrganizationCreateRequest:
      properties:
        max_cycle_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acu Limit
        max_session_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Session Acu Limit
        name:
          title: Name
          type: string
      required:
      - name
      title: OrganizationCreateRequest
      type: object
    OrganizationResponse:
      properties:
        created_at:
          title: Created At
          type: integer
        max_cycle_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acu Limit
        max_session_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Session Acu Limit
        name:
          title: Name
          type: string
        org_id:
          title: Org Id
          type: string
        updated_at:
          title: Updated At
          type: integer
      required:
      - org_id
      - name
      - created_at
      - updated_at
      - max_session_acu_limit
      - max_cycle_acu_limit
      title: OrganizationResponse
      type: object
    OrganizationUpdateRequest:
      properties:
        max_cycle_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Cycle Acu Limit
        max_session_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Session Acu Limit
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
      title: OrganizationUpdateRequest
      type: object
    PaginatedResponse_ACULimitResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ACULimitResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[ACULimitResponse]
      type: object
    PaginatedResponse_ApiKeyResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ApiKeyResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[ApiKeyResponse]
      type: object
    PaginatedResponse_AuditLogResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/AuditLogResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[AuditLogResponse]
      type: object
    PaginatedResponse_AutomationResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/AutomationResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[AutomationResponse]
      type: object
    PaginatedResponse_Build_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/Build'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[Build]
      type: object
    PaginatedResponse_CodeScanFindingResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/CodeScanFindingResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[CodeScanFindingResponse]
      type: object
    PaginatedResponse_CodeScanProfileSummaryResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/CodeScanProfileSummaryResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[CodeScanProfileSummaryResponse]
      type: object
    PaginatedResponse_CodeScanResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/CodeScanResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[CodeScanResponse]
      type: object
    PaginatedResponse_ConsumptionCycle_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ConsumptionCycle'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[ConsumptionCycle]
      type: object
    PaginatedResponse_EnterpriseUser_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/EnterpriseUser'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[EnterpriseUser]
      type: object
    PaginatedResponse_GitConnectionRepositoryResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GitConnectionRepositoryResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[GitConnectionRepositoryResponse]
      type: object
    PaginatedResponse_GitConnectionResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GitConnectionResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[GitConnectionResponse]
      type: object
    PaginatedResponse_GitPermissionResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GitPermissionResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[GitPermissionResponse]
      type: object
    PaginatedResponse_GuardrailViolationResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/GuardrailViolationResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[GuardrailViolationResponse]
      type: object
    PaginatedResponse_HypervisorResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/HypervisorResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[HypervisorResponse]
      type: object
    PaginatedResponse_IdpGroupResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/IdpGroupResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[IdpGroupResponse]
      type: object
    PaginatedResponse_IdpGroupUser_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/IdpGroupUser'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[IdpGroupUser]
      type: object
    PaginatedResponse_IdpGroup_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/IdpGroup'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[IdpGroup]
      type: object
    PaginatedResponse_KnowledgeNoteResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/KnowledgeNoteResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[KnowledgeNoteResponse]
      type: object
    PaginatedResponse_OrganizationResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/OrganizationResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[OrganizationResponse]
      type: object
    PaginatedResponse_PlaybookResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/PlaybookResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[PlaybookResponse]
      type: object
    PaginatedResponse_RepositoryIndexingResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/RepositoryIndexingResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[RepositoryIndexingResponse]
      type: object
    PaginatedResponse_RepositoryResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/RepositoryResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[RepositoryResponse]
      type: object
    PaginatedResponse_Role_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/Role'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[Role]
      type: object
    PaginatedResponse_ScheduleResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ScheduleResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[ScheduleResponse]
      type: object
    PaginatedResponse_SecretResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SecretResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[SecretResponse]
      type: object
    PaginatedResponse_ServiceUser_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/ServiceUser'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[ServiceUser]
      type: object
    PaginatedResponse_SessionInsightsResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionInsightsResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[SessionInsightsResponse]
      type: object
    PaginatedResponse_SessionMessage_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionMessage'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[SessionMessage]
      type: object
    PaginatedResponse_SessionResponse_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/SessionResponse'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[SessionResponse]
      type: object
    PaginatedResponse_User_:
      properties:
        end_cursor:
          anyOf:
          - type: string
          - type: 'null'
          description: Cursor to fetch the next page, or None if this is the last
            page.
          title: End Cursor
        has_next_page:
          default: false
          description: Whether there are more items available after this page.
          title: Has Next Page
          type: boolean
        items:
          items:
            $ref: '#/components/schemas/User'
          title: Items
          type: array
        total:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional total count (can be omitted for performance).
          title: Total
      required:
      - items
      title: PaginatedResponse[User]
      type: object
    PatUserSelf:
      description: Identity information for an authenticated PAT user.
      properties:
        api_key_id:
          title: Api Key Id
          type: string
        api_key_name:
          title: Api Key Name
          type: string
        devin_sessions_org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Organization the caller''s Devin Cloud sessions run in: the
            one named with x-cog-org-id, or without it the first organization visible
            to the user. Either way only an organization in which the user may use
            Devin sessions, and never an enterprise''s primary organization. Null
            when there is none.'
          title: Devin Sessions Org Id
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        primary_billing_org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Organization the user''s CLI and Desktop usage is billed to:
            the account''s organization, or in an enterprise the user''s primary billing
            organization. Null when there is none or the user may not use Devin sessions
            in it.'
          title: Primary Billing Org Id
        principal_type:
          const: pat_user
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
        user_name:
          title: User Name
          type: string
      required:
      - principal_type
      - user_id
      - user_name
      - api_key_id
      - api_key_name
      title: PatUserSelf
      type: object
    PinBuildBody:
      description: '``POST /builds/{id}/pin`` body. Empty per spec.'
      properties: {}
      title: PinBuildBody
      type: object
    PlaybookCreateRequest:
      properties:
        body:
          title: Body
          type: string
        macro:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Playbook macro identifier. Must start with ''!'' followed
            by one or more letters, digits, underscores, or hyphens. Example: ''!my_macro''
            or ''!my-macro'''
          title: Macro
        structured_output_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          description: JSON Schema (Draft 7) that sessions using this playbook will
            produce as structured output. Max 64KB. Must be self-contained (no external
            $ref).
          title: Structured Output Schema
        title:
          title: Title
          type: string
      required:
      - title
      - body
      title: PlaybookCreateRequest
      type: object
    PlaybookInfo:
      properties:
        playbook_id:
          title: Playbook Id
          type: string
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      required:
      - playbook_id
      - title
      title: PlaybookInfo
      type: object
    PlaybookResponse:
      properties:
        access_type:
          enum:
          - enterprise
          - org
          title: Access Type
          type: string
        body:
          title: Body
          type: string
        created_at:
          title: Created At
          type: integer
        created_by:
          title: Created By
          type: string
        macro:
          anyOf:
          - type: string
          - type: 'null'
          title: Macro
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        playbook_id:
          title: Playbook Id
          type: string
        structured_output_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Structured Output Schema
        title:
          title: Title
          type: string
        updated_at:
          title: Updated At
          type: integer
        updated_by:
          title: Updated By
          type: string
      required:
      - playbook_id
      - title
      - body
      - macro
      - created_by
      - updated_by
      - created_at
      - updated_at
      - access_type
      - org_id
      title: PlaybookResponse
      type: object
    PrMetricsResponse:
      description: Response model for PR metrics.
      properties:
        prs_closed_count:
          description: PRs Devin authored that were closed without merging.
          title: Prs Closed Count
          type: integer
        prs_created_count:
          description: Total PRs Devin authored across all states (open + merged +
            closed).
          title: Prs Created Count
          type: integer
        prs_merged_count:
          description: PRs Devin authored that were merged.
          title: Prs Merged Count
          type: integer
        prs_opened_count:
          description: PRs Devin authored that are currently open.
          title: Prs Opened Count
          type: integer
        prs_taken_over_closed_count:
          default: 0
          description: PRs Devin took over that were closed without merging.
          title: Prs Taken Over Closed Count
          type: integer
        prs_taken_over_count:
          default: 0
          description: Total PRs Devin took over across all states (open + merged
            + closed). A take-over is when Devin pushed commits to a PR it did not
            originally create.
          title: Prs Taken Over Count
          type: integer
        prs_taken_over_merged_count:
          default: 0
          description: PRs Devin took over that were merged.
          title: Prs Taken Over Merged Count
          type: integer
        prs_taken_over_opened_count:
          default: 0
          description: PRs Devin took over that are currently open.
          title: Prs Taken Over Opened Count
          type: integer
      required:
      - prs_created_count
      - prs_opened_count
      - prs_merged_count
      - prs_closed_count
      title: PrMetricsResponse
      type: object
    PrReviewCreateRequest:
      properties:
        pr_url:
          description: Full URL of the pull/merge request to review (e.g. `https://github.com/owner/repo/pull/123`).
          examples:
          - https://github.com/owner/repo/pull/123
          title: Pr Url
          type: string
      required:
      - pr_url
      title: PrReviewCreateRequest
      type: object
    PrReviewResponse:
      properties:
        commit_sha:
          description: Commit SHA of the PR head that will be reviewed.
          title: Commit Sha
          type: string
        created_at:
          description: When the review was accepted.
          format: date-time
          title: Created At
          type: string
        pr_number:
          description: Pull/merge request number.
          title: Pr Number
          type: integer
        repo_path:
          description: Normalized host-prefixed repo path (e.g. `github.com/owner/repo`).
          title: Repo Path
          type: string
        status:
          description: Current review status. Newly accepted reviews start as `pending`.
          enum:
          - pending
          - running
          - completed
          - errored
          - cancelled
          - skipped
          title: Status
          type: string
      required:
      - status
      - repo_path
      - pr_number
      - commit_sha
      - created_at
      title: PrReviewResponse
      type: object
    PresignedDownload:
      description: Reusable presigned-URL response (10-minute TTL).
      properties:
        expires_at:
          description: Unix timestamp at which the URL expires.
          title: Expires At
          type: integer
        url:
          description: Presigned GET URL (HTTPS).
          title: Url
          type: string
      required:
      - url
      - expires_at
      title: PresignedDownload
      type: object
    ProblemDetail:
      description: 'RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat; the

        other members are additive. errors carries field-level validation failures

        (422 only).'
      properties:
        detail:
          anyOf:
          - type: string
          - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        error_code:
          anyOf:
          - type: string
          - type: 'null'
          description: Machine-readable code for blocked-action refusals (e.g. "user_frozen",
            "migrated_session").
          title: Error Code
        errors:
          anyOf:
          - items:
              additionalProperties: true
              type: object
            type: array
          - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
          - type: string
          - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
      - title
      - status
      title: ProblemDetail
      type: object
    QueueResponse:
      description: Response model for queue endpoint.
      properties:
        queue_size:
          title: Queue Size
          type: integer
        status:
          enum:
          - normal
          - elevated
          - high
          title: Status
          type: string
      required:
      - queue_size
      - status
      title: QueueResponse
      type: object
    RemediateFindingResponse:
      description: The remediation session launched for a code scan finding.
      properties:
        finding_id:
          description: The finding that is being remediated.
          title: Finding Id
          type: string
        session_id:
          description: ID of the Devin session launched to remediate the finding.
          title: Session Id
          type: string
      required:
      - finding_id
      - session_id
      title: RemediateFindingResponse
      type: object
    RemediateFindingsRequest:
      description: 'Findings of one scan to hand to a single Devin session.


        Provide exactly one of ``finding_ids`` or ``select_all``.'
      properties:
        exclude_finding_ids:
          description: 'With `select_all`: findings to leave out of the selection.'
          items:
            type: string
          maxItems: 1000
          title: Exclude Finding Ids
          type: array
        finding_ids:
          anyOf:
          - items:
              type: string
            maxItems: 1000
            minItems: 1
            type: array
          - type: 'null'
          description: Findings to remediate together; all must belong to the scan
            and be open, and may span repositories.
          title: Finding Ids
        select_all:
          anyOf:
          - $ref: '#/components/schemas/RemediateFindingsSelection'
          - type: 'null'
          description: Remediate every open finding of the scan matching these filters
            that does not already have a remediation session, minus `exclude_finding_ids`.
            Findings the filters match but which are closed or already being remediated
            are skipped and counted in `skipped_count`. Fails with 400 when more than
            1000 findings match.
      title: RemediateFindingsRequest
      type: object
    RemediateFindingsResponse:
      description: The Devin session launched for a batch of code scan findings.
      properties:
        finding_ids:
          description: 'The findings being remediated: in request order for `finding_ids`,
            by severity (critical first) for `select_all`.'
          items:
            type: string
          title: Finding Ids
          type: array
        session_id:
          description: ID of the Devin session launched for the findings. A batch
            of two or more findings gets a planner session that groups them and launches
            a fix session (one branch, one pull request) per group; each finding's
            `session_id` and `pr_url` then point at its fix session. A single finding
            gets a fix session directly.
          title: Session Id
          type: string
        skipped_count:
          default: 0
          description: Findings matched by `select_all` but left out because they
            are closed or already have a remediation session. Always 0 for `finding_ids`.
          title: Skipped Count
          type: integer
      required:
      - finding_ids
      - session_id
      title: RemediateFindingsResponse
      type: object
    RemediateFindingsSelection:
      additionalProperties: false
      description: Filters selecting every remediable finding of a scan.
      properties:
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Only findings reported in this repository.
          title: Repo Name
        severity:
          anyOf:
          - items:
              enum:
              - critical
              - high
              - medium
              - low
              type: string
            maxItems: 4
            minItems: 1
            type: array
          - type: 'null'
          description: Only findings with any of these severities (critical, high,
            medium, low).
          title: Severity
      title: RemediateFindingsSelection
      type: object
    RemoveRepositoriesRequest:
      properties:
        repository_paths:
          items:
            type: string
          maxItems: 100
          minItems: 1
          title: Repository Paths
          type: array
      required:
      - repository_paths
      title: RemoveRepositoriesRequest
      type: object
    RepoIndexJobResponse:
      properties:
        branch_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Branch Name
        commit:
          title: Commit
          type: string
        created_at:
          title: Created At
          type: integer
        job_id:
          title: Job Id
          type: string
        status:
          enum:
          - failed
          - completed
          - in_progress
          title: Status
          type: string
      required:
      - job_id
      - status
      - commit
      - branch_name
      - created_at
      title: RepoIndexJobResponse
      type: object
    RepoIndexingStatusResponse:
      properties:
        indexing_enabled:
          title: Indexing Enabled
          type: boolean
        latest_completed_search_index_job:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexJobResponse'
          - type: 'null'
        latest_completed_wiki_index_job:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexJobResponse'
          - type: 'null'
        latest_indexes:
          items:
            $ref: '#/components/schemas/RepoIndexJobResponse'
          title: Latest Indexes
          type: array
      required:
      - indexing_enabled
      - latest_indexes
      - latest_completed_search_index_job
      - latest_completed_wiki_index_job
      title: RepoIndexingStatusResponse
      type: object
    RepositoryIndexingItem:
      properties:
        branch_names:
          items:
            type: string
          title: Branch Names
          type: array
        repository_path:
          description: e.g., 'org/repo-name'
          title: Repository Path
          type: string
      required:
      - repository_path
      title: RepositoryIndexingItem
      type: object
    RepositoryIndexingResponse:
      properties:
        branches:
          items:
            type: string
          title: Branches
          type: array
        indexing_enabled:
          title: Indexing Enabled
          type: boolean
        indexing_status:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexingStatusResponse'
          - type: 'null'
        repository_path:
          title: Repository Path
          type: string
      required:
      - repository_path
      - indexing_enabled
      - branches
      title: RepositoryIndexingResponse
      type: object
    RepositoryResponse:
      properties:
        git_connection_host:
          title: Git Connection Host
          type: string
        git_connection_id:
          title: Git Connection Id
          type: string
        indexing_status:
          anyOf:
          - $ref: '#/components/schemas/RepoIndexingStatusResponse'
          - type: 'null'
        last_updated_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Updated At
        provider_repository_id:
          title: Provider Repository Id
          type: string
        repo_description:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Description
        repo_full_name:
          description: 'Devin''s identifier for the repository, used as repository_path
            by the indexing and blueprint endpoints: the path for github.com (e.g.
            ''org/repo''), host-prefixed for other git hosts (e.g. ''gitlab.example.com/group/repo''),
            or a perforce:// URI.'
          title: Repo Full Name
          type: string
        repo_language:
          anyOf:
          - type: string
          - type: 'null'
          title: Repo Language
        repo_name:
          title: Repo Name
          type: string
        repo_path:
          title: Repo Path
          type: string
      required:
      - provider_repository_id
      - git_connection_id
      - git_connection_host
      - repo_name
      - repo_path
      - repo_full_name
      - repo_description
      - last_updated_at
      - repo_language
      - indexing_status
      title: RepositoryResponse
      type: object
    Role:
      properties:
        role_id:
          title: Role Id
          type: string
        role_name:
          title: Role Name
          type: string
        role_type:
          enum:
          - enterprise
          - org
          title: Role Type
          type: string
      required:
      - role_name
      - role_id
      - role_type
      title: Role
      type: object
    RoleAssignment:
      properties:
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        role:
          $ref: '#/components/schemas/Role'
      required:
      - role
      title: RoleAssignment
      type: object
    RoleDetailResponse:
      properties:
        permissions:
          description: List of permission identifiers granted to this role.
          items:
            type: string
          title: Permissions
          type: array
        role_id:
          title: Role Id
          type: string
        role_name:
          title: Role Name
          type: string
        role_type:
          enum:
          - enterprise
          - org
          title: Role Type
          type: string
      required:
      - role_name
      - role_id
      - role_type
      title: RoleDetailResponse
      type: object
    RotateApiKeyRequest:
      properties:
        new_key_expires_at:
          anyOf:
          - type: integer
          - type: 'null'
          description: Optional expiration for the new key as a UNIX timestamp in
            seconds. Null for no expiration.
          title: New Key Expires At
        revoke_current:
          default: true
          description: Whether to revoke the current key. Set to False for graceful
            rollover.
          title: Revoke Current
          type: boolean
      title: RotateApiKeyRequest
      type: object
    ScanNewCommitsResponse:
      description: An incremental (diff) scan run recorded for a code scan.
      properties:
        scan_id:
          description: The scan the incremental run belongs to.
          title: Scan Id
          type: string
        status:
          description: 'Scan status after the request: ``waiting`` once the run is
            enqueued, or ``completed`` when no new commits landed since the last scan
            and the run was recorded without starting a session.'
          title: Status
          type: string
      required:
      - scan_id
      - status
      title: ScanNewCommitsResponse
      type: object
    ScanRepoRequest:
      description: A repository to include in a multi-repo scan.
      properties:
        host:
          anyOf:
          - type: string
          - type: 'null'
          description: Git host of the repository, if known.
          title: Host
        repo_name:
          description: Full name of the repository to scan.
          title: Repo Name
          type: string
      required:
      - repo_name
      title: ScanRepoRequest
      type: object
    ScheduleCreateRequest:
      properties:
        agent:
          default: devin
          enum:
          - devin
          - data_analyst
          title: Agent
          type: string
        bypass_approval:
          default: false
          title: Bypass Approval
          type: boolean
        create_as_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Create As User Id
        frequency:
          anyOf:
          - type: string
          - type: 'null'
          title: Frequency
        interval_count:
          default: 1
          title: Interval Count
          type: integer
        name:
          title: Name
          type: string
        notify_on:
          default: failure
          enum:
          - always
          - failure
          - never
          title: Notify On
          type: string
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: VM platform for sessions spawned by this schedule (e.g. 'windows').
            When omitted, sessions fall back to the org's default platform at trigger
            time. Value must match a platform configured for the organization (case-insensitive);
            unknown values are rejected with a 400 that lists the available platform
            labels.
          title: Platform
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        prompt:
          title: Prompt
          type: string
        schedule_type:
          default: recurring
          enum:
          - recurring
          - one_time
          title: Schedule Type
          type: string
        scheduled_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Scheduled At
        skill_ref:
          anyOf:
          - $ref: '#/components/schemas/SkillReference'
          - type: 'null'
          description: Exact skill the sessions run with. Use instead of playbook_id
            for new configurations.
        slack_channel_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Devin Id
      required:
      - name
      - prompt
      title: ScheduleCreateRequest
      type: object
    ScheduleResponse:
      properties:
        agent:
          enum:
          - devin
          - data_analyst
          title: Agent
          type: string
        bypass_approval:
          default: false
          title: Bypass Approval
          type: boolean
        consecutive_failures:
          title: Consecutive Failures
          type: integer
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By
        enabled:
          title: Enabled
          type: boolean
        frequency:
          anyOf:
          - type: string
          - type: 'null'
          title: Frequency
        interval_count:
          default: 1
          title: Interval Count
          type: integer
        last_edited_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Edited By
        last_error_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Error At
        last_error_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Error Message
        last_executed_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Last Executed At
        name:
          title: Name
          type: string
        notify_on:
          enum:
          - always
          - failure
          - never
          title: Notify On
          type: string
        org_id:
          title: Org Id
          type: string
        platform:
          anyOf:
          - type: string
          - type: 'null'
          title: Platform
        playbook:
          anyOf:
          - $ref: '#/components/schemas/PlaybookInfo'
          - type: 'null'
        prompt:
          title: Prompt
          type: string
        schedule_type:
          default: recurring
          enum:
          - recurring
          - one_time
          title: Schedule Type
          type: string
        scheduled_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Scheduled At
        scheduled_session_id:
          title: Scheduled Session Id
          type: string
        skill_ref:
          anyOf:
          - $ref: '#/components/schemas/SkillReference'
          - type: 'null'
          description: Exact skill the sessions run with. Use instead of playbook_id
            for new configurations.
        slack_channel_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Devin Id
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
      - scheduled_session_id
      - org_id
      - created_by
      - name
      - prompt
      - playbook
      - frequency
      - enabled
      - last_executed_at
      - created_at
      - updated_at
      - last_error_at
      - last_error_message
      - consecutive_failures
      - notify_on
      - agent
      title: ScheduleResponse
      type: object
    ScheduleUpdateRequest:
      properties:
        agent:
          anyOf:
          - enum:
            - devin
            - data_analyst
            type: string
          - type: 'null'
          title: Agent
        bypass_approval:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Bypass Approval
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
        frequency:
          anyOf:
          - type: string
          - type: 'null'
          title: Frequency
        interval_count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Interval Count
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        notify_on:
          anyOf:
          - enum:
            - always
            - failure
            - never
            type: string
          - type: 'null'
          title: Notify On
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: VM platform for sessions spawned by this schedule (e.g. 'windows').
            When omitted, the platform is left unchanged. Value must match a platform
            configured for the organization (case-insensitive); unknown values are
            rejected with a 400 that lists the available platform labels.
          title: Platform
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        prompt:
          anyOf:
          - type: string
          - type: 'null'
          title: Prompt
        run_as_user_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Set the user ID that this schedule will run as. Requires ImpersonateOrgSessions
            permission. Setting to null reverts to the default bot user. Omitting
            the field leaves the current identity unchanged.
          title: Run As User Id
        schedule_type:
          anyOf:
          - enum:
            - recurring
            - one_time
            type: string
          - type: 'null'
          title: Schedule Type
        scheduled_at:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Scheduled At
        skill_ref:
          anyOf:
          - $ref: '#/components/schemas/SkillReference'
          - type: 'null'
          description: Exact skill the sessions run with. Use instead of playbook_id
            for new configurations.
        slack_channel_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Devin Id
      title: ScheduleUpdateRequest
      type: object
    SearchMetricsResponse:
      description: Response model for search metrics.
      properties:
        searches_created_count:
          title: Searches Created Count
          type: integer
      required:
      - searches_created_count
      title: SearchMetricsResponse
      type: object
    SecretCreateRequest:
      properties:
        is_sensitive:
          default: true
          title: Is Sensitive
          type: boolean
        key:
          title: Key
          type: string
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
        type:
          enum:
          - cookie
          - key-value
          - totp
          title: Type
          type: string
        value:
          title: Value
          type: string
      required:
      - type
      - key
      - value
      title: SecretCreateRequest
      type: object
    SecretResponse:
      properties:
        access_type:
          enum:
          - org
          - personal
          title: Access Type
          type: string
        created_at:
          title: Created At
          type: integer
        created_by:
          title: Created By
          type: string
        is_sensitive:
          title: Is Sensitive
          type: boolean
        key:
          anyOf:
          - type: string
          - type: 'null'
          title: Key
        note:
          anyOf:
          - type: string
          - type: 'null'
          title: Note
        secret_id:
          title: Secret Id
          type: string
        secret_type:
          enum:
          - cookie
          - key-value
          - totp
          title: Secret Type
          type: string
        updated_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated At
        updated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By
      required:
      - secret_id
      - key
      - note
      - is_sensitive
      - created_by
      - created_at
      - secret_type
      - access_type
      title: SecretResponse
      type: object
    ServiceUser:
      properties:
        deleted_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Deleted At
        expires_at:
          anyOf:
          - type: integer
          - type: 'null'
          title: Expires At
        name:
          title: Name
          type: string
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        service_user_id:
          title: Service User Id
          type: string
      required:
      - service_user_id
      - name
      - expires_at
      - deleted_at
      - role_assignments
      title: ServiceUser
      type: object
    ServiceUserSelf:
      description: Identity information for an authenticated service user.
      properties:
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
        principal_type:
          const: service_user
          title: Principal Type
          type: string
        service_user_id:
          title: Service User Id
          type: string
        service_user_name:
          title: Service User Name
          type: string
      required:
      - principal_type
      - service_user_id
      - service_user_name
      title: ServiceUserSelf
      type: object
    ServiceUserUpdateRoleRequest:
      properties:
        role_id:
          title: Role Id
          type: string
      required:
      - role_id
      title: ServiceUserUpdateRoleRequest
      type: object
    SessionAttachment:
      description: An attachment sent during a session.
      properties:
        attachment_id:
          title: Attachment Id
          type: string
        content_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Content Type
        name:
          title: Name
          type: string
        source:
          enum:
          - devin
          - user
          title: Source
          type: string
        url:
          title: Url
          type: string
      required:
      - attachment_id
      - name
      - url
      - source
      title: SessionAttachment
      type: object
    SessionCountsByOrigin:
      description: 'Session counts by origin type, exposed on the v3 metrics API.


        A curated subset of `SessionOrigin`: legacy origins (cli,

        vscode_extension, devin_spaces) are intentionally not surfaced.

        Counts for sessions with a `scheduled` DB origin roll into

        `automation` via the canonical `db_origin_to_api` mapping, since

        automations are a superset that schedules will migrate into.'
      properties:
        api:
          default: 0
          title: Api
          type: integer
        automation:
          default: 0
          title: Automation
          type: integer
        code_scan:
          default: 0
          title: Code Scan
          type: integer
        desktop:
          default: 0
          title: Desktop
          type: integer
        jira:
          default: 0
          title: Jira
          type: integer
        linear:
          default: 0
          title: Linear
          type: integer
        slack:
          default: 0
          title: Slack
          type: integer
        teams:
          default: 0
          title: Teams
          type: integer
        webapp:
          default: 0
          title: Webapp
          type: integer
      title: SessionCountsByOrigin
      type: object
    SessionCountsBySize:
      description: Session counts by size category.
      properties:
        l:
          default: 0
          title: L
          type: integer
        m:
          default: 0
          title: M
          type: integer
        s:
          default: 0
          title: S
          type: integer
        xl:
          default: 0
          title: Xl
          type: integer
        xs:
          default: 0
          title: Xs
          type: integer
      title: SessionCountsBySize
      type: object
    SessionCreateRequest:
      properties:
        attachment_urls:
          anyOf:
          - items:
              format: uri
              maxLength: 2083
              minLength: 1
              type: string
            type: array
          - type: 'null'
          title: Attachment Urls
        bypass_approval:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Bypass Approval
        child_playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Child Playbook Id
        create_as_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Create As User Id
        devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - fusion
            - lite
            - ultra
            - swe-2-medium
            - swe-2-high
            - swe-2-max
            type: string
          - type: 'null'
          description: Override the Devin agent mode for the session. 'normal' uses
            the default Agent mode, 'fast' uses Fast mode, 'lite' uses Devin Lite,
            'ultra' uses Devin Ultra, and 'fusion' uses Fusion. The other values select
            the agent mode of the same name in the web app. Preview modes are subject
            to the same feature flag and enterprise agent preview restrictions as
            the web app.
          title: Devin Mode
        knowledge_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Knowledge Ids
        max_acu_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Acu Limit
        platform:
          anyOf:
          - type: string
          - type: 'null'
          description: "Override the VM platform for the session (e.g. 'windows'),\
            \ or the name of an outpost (BYOB) pool to run the session on one of your\
            \ own machines. When omitted (or set to 'inherit'), a session created\
            \ by a parent Devin inherits the parent's placement \u2014 both its platform\
            \ and its outpost pool, so an outpost-placed parent spawns children on\
            \ the same pool; otherwise the organization default is used. Any value\
            \ must match either a platform configured for your organization or an\
            \ outpost pool name (case-insensitive) \u2014 built-in platforms take\
            \ priority when a name matches both, and a personal outpost pool owned\
            \ by the caller takes priority over an account-wide pool with the same\
            \ name. Unrecognized values are rejected with a 400 whose error body lists\
            \ the available platform labels and outpost pool names for the org."
          title: Platform
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        prompt:
          title: Prompt
          type: string
        repos:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Repos
        resumable:
          default: true
          description: Whether to preserve the session's VM state after it stops so
            the session can be resumed. Set to false for disposable sessions.
          title: Resumable
          type: boolean
        secret_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Secret Ids
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/SessionSecurityProfileSelection'
          - type: 'null'
          description: Attach a security profile to this session; omitted = default
            resolution applies (the playbook's security profile when one is bound,
            then the org/enterprise default). Requires the security-profile management
            permission.
        session_links:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Links
        session_secrets:
          anyOf:
          - items:
              $ref: '#/components/schemas/SessionSecretInput'
            type: array
          - type: 'null'
          title: Session Secrets
        structured_output_required:
          anyOf:
          - type: boolean
          - type: 'null'
          description: "When true (default), the agent MUST call provide_structured_output\
            \ with is_final=true before its turn ends. When false, the tool is available\
            \ but not required \u2014 it is not guaranteed to be called in a given\
            \ turn."
          title: Structured Output Required
        structured_output_schema:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          description: JSON Schema (Draft 7) for validating structured output. Max
            64KB. Must be self-contained (no external $ref).
          title: Structured Output Schema
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
      required:
      - prompt
      title: SessionCreateRequest
      type: object
    SessionInsightsActionItem:
      properties:
        action_item:
          title: Action Item
          type: string
        issue_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issue Id
        type:
          default: other
          enum:
          - machine_setup
          - repo_config
          - knowledge
          - prompt_improvement
          - external
          - other
          title: Type
          type: string
      required:
      - action_item
      title: SessionInsightsActionItem
      type: object
    SessionInsightsAnalysis:
      description: AI-generated analysis data from a completed session analysis.
      properties:
        action_items:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsActionItem'
          title: Action Items
          type: array
        classification:
          anyOf:
          - $ref: '#/components/schemas/SessionInsightsClassification'
          - type: 'null'
        issues:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsIssue'
          title: Issues
          type: array
        note_usage:
          anyOf:
          - $ref: '#/components/schemas/SessionInsightsNoteUsage'
          - type: 'null'
        skill_usage:
          anyOf:
          - $ref: '#/components/schemas/SessionInsightsSkillUsage'
          - type: 'null'
        suggested_prompt:
          anyOf:
          - $ref: '#/components/schemas/SessionInsightsSuggestedPrompt'
          - type: 'null'
        timeline:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsTimelineEvent'
          title: Timeline
          type: array
      title: SessionInsightsAnalysis
      type: object
    SessionInsightsClassification:
      properties:
        category:
          title: Category
          type: string
        confidence:
          title: Confidence
          type: number
        programming_languages:
          default: []
          items:
            type: string
          title: Programming Languages
          type: array
        tools_and_frameworks:
          default: []
          items:
            type: string
          title: Tools And Frameworks
          type: array
      required:
      - category
      - confidence
      title: SessionInsightsClassification
      type: object
    SessionInsightsFeedbackItem:
      properties:
        details:
          title: Details
          type: string
        excerpt:
          title: Excerpt
          type: string
        issue_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issue Id
        summary:
          title: Summary
          type: string
      required:
      - summary
      - excerpt
      - details
      title: SessionInsightsFeedbackItem
      type: object
    SessionInsightsGenerateResponse:
      description: Response from triggering session insights generation.
      properties:
        session_id:
          description: The session ID for which insights generation was triggered.
          title: Session Id
          type: string
        status:
          description: The status of the generation request.
          title: Status
          type: string
      required:
      - session_id
      - status
      title: SessionInsightsGenerateResponse
      type: object
    SessionInsightsIssue:
      properties:
        id:
          default: ''
          title: Id
          type: string
        impact:
          title: Impact
          type: string
        issue:
          title: Issue
          type: string
        label:
          title: Label
          type: string
        title:
          default: ''
          title: Title
          type: string
      required:
      - issue
      - impact
      - label
      title: SessionInsightsIssue
      type: object
    SessionInsightsNoteUsage:
      properties:
        bad_usages:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsNoteUsageItem'
          title: Bad Usages
          type: array
        good_usages:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsNoteUsageItem'
          title: Good Usages
          type: array
      title: SessionInsightsNoteUsage
      type: object
    SessionInsightsNoteUsageItem:
      properties:
        message:
          title: Message
          type: string
        note_id:
          title: Note Id
          type: string
        reason:
          title: Reason
          type: string
      required:
      - reason
      - message
      - note_id
      title: SessionInsightsNoteUsageItem
      type: object
    SessionInsightsResponse:
      description: 'Session details augmented with quantitative metrics and AI analysis.


        Extends SessionResponse with additional fields that require extra queries.'
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        analysis:
          anyOf:
          - $ref: '#/components/schemas/SessionInsightsAnalysis'
          - type: 'null'
          description: AI-generated session analysis. None if analysis has not completed.
        analysis_status:
          anyOf:
          - enum:
            - started
            - completed
            - failed
            type: string
          - type: 'null'
          description: 'State of the most recent session analysis run: ''completed'',
            ''started'' (in progress) or ''failed''. None if analysis was never run.
            ''failed'' distinguishes a run that errored from one that never happened;
            `analysis` may still hold an older completed result.'
          title: Analysis Status
        automation_id:
          anyOf:
          - type: string
          - type: 'null'
          description: ID of the automation that created this session, if any.
          title: Automation Id
        category:
          anyOf:
          - enum:
            - bug_fixing
            - ci_cd_and_devops
            - code_quality_and_security
            - code_review
            - code_review_and_analysis
            - data_and_automation
            - documentation_and_content
            - feature_development
            - migrations_and_upgrades
            - other
            - production_investigation
            - refactoring_and_optimization
            - research_and_exploration
            - security
            - unit_test_generation
            type: string
          - type: 'null'
          description: The session's assigned use-case category, if categorisation
            has run. Only populated on get/list endpoints.
          title: Category
        child_session_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Child Session Ids
        created_at:
          title: Created At
          type: integer
        devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - fusion
            - lite
            - ultra
            - swe-2-medium
            - swe-2-high
            - swe-2-max
            type: string
          - type: 'null'
          description: The Devin agent mode the session was created with, after resolving
            org/user defaults and parent-session inheritance. None when the session
            runs an agent preview that has no mode equivalent.
          title: Devin Mode
        is_archived:
          default: false
          title: Is Archived
          type: boolean
        num_devin_messages:
          description: Number of Devin messages sent during the session.
          title: Num Devin Messages
          type: integer
        num_user_messages:
          description: Number of user messages sent during the session.
          title: Num User Messages
          type: integer
        on_demand_usage:
          anyOf:
          - type: number
          - type: 'null'
          description: On-demand (overage) spend in USD for this session, excluding
            child sessions. Only populated for Teams plans; 0 when the session was
            fully covered by quota. Omitted for other plans. Only populated on get/list
            endpoints.
          title: On Demand Usage
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Owning organization. Null for detached sessions, which are
            owned by their creator's account rather than an organization.
          title: Org Id
        origin:
          anyOf:
          - enum:
            - webapp
            - slack
            - teams
            - api
            - linear
            - jira
            - automation
            - cli
            - desktop
            - code_scan
            - other
            type: string
          - type: 'null'
          description: The origin from which the session was created.
          title: Origin
        parent_session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Parent Session Id
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/SessionSecurityProfileResponse'
          - type: 'null'
          description: The session's own security-profile binding. Only populated
            on get/list endpoints.
        service_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Service User Id
        session_id:
          title: Session Id
          type: string
        session_size:
          description: Session size classification based on ACU usage and message
            count.
          enum:
          - xs
          - s
          - m
          - l
          - xl
          title: Session Size
          type: string
        status:
          enum:
          - new
          - claimed
          - running
          - exit
          - error
          - suspended
          - resuming
          title: Status
          type: string
        status_detail:
          anyOf:
          - enum:
            - working
            - waiting_for_user
            - waiting_for_approval
            - finished
            - inactivity
            - user_request
            - usage_limit_exceeded
            - out_of_credits
            - out_of_quota
            - no_quota_allocation
            - payment_declined
            - org_usage_limit_exceeded
            - user_usage_limit_exceeded
            - total_session_limit_exceeded
            - contract_expired
            - error
            type: string
          - type: 'null'
          description: 'Additional detail about the session''s current status. When
            status is ''running'': ''working'' (actively working), ''waiting_for_user''
            (needs user input), ''waiting_for_approval'' (awaiting action approval
            in safe mode), or ''finished'' (task complete). When status is ''suspended'':
            the reason for suspension such as ''inactivity'', ''user_request'', ''usage_limit_exceeded'',
            ''out_of_credits'', ''out_of_quota'', ''no_quota_allocation'', ''payment_declined'',
            ''org_usage_limit_exceeded'', ''user_usage_limit_exceeded'', ''total_session_limit_exceeded'',
            ''contract_expired'', or ''error''. Only populated on get/list endpoints.'
          title: Status Detail
        structured_output:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          description: Validated structured output from the session. Only populated
            on get/list endpoints.
          title: Structured Output
        subcategory:
          anyOf:
          - type: string
          - type: 'null'
          description: The session's assigned subcategory display name. 'Other' when
            a category is set but no subcategory was assigned or resolved. Only populated
            on get/list endpoints.
          title: Subcategory
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        updated_at:
          title: Updated At
          type: integer
        url:
          title: Url
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - session_id
      - url
      - status
      - tags
      - org_id
      - created_at
      - updated_at
      - acus_consumed
      - pull_requests
      - num_user_messages
      - num_devin_messages
      - session_size
      title: SessionInsightsResponse
      type: object
    SessionInsightsSkillUsage:
      properties:
        bad_usages:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsSkillUsageItem'
          title: Bad Usages
          type: array
        good_usages:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsSkillUsageItem'
          title: Good Usages
          type: array
      title: SessionInsightsSkillUsage
      type: object
    SessionInsightsSkillUsageItem:
      properties:
        reason:
          title: Reason
          type: string
        repo_origin:
          title: Repo Origin
          type: string
        skill_name:
          title: Skill Name
          type: string
        skill_rel_path:
          title: Skill Rel Path
          type: string
      required:
      - reason
      - skill_name
      - repo_origin
      - skill_rel_path
      title: SessionInsightsSkillUsageItem
      type: object
    SessionInsightsSuggestedPrompt:
      properties:
        feedback_items:
          default: []
          items:
            $ref: '#/components/schemas/SessionInsightsFeedbackItem'
          title: Feedback Items
          type: array
        original_prompt:
          title: Original Prompt
          type: string
        suggested_prompt:
          title: Suggested Prompt
          type: string
      required:
      - original_prompt
      - suggested_prompt
      title: SessionInsightsSuggestedPrompt
      type: object
    SessionInsightsTimelineEvent:
      properties:
        color:
          default: ''
          title: Color
          type: string
        description:
          title: Description
          type: string
        issue_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Issue Id
        title:
          title: Title
          type: string
      required:
      - title
      - description
      title: SessionInsightsTimelineEvent
      type: object
    SessionMessage:
      description: A message in a Devin session.
      properties:
        created_at:
          title: Created At
          type: integer
        event_id:
          title: Event Id
          type: string
        message:
          title: Message
          type: string
        origin:
          anyOf:
          - type: string
          - type: 'null'
          description: The origin of the message, if available.
          title: Origin
        source:
          enum:
          - devin
          - user
          title: Source
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          description: The ID of the user who sent the message, if available.
          title: User Id
        username:
          anyOf:
          - type: string
          - type: 'null'
          description: The username of the user who sent the message, if available.
          title: Username
      required:
      - event_id
      - source
      - message
      - created_at
      title: SessionMessage
      type: object
    SessionMessageCreateRequest:
      properties:
        attachment_urls:
          anyOf:
          - items:
              format: uri
              maxLength: 2083
              minLength: 1
              type: string
            type: array
          - type: 'null'
          title: Attachment Urls
        message:
          title: Message
          type: string
        message_as_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Message As User Id
      required:
      - message
      title: SessionMessageCreateRequest
      type: object
    SessionMetricsResponse:
      description: Response model for session metrics.
      properties:
        avg_acus_per_session:
          title: Avg Acus Per Session
          type: number
        sessions_created_by_origin:
          $ref: '#/components/schemas/SessionCountsByOrigin'
        sessions_created_by_size:
          $ref: '#/components/schemas/SessionCountsBySize'
        sessions_created_count:
          title: Sessions Created Count
          type: integer
        sessions_created_with_playbook_count:
          title: Sessions Created With Playbook Count
          type: integer
        sessions_created_with_search_count:
          title: Sessions Created With Search Count
          type: integer
        sessions_with_merged_prs_by_size:
          $ref: '#/components/schemas/SessionCountsBySize'
        sessions_with_merged_prs_count:
          title: Sessions With Merged Prs Count
          type: integer
      required:
      - sessions_created_count
      - sessions_created_by_size
      - sessions_created_by_origin
      - sessions_created_with_playbook_count
      - sessions_created_with_search_count
      - sessions_with_merged_prs_count
      - sessions_with_merged_prs_by_size
      - avg_acus_per_session
      title: SessionMetricsResponse
      type: object
    SessionPullRequest:
      properties:
        pr_state:
          anyOf:
          - type: string
          - type: 'null'
          title: Pr State
        pr_url:
          title: Pr Url
          type: string
      required:
      - pr_url
      - pr_state
      title: SessionPullRequest
      type: object
    SessionResponse:
      properties:
        acus_consumed:
          title: Acus Consumed
          type: number
        automation_id:
          anyOf:
          - type: string
          - type: 'null'
          description: ID of the automation that created this session, if any.
          title: Automation Id
        category:
          anyOf:
          - enum:
            - bug_fixing
            - ci_cd_and_devops
            - code_quality_and_security
            - code_review
            - code_review_and_analysis
            - data_and_automation
            - documentation_and_content
            - feature_development
            - migrations_and_upgrades
            - other
            - production_investigation
            - refactoring_and_optimization
            - research_and_exploration
            - security
            - unit_test_generation
            type: string
          - type: 'null'
          description: The session's assigned use-case category, if categorisation
            has run. Only populated on get/list endpoints.
          title: Category
        child_session_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Child Session Ids
        created_at:
          title: Created At
          type: integer
        devin_mode:
          anyOf:
          - enum:
            - normal
            - fast
            - fusion
            - lite
            - ultra
            - swe-2-medium
            - swe-2-high
            - swe-2-max
            type: string
          - type: 'null'
          description: The Devin agent mode the session was created with, after resolving
            org/user defaults and parent-session inheritance. None when the session
            runs an agent preview that has no mode equivalent.
          title: Devin Mode
        is_archived:
          default: false
          title: Is Archived
          type: boolean
        on_demand_usage:
          anyOf:
          - type: number
          - type: 'null'
          description: On-demand (overage) spend in USD for this session, excluding
            child sessions. Only populated for Teams plans; 0 when the session was
            fully covered by quota. Omitted for other plans. Only populated on get/list
            endpoints.
          title: On Demand Usage
        org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Owning organization. Null for detached sessions, which are
            owned by their creator's account rather than an organization.
          title: Org Id
        origin:
          anyOf:
          - enum:
            - webapp
            - slack
            - teams
            - api
            - linear
            - jira
            - automation
            - cli
            - desktop
            - code_scan
            - other
            type: string
          - type: 'null'
          description: The origin from which the session was created.
          title: Origin
        parent_session_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Parent Session Id
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        pull_requests:
          items:
            $ref: '#/components/schemas/SessionPullRequest'
          title: Pull Requests
          type: array
        security_profile:
          anyOf:
          - $ref: '#/components/schemas/SessionSecurityProfileResponse'
          - type: 'null'
          description: The session's own security-profile binding. Only populated
            on get/list endpoints.
        service_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Service User Id
        session_id:
          title: Session Id
          type: string
        status:
          enum:
          - new
          - claimed
          - running
          - exit
          - error
          - suspended
          - resuming
          title: Status
          type: string
        status_detail:
          anyOf:
          - enum:
            - working
            - waiting_for_user
            - waiting_for_approval
            - finished
            - inactivity
            - user_request
            - usage_limit_exceeded
            - out_of_credits
            - out_of_quota
            - no_quota_allocation
            - payment_declined
            - org_usage_limit_exceeded
            - user_usage_limit_exceeded
            - total_session_limit_exceeded
            - contract_expired
            - error
            type: string
          - type: 'null'
          description: 'Additional detail about the session''s current status. When
            status is ''running'': ''working'' (actively working), ''waiting_for_user''
            (needs user input), ''waiting_for_approval'' (awaiting action approval
            in safe mode), or ''finished'' (task complete). When status is ''suspended'':
            the reason for suspension such as ''inactivity'', ''user_request'', ''usage_limit_exceeded'',
            ''out_of_credits'', ''out_of_quota'', ''no_quota_allocation'', ''payment_declined'',
            ''org_usage_limit_exceeded'', ''user_usage_limit_exceeded'', ''total_session_limit_exceeded'',
            ''contract_expired'', or ''error''. Only populated on get/list endpoints.'
          title: Status Detail
        structured_output:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          description: Validated structured output from the session. Only populated
            on get/list endpoints.
          title: Structured Output
        subcategory:
          anyOf:
          - type: string
          - type: 'null'
          description: The session's assigned subcategory display name. 'Other' when
            a category is set but no subcategory was assigned or resolved. Only populated
            on get/list endpoints.
          title: Subcategory
        tags:
          items:
            type: string
          title: Tags
          type: array
        title:
          anyOf:
          - type: string
          - type: 'null'
          title: Title
        updated_at:
          title: Updated At
          type: integer
        url:
          title: Url
          type: string
        user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: User Id
      required:
      - session_id
      - url
      - status
      - tags
      - org_id
      - created_at
      - updated_at
      - acus_consumed
      - pull_requests
      title: SessionResponse
      type: object
    SessionSecretInput:
      description: Input model for a session secret provided via API.
      properties:
        key:
          maxLength: 256
          minLength: 1
          title: Key
          type: string
        sensitive:
          default: true
          title: Sensitive
          type: boolean
        value:
          maxLength: 65536
          title: Value
          type: string
      required:
      - key
      - value
      title: SessionSecretInput
      type: object
    SessionSecurityProfileResponse:
      properties:
        profile_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Profile Id
        selection:
          description: 'The session''s own binding: inherit (no binding of its own),
            none (explicit opt-out), or profile (pins profile_id). The effective configuration
            resolves the full governing chain (enterprise -> org -> automation/playbook
            -> session); an opt-out cannot escape a mandatory org/enterprise profile.'
          enum:
          - inherit
          - none
          - profile
          title: Selection
          type: string
      required:
      - selection
      title: SessionSecurityProfileResponse
      type: object
    SessionSecurityProfileSelection:
      description: An explicit security-profile selection for a new session.
      properties:
        profile_id:
          anyOf:
          - minLength: 1
            type: string
          - type: 'null'
          description: Security profile to attach to the session; must belong to your
            organization or, for enterprise organizations, its enterprise. null records
            an explicit opt-out (no profile, even when the org or enterprise has a
            default).
          title: Profile Id
      title: SessionSecurityProfileSelection
      type: object
    SessionTagsResponse:
      properties:
        tags:
          items:
            type: string
          title: Tags
          type: array
      required:
      - tags
      title: SessionTagsResponse
      type: object
    SessionTagsUpdateRequest:
      properties:
        tags:
          items:
            type: string
          maxItems: 50
          title: Tags
          type: array
      required:
      - tags
      title: SessionTagsUpdateRequest
      type: object
    SessionsByCategoryResponse:
      properties:
        categories:
          items:
            $ref: '#/components/schemas/CategoryMetrics'
          title: Categories
          type: array
      required:
      - categories
      title: SessionsByCategoryResponse
      type: object
    SessionsQueryParams:
      properties:
        after:
          anyOf:
          - type: string
          - type: 'null'
          title: After
        automation_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter to sessions created by any of these automations
          title: Automation Ids
        category:
          anyOf:
          - enum:
            - bug_fixing
            - ci_cd_and_devops
            - code_quality_and_security
            - code_review
            - code_review_and_analysis
            - data_and_automation
            - documentation_and_content
            - feature_development
            - migrations_and_upgrades
            - other
            - production_investigation
            - refactoring_and_optimization
            - research_and_exploration
            - security
            - unit_test_generation
            type: string
          - type: 'null'
          title: Category
        created_after:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created After
        created_before:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created Before
        first:
          default: 100
          maximum: 200.0
          minimum: 1.0
          title: First
          type: integer
        is_archived:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Archived
        origins:
          anyOf:
          - items:
              enum:
              - webapp
              - slack
              - teams
              - api
              - linear
              - jira
              - automation
              - cli
              - desktop
              - code_scan
              - other
              type: string
            type: array
          - type: 'null'
          title: Origins
        parent_session_id:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to child sessions spawned by this parent session
          title: Parent Session Id
        playbook_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
        repo_names:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter by repository names (e.g., 'owner/repo')
          title: Repo Names
        schedule_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Schedule Id
        service_user_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
        session_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
        updated_after:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated After
        updated_before:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated Before
        user_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      title: SessionsQueryParams
      type: object
    SkillReference:
      description: 'One exact skill: the plugin that ships it plus the skill''s name.'
      properties:
        plugin_identity:
          description: 'The plugin that ships the skill: the id of a bundle uploaded
            by the organization, e.g. ''org-playbooks'', or the URL of a git plugin,
            e.g. ''https://github.com/acme/tools''.'
          maxLength: 256
          minLength: 1
          title: Plugin Identity
          type: string
        skill_name:
          description: Name of the skill inside that plugin.
          maxLength: 128
          minLength: 1
          title: Skill Name
          type: string
      required:
      - plugin_identity
      - skill_name
      title: SkillReference
      type: object
    StartIngestionScanRequest:
      description: 'Request body for starting an ingestion-mode code scan.


        Only accepts an ingestion (ingest-mode) scan profile: the profile is run

        against the given repository (or repositories).'
      properties:
        attachment_urls:
          anyOf:
          - items:
              format: uri
              maxLength: 2083
              minLength: 1
              type: string
            maxItems: 10
            type: array
          - type: 'null'
          description: Devin attachment URLs to provide to the scan, e.g. files uploaded
            via the attachments API. The attachments must belong to the organization
            being scanned.
          title: Attachment Urls
        effort:
          anyOf:
          - enum:
            - normal
            - deep
            type: string
          - type: 'null'
          description: 'Scan effort: ''normal'' (default) uses lower model reasoning
            effort with larger triage and validation batches; ''deep'' runs the full
            pipeline.'
          title: Effort
        host:
          anyOf:
          - type: string
          - type: 'null'
          description: Git host of the repository, if known.
          title: Host
        platform:
          anyOf:
          - maxLength: 128
            type: string
          - type: 'null'
          description: 'Where the scan''s sessions run: a platform label configured
            for the organization (e.g. ''linux'', ''windows'', ''macos'') or the name
            of an outpost (BYOB) pool, case-insensitive; platforms take priority when
            a name matches both. Omitted means the organization default. Unrecognized
            values are rejected with a 400 whose error body lists the available platform
            labels and outpost pool names.'
          title: Platform
        profile_id:
          description: Ingestion-mode scan profile to run. Must be an ingest profile;
            non-ingest profiles are rejected with 400.
          title: Profile Id
          type: string
        repo_name:
          anyOf:
          - type: string
          - type: 'null'
          description: Full name of the repository to scan. Provide exactly one of
            repo_name or repos.
          title: Repo Name
        repos:
          anyOf:
          - items:
              $ref: '#/components/schemas/ScanRepoRequest'
            maxItems: 200
            type: array
          - type: 'null'
          description: Repositories covered by one scan; the first entry is the scan's
            primary repository. Provide exactly one of repo_name or repos.
          title: Repos
      required:
      - profile_id
      title: StartIngestionScanRequest
      type: object
    SubcategoryMetrics:
      properties:
        acus:
          title: Acus
          type: number
        display_name:
          title: Display Name
          type: string
        sessions_count:
          title: Sessions Count
          type: integer
        subcategory_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Subcategory Id
      required:
      - subcategory_id
      - display_name
      - sessions_count
      - acus
      title: SubcategoryMetrics
      type: object
    TagsCreateRequest:
      properties:
        tags:
          items:
            type: string
          title: Tags
          type: array
      required:
      - tags
      title: TagsCreateRequest
      type: object
    TagsResponse:
      properties:
        tags:
          items:
            type: string
          title: Tags
          type: array
      required:
      - tags
      title: TagsResponse
      type: object
    TriggerBuildBody:
      description: '``POST /builds`` body. Empty per spec; reserved for future fields.'
      properties: {}
      title: TriggerBuildBody
      type: object
    UpdateACULimitRequest:
      properties:
        cycle_acu_limit:
          minimum: 0.0
          title: Cycle Acu Limit
          type: integer
      required:
      - cycle_acu_limit
      title: UpdateACULimitRequest
      type: object
    UpdateBlueprintContentsBody:
      properties:
        contents:
          description: New YAML body for the blueprint.
          title: Contents
          type: string
      required:
      - contents
      title: UpdateBlueprintContentsBody
      type: object
    UpdateOrgBlueprintBody:
      description: "Partial update for an org- or repo-tier blueprint.\n\nAny subset\
        \ of fields may be provided. Fields not set are left alone.\nProviding ``position``,\
        \ ``source`` or a commit-build setting on an\norg-tier blueprint returns ``400``\
        \ \u2014 only repo-tier blueprints have them.\nDoes NOT trigger a build."
      properties:
        build_on_default_branch_commit:
          anyOf:
          - type: boolean
          - type: 'null'
          description: If set, turns building the environment on each push to the
            default branch on or off. Only accepted on the root blueprint of a github.com
            repo. Every such push queues a build.
          title: Build On Default Branch Commit
        contents:
          anyOf:
          - type: string
          - type: 'null'
          description: If set, replaces the blueprint's YAML body with a new version.
          title: Contents
        position:
          anyOf:
          - type: integer
          - type: 'null'
          description: If set, updates the execution position of this repo-tier blueprint.
            Positions are not required to be unique; ties are broken arbitrarily by
            the server when sorting for execution.
          title: Position
        report_check_runs:
          anyOf:
          - type: boolean
          - type: 'null'
          description: If set, turns reporting each commit build as a GitHub check
            run on or off. Enabling it requires 'build_on_default_branch_commit' to
            be on.
          title: Report Check Runs
        source:
          anyOf:
          - enum:
            - git
            - database
            type: string
          - type: 'null'
          description: If set, switches the repo's blueprint source. Only accepted
            on the repo's root blueprint (scoped blueprints inherit it). 'git' pulls
            .devin/blueprint.yaml from the default branch (404 if absent) and cannot
            be combined with 'contents'; 'database' keeps the current YAML (or 'contents',
            if given) and stops syncing from the repo. No-op when the blueprint is
            already in that mode.
          title: Source
      title: UpdateOrgBlueprintBody
      type: object
    UsageMetrics:
      properties:
        prs_created_count:
          title: Prs Created Count
          type: integer
        prs_merged_count:
          title: Prs Merged Count
          type: integer
        searches_count:
          title: Searches Count
          type: integer
        sessions_count:
          title: Sessions Count
          type: integer
      required:
      - sessions_count
      - searches_count
      - prs_created_count
      - prs_merged_count
      title: UsageMetrics
      type: object
    User:
      properties:
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - role_assignments
      title: User
      type: object
    UserBulkCreateRequest:
      properties:
        emails:
          items:
            type: string
          maxItems: 100
          title: Emails
          type: array
        enterprise_role_id:
          title: Enterprise Role Id
          type: string
      required:
      - emails
      - enterprise_role_id
      title: UserBulkCreateRequest
      type: object
    UserUpdateRoleRequest:
      properties:
        role_id:
          title: Role Id
          type: string
      required:
      - role_id
      title: UserUpdateRoleRequest
      type: object
    UserWithIdpRoles:
      description: User with both direct and IDP-group-derived role assignments.
      properties:
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
        idp_role_assignments:
          items:
            $ref: '#/components/schemas/IdpRoleAssignment'
          title: Idp Role Assignments
          type: array
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        role_assignments:
          items:
            $ref: '#/components/schemas/RoleAssignment'
          title: Role Assignments
          type: array
        user_id:
          title: User Id
          type: string
      required:
      - user_id
      - email
      - name
      - role_assignments
      title: UserWithIdpRoles
      type: object
    WindsurfSessionUserSelf:
      description: Identity information for an authenticated Windsurf session user.
      properties:
        devin_sessions_org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Organization the caller''s Devin Cloud sessions run in: the
            one named with x-cog-org-id, or without it the first organization visible
            to the user. Either way only an organization in which the user may use
            Devin sessions, and never an enterprise''s primary organization. Null
            when there is none.'
          title: Devin Sessions Org Id
        org_id:
          title: Org Id
          type: string
        primary_billing_org_id:
          anyOf:
          - type: string
          - type: 'null'
          description: 'Organization the user''s CLI and Desktop usage is billed to:
            the account''s organization, or in an enterprise the user''s primary billing
            organization. Null when there is none or the user may not use Devin sessions
            in it.'
          title: Primary Billing Org Id
        principal_type:
          const: windsurf_session
          title: Principal Type
          type: string
        user_id:
          title: User Id
          type: string
        user_name:
          anyOf:
          - type: string
          - type: 'null'
          title: User Name
      required:
      - principal_type
      - user_id
      - org_id
      title: WindsurfSessionUserSelf
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
openapi: 3.1.0
paths:
  /v3/enterprise/audit-logs:
    get:
      description: List audit logs for the enterprise.
      operationId: handle_get_enterprise_audit_logs_v3_enterprise_audit_logs_get
      parameters:
      - in: query
        name: order
        required: false
        schema:
          default: desc
          enum:
          - asc
          - desc
          title: Order
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: action
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/AuditLogAction'
          - type: 'null'
          title: Action
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_AuditLogResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Audit Logs
      tags:
      - audit_logs
  /v3/enterprise/code-scans/findings:
    get:
      description: 'List code scan findings for the enterprise account.


        Findings are returned newest first. Optionally filter by ``org_ids``,

        ``scan_id``, ``repo_name``, ``severity``, ``status``, ``payoff``, and

        created/updated timestamp bounds (``created_after``/``created_before``,

        ``updated_after``/``updated_before``). Results are paginated with an opaque

        cursor (``after`` / ``first``).'
      operationId: handle_list_code_scan_findings_v3_enterprise_code_scans_findings_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter to findings produced by this scan.
        in: query
        name: scan_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to findings produced by this scan.
          title: Scan Id
      - description: Filter to findings reported in this repository.
        in: query
        name: repo_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to findings reported in this repository.
          title: Repo Name
      - description: Filter to findings with any of these severities (critical, high,
          medium, low).
        in: query
        name: severity
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - critical
              - high
              - medium
              - low
              type: string
            type: array
          - type: 'null'
          description: Filter to findings with any of these severities (critical,
            high, medium, low).
          title: Severity
      - description: Filter to findings with any of these statuses (open, dismissed,
          resolved).
        in: query
        name: status
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - open
              - dismissed
              - resolved
              type: string
            type: array
          - type: 'null'
          description: Filter to findings with any of these statuses (open, dismissed,
            resolved).
          title: Status
      - description: Filter to findings in any of these payoff quadrants (quick_win,
          big_fix, easy_fix, deprioritize). Unrated findings (null fix_effort) never
          match.
        in: query
        name: payoff
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - quick_win
              - big_fix
              - easy_fix
              - deprioritize
              type: string
            maxItems: 4
            type: array
          - type: 'null'
          description: Filter to findings in any of these payoff quadrants (quick_win,
            big_fix, easy_fix, deprioritize). Unrated findings (null fix_effort) never
            match.
          title: Payoff
      - description: Findings created at or after this unix timestamp (seconds).
        in: query
        name: created_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings created at or after this unix timestamp (seconds).
          title: Created After
      - description: Findings created at or before this unix timestamp (seconds).
        in: query
        name: created_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings created at or before this unix timestamp (seconds).
          title: Created Before
      - description: Findings updated at or after this unix timestamp (seconds).
        in: query
        name: updated_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings updated at or after this unix timestamp (seconds).
          title: Updated After
      - description: Findings updated at or before this unix timestamp (seconds).
        in: query
        name: updated_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings updated at or before this unix timestamp (seconds).
          title: Updated Before
      - description: Filter to findings in these organizations.
        in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter to findings in these organizations.
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanFindingResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scan Findings
      tags:
      - code-scans
  /v3/enterprise/code-scans/metrics:
    get:
      description: 'Get aggregated code scan metrics for the enterprise account.


        Returns scan, finding, and remediation-PR metrics for code scans created

        within the specified time range, optionally filtered to specific

        organizations.'
      operationId: handle_get_code_scan_metrics_v3_enterprise_code_scans_metrics_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan Metrics
      tags:
      - code-scans
  /v3/enterprise/code-scans/profiles:
    get:
      description: 'List code scan profiles for the enterprise account.


        Returns profile summaries (without guidance) newest first, including both

        org-owned and account-shared profiles. Optionally filter by ``org_ids``;

        results are paginated with an opaque cursor (``after`` / ``first``).'
      operationId: handle_list_code_scan_profiles_v3_enterprise_code_scans_profiles_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Only return profiles visible to these organizations. Defaults
          to all organizations in the account.
        in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Only return profiles visible to these organizations. Defaults
            to all organizations in the account.
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanProfileSummaryResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scan Profiles
      tags:
      - code-scans
  /v3/enterprise/code-scans/profiles/{profile_id}:
    get:
      description: 'Get a code scan profile by ID.


        Returns the profile''s metadata, visibility (org-owned or shared

        account-wide), and all of its guidance fields. Returns ``404`` when the

        profile does not exist or is not visible to the enterprise account.'
      operationId: handle_get_code_scan_profile_v3_enterprise_code_scans_profiles__profile_id__get
      parameters:
      - in: path
        name: profile_id
        required: true
        schema:
          title: Profile Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanProfileDetailResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan Profile
      tags:
      - code-scans
  /v3/enterprise/code-scans/scans:
    get:
      description: 'List code scans for the enterprise account.


        Scans are returned newest first. Optionally filter by ``org_ids``,

        ``repo_name``, and creation time (``time_after`` / ``time_before``);

        results are paginated with an opaque cursor (``after`` / ``first``).'
      operationId: handle_list_code_scans_v3_enterprise_code_scans_scans_get
      parameters:
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter to scans that scanned this repository. Matches multi-repo
          scans even when the repository is not the scan's primary repo, so returned
          items may report a different repo_name.
        in: query
        name: repo_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to scans that scanned this repository. Matches multi-repo
            scans even when the repository is not the scan's primary repo, so returned
            items may report a different repo_name.
          title: Repo Name
      - description: Filter to scans in these organizations.
        in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter to scans in these organizations.
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scans
      tags:
      - code-scans
  /v3/enterprise/consumption/acu-limits/devin:
    get:
      description: Get all org-level Devin ACU limits for this enterprise.
      operationId: handle_get_devin_acu_limits_v3_enterprise_consumption_acu_limits_devin_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ACULimitResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Devin ACU limits
      tags:
      - acu-limits
  /v3/enterprise/consumption/acu-limits/devin/organizations/{org_id}:
    delete:
      description: Delete an org-level Devin ACU limit.
      operationId: handle_delete_org_devin_acu_limit_v3_enterprise_consumption_acu_limits_devin_organizations__org_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete org-level Devin ACU limit
      tags:
      - acu-limits
    put:
      description: Create or update an org-level Devin ACU limit.
      operationId: handle_set_org_devin_acu_limit_v3_enterprise_consumption_acu_limits_devin_organizations__org_id__put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateACULimitRequest'
        required: true
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Set org-level Devin ACU limit
      tags:
      - acu-limits
  /v3/enterprise/consumption/cycles:
    get:
      operationId: handle_get_consumption_cycles_v3_enterprise_consumption_cycles_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ConsumptionCycle_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Consumption Cycles
      tags:
      - consumption
  /v3/enterprise/consumption/daily:
    get:
      description: 'Get daily ACU consumption for the entire enterprise.


        Returns total ACUs and consumption broken down by date.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass Unix timestamps that align with this

        timezone offset (e.g., 1733385600 for December 5, 2025 at midnight PST).'
      operationId: handle_get_consumption_daily_v3_enterprise_consumption_daily_get
      parameters:
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Daily Consumption
      tags:
      - consumption
  /v3/enterprise/consumption/daily/organizations/{org_id}:
    get:
      description: 'Get daily ACU consumption for a specific organization.


        Returns total ACUs and consumption broken down by date for the org.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass Unix timestamps that align with this

        timezone offset (e.g., 1733385600 for December 5, 2025 at midnight PST).'
      operationId: handle_get_org_consumption_daily_v3_enterprise_consumption_daily_organizations__org_id__get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization Daily Consumption
      tags:
      - consumption
  /v3/enterprise/consumption/daily/service-users/{service_user_id}:
    get:
      description: 'Get daily ACU consumption for a specific service user.


        Returns total ACUs and consumption broken down by date for sessions

        created by the given service user.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass Unix timestamps that align with this

        timezone offset (e.g., 1733385600 for December 5, 2025 at midnight PST).'
      operationId: handle_get_service_user_consumption_daily_v3_enterprise_consumption_daily_service_users__service_user_id__get
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Service User Daily Consumption
      tags:
      - consumption
  /v3/enterprise/consumption/daily/sessions/{session_id}:
    get:
      description: 'Get daily ACU consumption for a specific session.


        Returns total ACUs and consumption broken down by date for the session.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass Unix timestamps that align with this

        timezone offset (e.g., 1733385600 for December 5, 2025 at midnight PST).'
      operationId: handle_get_session_consumption_daily_v3_enterprise_consumption_daily_sessions__session_id__get
      parameters:
      - description: 'Session ID (prefix: devin-). Alias for devin_id used in consumption
          endpoints.'
        in: path
        name: session_id
        required: true
        schema:
          example: devin-abc123def456
          title: Session Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session Daily Consumption
      tags:
      - consumption
  /v3/enterprise/consumption/daily/users/{user_id}:
    get:
      description: 'Get daily ACU consumption for a specific user.


        Returns total ACUs and consumption broken down by date for the user.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC. To match the consumption

        data shown in the Devin dashboard, pass Unix timestamps that align with this

        timezone offset (e.g., 1733385600 for December 5, 2025 at midnight PST).'
      operationId: handle_get_user_consumption_daily_v3_enterprise_consumption_daily_users__user_id__get
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get User Daily Consumption
      tags:
      - consumption
  /v3/enterprise/git-providers/connections:
    get:
      operationId: handle_get_git_connections_v3_enterprise_git_providers_connections_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitConnectionResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Git Connections
      tags:
      - git_connections
  /v3/enterprise/git-providers/connections/{connection_id}/repositories:
    get:
      operationId: handle_list_git_connection_repositories_v3_enterprise_git_providers_connections__connection_id__repositories_get
      parameters:
      - in: path
        name: connection_id
        required: true
        schema:
          title: Connection Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 100
          minimum: 1
          title: First
          type: integer
      - in: query
        name: filter_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Filter Name
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitConnectionRepositoryResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List repositories for a git connection
      tags:
      - git_connections
  /v3/enterprise/hypervisors:
    get:
      description: List the hypervisors of the account's customer-managed VPC tenants.
      operationId: handle_get_hypervisors_v3_enterprise_hypervisors_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: status
        required: false
        schema:
          default: available
          enum:
          - available
          - restarting
          - disconnected
          - terminated
          - draining
          - retiring
          - all
          title: Status
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_HypervisorResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Hypervisors
  /v3/enterprise/idp-groups:
    get:
      description: List IDP groups registered with this enterprise.
      operationId: handle_list_account_idp_groups_v3_enterprise_idp_groups_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroupResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Account IDP Groups
      tags:
      - idp_groups
    post:
      description: Bulk create IDP groups for this enterprise. Existing groups are
        ignored.
      operationId: handle_bulk_register_account_idp_groups_v3_enterprise_idp_groups_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupsBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/IdpGroupResponse'
                title: Response Handle Bulk Register Account Idp Groups V3 Enterprise
                  Idp Groups Post
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Register Account IDP Groups
      tags:
      - idp_groups
  /v3/enterprise/idp-groups/{idp_group_name}:
    delete:
      description: Remove a registered IDP group from this enterprise.
      operationId: handle_delete_account_idp_group_v3_enterprise_idp_groups__idp_group_name__delete
      parameters:
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroupResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Account IDP Group
      tags:
      - idp_groups
  /v3/enterprise/ip-access-list:
    delete:
      operationId: handle_clear_ip_access_list_v3_enterprise_ip_access_list_delete
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAccessListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Clear IP Access List
      tags:
      - ip-access-list
    get:
      operationId: handle_get_ip_access_list_v3_enterprise_ip_access_list_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAccessListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get IP Access List
      tags:
      - ip-access-list
    post:
      operationId: handle_add_ip_access_list_v3_enterprise_ip_access_list_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpAccessListAddRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAccessListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Add IPs to IP Access List
      tags:
      - ip-access-list
    put:
      operationId: handle_replace_ip_access_list_v3_enterprise_ip_access_list_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IpAccessListReplaceRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAccessListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace IP Access List
      tags:
      - ip-access-list
  /v3/enterprise/knowledge/folders:
    get:
      description: Return the full folder tree with per-folder note counts.
      operationId: handle_list_folders_v3_enterprise_knowledge_folders_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderTreeResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get knowledge folder structure with note counts.
      tags:
      - notes
  /v3/enterprise/knowledge/notes:
    get:
      operationId: handle_list_notes_v3_enterprise_knowledge_notes_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: access_type
        required: false
        schema:
          anyOf:
          - enum:
            - org
            - enterprise
            type: string
          - type: 'null'
          title: Access Type
      - in: query
        name: search
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - in: query
        name: folder_path
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Folder Path
      - in: query
        name: pinned_repo
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Pinned Repo
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_KnowledgeNoteResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List all notes.
      tags:
      - notes
    post:
      operationId: handle_create_note_v3_enterprise_knowledge_notes_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeNoteCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an enterprise-level note
      tags:
      - notes
  /v3/enterprise/knowledge/notes/{note_id}:
    delete:
      operationId: handle_delete_note_v3_enterprise_knowledge_notes__note_id__delete
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete a note
      tags:
      - notes
    get:
      description: Get a note by ID.
      operationId: handle_get_note_v3_enterprise_knowledge_notes__note_id__get
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get a note by ID
      tags:
      - notes
    put:
      operationId: handle_update_note_v3_enterprise_knowledge_notes__note_id__put
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeNoteCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update a note
      tags:
      - notes
  /v3/enterprise/members/idp-groups:
    get:
      operationId: handle_list_enterprise_idp_groups_v3_enterprise_members_idp_groups_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroup_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List IDP Groups
      tags:
      - idp_groups
  /v3/enterprise/members/idp-groups/{idp_group_name}:
    delete:
      operationId: handle_remove_enterprise_idp_group_v3_enterprise_members_idp_groups__idp_group_name__delete
      parameters:
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete IDP Group
      tags:
      - idp_groups
    get:
      operationId: handle_get_enterprise_idp_group_v3_enterprise_members_idp_groups__idp_group_name__get
      parameters:
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get IDP Group
      tags:
      - idp_groups
    patch:
      operationId: handle_update_enterprise_idp_group_role_v3_enterprise_members_idp_groups__idp_group_name__patch
      parameters:
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update IDP Group
      tags:
      - idp_groups
    post:
      operationId: handle_assign_enterprise_idp_group_role_v3_enterprise_members_idp_groups__idp_group_name__post
      parameters:
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Assign IDP Group
      tags:
      - idp_groups
  /v3/enterprise/members/idp-users:
    get:
      description: List users whose enterprise membership is derived from IDP group
        assignments.
      operationId: handle_list_enterprise_idp_users_v3_enterprise_members_idp_users_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroupUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List IDP Group Users
      tags:
      - users
  /v3/enterprise/members/service-users:
    get:
      description: List service users in the enterprise.
      operationId: handle_list_enterprise_service_users_v3_enterprise_members_service_users_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Include inactive service users (expired or removed).
        in: query
        name: include_inactive
        required: false
        schema:
          default: false
          description: Include inactive service users (expired or removed).
          title: Include Inactive
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ServiceUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Service Users
      tags:
      - service_users
  /v3/enterprise/members/service-users/{service_user_id}:
    delete:
      operationId: handle_remove_enterprise_service_user_v3_enterprise_members_service_users__service_user_id__delete
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Service User
      tags:
      - service_users
    get:
      description: Get a service user by ID.
      operationId: handle_get_enterprise_service_user_v3_enterprise_members_service_users__service_user_id__get
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Service User
      tags:
      - service_users
    patch:
      description: Update enterprise role for service user.
      operationId: handle_update_enterprise_service_user_role_v3_enterprise_members_service_users__service_user_id__patch
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Service User
      tags:
      - service_users
    post:
      description: Assign enterprise role to service user.
      operationId: handle_assign_enterprise_service_user_role_v3_enterprise_members_service_users__service_user_id__post
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Assign Service User
      tags:
      - service_users
  /v3/enterprise/members/users:
    get:
      operationId: handle_list_enterprise_users_v3_enterprise_members_users_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_EnterpriseUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Users
      tags:
      - users
    post:
      operationId: handle_bulk_invite_enterprise_users_v3_enterprise_members_users_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/User'
                title: Response Handle Bulk Invite Enterprise Users V3 Enterprise
                  Members Users Post
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Invite Users
      tags:
      - users
  /v3/enterprise/members/users/{user_id}:
    delete:
      operationId: handle_remove_enterprise_user_v3_enterprise_members_users__user_id__delete
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete User
      tags:
      - users
    get:
      description: Get a user by ID. Returns both direct and IDP-group-derived role
        assignments.
      operationId: handle_get_enterprise_user_v3_enterprise_members_users__user_id__get
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseUserWithIdpRoles'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get User
      tags:
      - users
    patch:
      operationId: handle_update_enterprise_user_role_v3_enterprise_members_users__user_id__patch
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update User
      tags:
      - users
  /v3/enterprise/metrics/active-users:
    get:
      description: 'Get unique active users for a custom date range.


        A user is considered active if they have created at least min_sessions sessions

        OR at least min_searches searches within the specified time range.


        Returns a single count of unique active users across the entire range.'
      operationId: handle_get_active_users_metrics_v3_enterprise_metrics_active_users_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Active Users for Custom Date Range
      tags:
      - metrics
  /v3/enterprise/metrics/dau:
    get:
      description: 'Get daily active users for each day in the specified time range.


        A user is considered active on a given day if they have created at least

        min_sessions sessions OR at least min_searches searches during that UTC day.


        Returns a list of daily active user counts, one entry per day in the range.'
      operationId: handle_get_dau_metrics_v3_enterprise_metrics_dau_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Daily Active Users
      tags:
      - metrics
  /v3/enterprise/metrics/mau:
    get:
      description: 'Get monthly active users for each month in the specified time
        range.


        A user is considered active in a given month if they have created at least

        min_sessions sessions OR at least min_searches searches during that UTC month.


        Returns a list of monthly active user counts, one entry per month in the range.'
      operationId: handle_get_mau_metrics_v3_enterprise_metrics_mau_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Monthly Active Users
      tags:
      - metrics
  /v3/enterprise/metrics/prs:
    get:
      description: 'Get aggregated PR metrics for the enterprise account.


        Optionally filter by playbook_id to get metrics for PRs from sessions created
        with a specific playbook.'
      operationId: handle_get_pr_metrics_v3_enterprise_metrics_prs_get
      parameters:
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get PR Metrics
      tags:
      - metrics
  /v3/enterprise/metrics/searches:
    get:
      description: Get aggregated search metrics for the enterprise account.
      operationId: handle_get_search_metrics_v3_enterprise_metrics_searches_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Search Metrics
      tags:
      - metrics
  /v3/enterprise/metrics/sessions:
    get:
      description: 'Get aggregated session metrics for the enterprise account.


        Optionally filter by playbook_id to get metrics for sessions created with
        a specific playbook.'
      operationId: handle_get_session_metrics_v3_enterprise_metrics_sessions_get
      parameters:
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session Metrics
      tags:
      - metrics
  /v3/enterprise/metrics/sessions-by-category:
    get:
      description: Get session counts and ACU consumption grouped by category and
        subcategory.
      operationId: handle_get_sessions_by_category_v3_enterprise_metrics_sessions_by_category_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsByCategoryResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session Metrics by Category
      tags:
      - metrics
  /v3/enterprise/metrics/usage:
    get:
      description: 'Get aggregated usage metrics for the enterprise account.


        Returns counts of sessions, searches, and PRs (opened, closed, merged)

        within the specified time range.'
      operationId: handle_get_usage_metrics_v3_enterprise_metrics_usage_get
      parameters:
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMetrics'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Usage Metrics
      tags:
      - metrics
  /v3/enterprise/metrics/wau:
    get:
      description: 'Get weekly active users for each week in the specified time range.


        A user is considered active in a given week if they have created at least

        min_sessions sessions OR at least min_searches searches during that UTC week.


        Weeks are defined as Monday 00:00:00 UTC to Sunday 23:59:59 UTC.


        Returns a list of weekly active user counts, one entry per week in the range.'
      operationId: handle_get_wau_metrics_v3_enterprise_metrics_wau_get
      parameters:
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Weekly Active Users
      tags:
      - metrics
  /v3/enterprise/org-group-limits:
    get:
      description: Get the current organization groups configuration.
      operationId: get_org_groups_config_v3_enterprise_org_group_limits_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgGroupsConfig'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Org Groups Config
      tags:
      - org-groups
    put:
      description: 'Update the organization groups configuration.


        This endpoint replaces the entire org groups configuration with the provided
        config.

        - Groups not in the request will be deleted

        - Groups in the request will be created or updated to match the config'
      operationId: update_org_groups_config_v3_enterprise_org_group_limits_put
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgGroupsConfig'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgGroupsConfig'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Org Groups Config
      tags:
      - org-groups
  /v3/enterprise/organizations:
    get:
      description: List organizations in the enterprise.
      operationId: handle_get_organizations_v3_enterprise_organizations_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_OrganizationResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organizations
      tags:
      - organizations
    post:
      description: Create a new organization in this enterprise
      operationId: handle_create_organization_v3_enterprise_organizations_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create Organization
      tags:
      - organizations
  /v3/enterprise/organizations/{org_id}:
    delete:
      description: Delete an organization from this enterprise
      operationId: handle_delete_organization_v3_enterprise_organizations__org_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Organization
      tags:
      - organizations
    get:
      description: Get details for a specific organization in the enterprise.
      operationId: handle_get_organization_v3_enterprise_organizations__org_id__get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization
      tags:
      - organizations
    patch:
      description: Update an organization's name and/or ACU limits
      operationId: handle_update_organization_v3_enterprise_organizations__org_id__patch
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Organization
      tags:
      - organizations
  /v3/enterprise/organizations/{org_id}/audit-logs:
    get:
      description: List audit logs for the organization.
      operationId: handle_get_org_audit_logs_v3_enterprise_organizations__org_id__audit_logs_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: order
        required: false
        schema:
          default: desc
          enum:
          - asc
          - desc
          title: Order
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: action
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/AuditLogAction'
          - type: 'null'
          title: Action
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_AuditLogResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization Audit Logs
      tags:
      - audit_logs
  /v3/enterprise/organizations/{org_id}/code-scans:
    post:
      description: 'Start a new code scan on a repository in an organization.


        The scan is enqueued and launched asynchronously by the scan dispatcher.

        The scan is attributed to the calling principal (the service user or PAT

        that made the request). Returns ``409`` when the organization''s scan

        backlog is at capacity.'
      operationId: handle_start_code_scan_v3_enterprise_organizations__org_id__code_scans_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeScanCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Start Code Scan
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/ingestion:
    post:
      description: 'Start an ingestion-mode code scan on one or more repositories
        in an organization.


        The scan is enqueued and launched asynchronously by the scan dispatcher.

        Only ingest-mode profiles are accepted; a non-ingest profile is rejected

        with ``400``. Optional attachment URLs (uploaded via the attachments API)

        are provided to the scan. Returns ``409`` when the organization''s scan

        backlog is at capacity.'
      operationId: handle_start_ingestion_scan_v3_enterprise_organizations__org_id__code_scans_ingestion_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartIngestionScanRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Start Ingestion Scan
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}:
    get:
      description: 'Get a single code scan, including the files attached to it.


        Returns ``404`` when the scan is not in the organization.'
      operationId: handle_get_code_scan_v3_enterprise_organizations__org_id__code_scans__scan_id__get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/auto-scan:
    delete:
      description: 'Remove the recurring auto-scan schedule for a code scan.


        Deletes the underlying schedule automation. Idempotent: returns ``204``

        even when no schedule is configured.'
      operationId: handle_delete_auto_scan_schedule_v3_enterprise_organizations__org_id__code_scans__scan_id__auto_scan_delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Auto-Scan Schedule
      tags:
      - code-scans
    post:
      description: 'Create the recurring auto-scan schedule for a code scan.


        Auto-scan is backed by an automation with a ``schedule:recurring`` trigger

        (carrying the rrule) and a ``scan_new_commits`` action targeting this

        scan; when the schedule fires, commits landed since the last scan are

        scanned. Create-only: returns ``409`` if the scan already has a schedule

        (delete it first to change it).'
      operationId: handle_create_auto_scan_schedule_v3_enterprise_organizations__org_id__code_scans__scan_id__auto_scan_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoScanScheduleCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoScanScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create Auto-Scan Schedule
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/effort:
    put:
      description: 'Set the effort applied to future incremental runs of a scan.


        Completed runs and their findings are unaffected. The scan must not

        have an active run (``409`` otherwise).'
      operationId: handle_update_code_scan_effort_v3_enterprise_organizations__org_id__code_scans__scan_id__effort_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeScanEffortUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanEffortResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Code Scan Effort
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/findings/remediate:
    post:
      description: 'Launch one Devin session to remediate several findings of a code
        scan.


        A batch of two or more findings (which may span repositories) gets a

        planner session that groups them and launches a fix session per group,

        each on its own branch with its own pull request. A single finding gets a

        fix session directly. The session is attributed to the calling principal.

        Returns ``409`` if any finding already has a remediation session, in which

        case none of them is claimed.


        Instead of ``finding_ids``, ``select_all`` remediates every open finding

        matching its filters that is not already being remediated.'
      operationId: handle_remediate_code_scan_findings_v3_enterprise_organizations__org_id__code_scans__scan_id__findings_remediate_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemediateFindingsRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemediateFindingsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remediate Code Scan Findings
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/findings/{finding_id}/remediate:
    post:
      description: 'Launch a Devin session to remediate a code scan finding.


        The session analyzes the vulnerable code, implements a fix, and opens a

        pull request. The session is attributed to the calling principal (the

        service user or PAT that made the request). Returns ``409`` if the finding

        already has a remediation session.'
      operationId: handle_remediate_code_scan_finding_v3_enterprise_organizations__org_id__code_scans__scan_id__findings__finding_id__remediate_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - in: path
        name: finding_id
        required: true
        schema:
          title: Finding Id
          type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemediateFindingResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remediate Code Scan Finding
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/profile:
    put:
      description: 'Switch the profile applied to future incremental runs of a scan.


        Incremental re-scans pick up their profile through the scan''s profile

        link, so repointing the link changes the profile used from the next run

        onward. Completed runs and their findings are unaffected. The new

        profile must have the same scan type and mode as the current one, and

        the scan must not have an active run (``409`` otherwise).'
      operationId: handle_switch_code_scan_profile_v3_enterprise_organizations__org_id__code_scans__scan_id__profile_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeScanProfileSwitchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanProfileSwitchResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Switch Code Scan Profile
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/code-scans/{scan_id}/scan-new-commits:
    post:
      description: 'Immediately trigger an incremental (diff) scan of new commits.


        Re-runs the scan against only the commits landed since it last completed.

        This is the one-off, on-demand form of the auto-scan schedule. Returns

        ``409`` if the scan has no completed run to extend or is already in

        progress.'
      operationId: handle_scan_new_commits_v3_enterprise_organizations__org_id__code_scans__scan_id__scan_new_commits_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanNewCommitsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Scan New Commits
      tags:
      - code-scans
  /v3/enterprise/organizations/{org_id}/git-providers/permissions:
    delete:
      operationId: handle_clear_organization_git_permissions_v3_enterprise_organizations__org_id__git_providers_permissions_delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GitPermissionResponse'
                title: Response Handle Clear Organization Git Permissions V3 Enterprise
                  Organizations  Org Id  Git Providers Permissions Delete
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Clear Git Permissions
      tags:
      - git_permissions
    get:
      description: List git permissions for the organization.
      operationId: handle_get_organization_git_permissions_v3_enterprise_organizations__org_id__git_providers_permissions_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GitPermissionResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Git Permissions
      tags:
      - git_permissions
    post:
      operationId: handle_bulk_create_organization_git_permissions_v3_enterprise_organizations__org_id__git_providers_permissions_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitPermissionBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GitPermissionResponse'
                title: Response Handle Bulk Create Organization Git Permissions V3
                  Enterprise Organizations  Org Id  Git Providers Permissions Post
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create Git Permissions
      tags:
      - git_permissions
    put:
      operationId: handle_replace_organization_git_permissions_v3_enterprise_organizations__org_id__git_providers_permissions_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitPermissionBulkCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GitPermissionResponse'
                title: Response Handle Replace Organization Git Permissions V3 Enterprise
                  Organizations  Org Id  Git Providers Permissions Put
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace Git Permissions
      tags:
      - git_permissions
  /v3/enterprise/organizations/{org_id}/git-providers/permissions/{git_permission_id}:
    delete:
      operationId: handle_delete_organization_git_permission_v3_enterprise_organizations__org_id__git_providers_permissions__git_permission_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: 'Git permission ID (prefix: git-permission-)'
        in: path
        name: git_permission_id
        required: true
        schema:
          example: git-permission-abc123def456
          title: Git Permission Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitPermissionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Git Permission
      tags:
      - git_permissions
    patch:
      operationId: handle_update_organization_git_permission_v3_enterprise_organizations__org_id__git_providers_permissions__git_permission_id__patch
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: 'Git permission ID (prefix: git-permission-)'
        in: path
        name: git_permission_id
        required: true
        schema:
          example: git-permission-abc123def456
          title: Git Permission Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitPermissionUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitPermissionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Git Permission
      tags:
      - git_permissions
  /v3/enterprise/organizations/{org_id}/members/idp-groups:
    get:
      operationId: handle_list_organization_idp_groups_v3_enterprise_organizations__org_id__members_idp_groups_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroup_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization IDP Groups
      tags:
      - idp_groups
  /v3/enterprise/organizations/{org_id}/members/idp-groups/{idp_group_name}:
    delete:
      description: Remove idp_group from the organization.
      operationId: handle_remove_organization_idp_group_v3_enterprise_organizations__org_id__members_idp_groups__idp_group_name__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Organization IDP Group
      tags:
      - idp_groups
    get:
      operationId: handle_get_organization_idp_group_v3_enterprise_organizations__org_id__members_idp_groups__idp_group_name__get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization IDP Group
      tags:
      - idp_groups
    patch:
      operationId: handle_update_organization_idp_group_role_v3_enterprise_organizations__org_id__members_idp_groups__idp_group_name__patch
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Organization IDP Group
      tags:
      - idp_groups
    post:
      operationId: handle_assign_organization_idp_group_role_v3_enterprise_organizations__org_id__members_idp_groups__idp_group_name__post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: idp_group_name
        required: true
        schema:
          title: Idp Group Name
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdpGroupUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroup'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Assign Organization IDP Group
      tags:
      - idp_groups
  /v3/enterprise/organizations/{org_id}/members/idp-users:
    get:
      description: List users whose organization membership is derived from IDP group
        assignments.
      operationId: handle_list_organization_idp_users_v3_enterprise_organizations__org_id__members_idp_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroupUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization IDP Group Users
      tags:
      - users
  /v3/enterprise/organizations/{org_id}/members/service-users:
    get:
      description: List service users in the organization.
      operationId: handle_list_organization_service_users_v3_enterprise_organizations__org_id__members_service_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Include inactive service users (expired or removed).
        in: query
        name: include_inactive
        required: false
        schema:
          default: false
          description: Include inactive service users (expired or removed).
          title: Include Inactive
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ServiceUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization Service Users
      tags:
      - service_users
  /v3/enterprise/organizations/{org_id}/members/service-users/{service_user_id}:
    delete:
      description: Remove service user from the organization.
      operationId: handle_remove_organization_service_user_v3_enterprise_organizations__org_id__members_service_users__service_user_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Organization Service User
      tags:
      - service_users
    patch:
      description: Update organization role for service user.
      operationId: handle_update_organization_service_user_role_v3_enterprise_organizations__org_id__members_service_users__service_user_id__patch
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Organization Service User
      tags:
      - service_users
    post:
      description: Assign organization role to service user.
      operationId: handle_assign_organization_service_user_role_v3_enterprise_organizations__org_id__members_service_users__service_user_id__post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUser'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Assign Organization Service User
      tags:
      - service_users
  /v3/enterprise/organizations/{org_id}/members/users:
    get:
      operationId: handle_list_organization_users_v3_enterprise_organizations__org_id__members_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_User_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization Users
      tags:
      - users
  /v3/enterprise/organizations/{org_id}/members/users/{user_id}:
    delete:
      operationId: handle_remove_organization_user_v3_enterprise_organizations__org_id__members_users__user_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Organization User
      tags:
      - users
    patch:
      operationId: handle_update_organization_user_role_v3_enterprise_organizations__org_id__members_users__user_id__patch
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Organization User
      tags:
      - users
    post:
      operationId: handle_assign_organization_user_role_v3_enterprise_organizations__org_id__members_users__user_id__post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateRoleRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Assign Organization User
      tags:
      - users
  /v3/enterprise/organizations/{org_id}/metrics/usage:
    get:
      description: 'Get aggregated usage metrics for the enterprise account.


        Returns counts of sessions, searches, and PRs (opened, closed, merged)

        within the specified time range.'
      operationId: handle_get_organization_usage_metrics_v3_enterprise_organizations__org_id__metrics_usage_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMetrics'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization Usage Metrics
      tags:
      - metrics
  /v3/enterprise/organizations/{org_id}/tags:
    delete:
      description: Clear all allowed session tags for an organization.
      operationId: clear_organization_allowed_tags_v3_enterprise_organizations__org_id__tags_delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Clear Organization Tags
      tags:
      - organization-tags
    get:
      description: Get the allowed session tags for an organization.
      operationId: handle_get_organization_allowed_tags_v3_enterprise_organizations__org_id__tags_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization Allowed Tags
      tags:
      - organization-tags
    post:
      description: Append tags to the allowed session tags for an organization.
      operationId: handle_append_organization_allowed_tags_v3_enterprise_organizations__org_id__tags_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagsCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Append Organization Tags
      tags:
      - organization-tags
    put:
      description: Replace the full set of allowed session tags for an organization.
      operationId: handle_replace_organization_allowed_tags_v3_enterprise_organizations__org_id__tags_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagsCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace Organization Allowed Tags
      tags:
      - organization-tags
  /v3/enterprise/organizations/{org_id}/tags/default:
    delete:
      description: Clear the default tag for an organization.
      operationId: clear_organization_default_tag_v3_enterprise_organizations__org_id__tags_default_delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultTagResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Clear Organization Default Tag
      tags:
      - organization-tags
    get:
      description: Get the current default tag for an organization.
      operationId: get_organization_default_tag_v3_enterprise_organizations__org_id__tags_default_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultTagResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization Default Tag
      tags:
      - organization-tags
    put:
      description: Set the default tag for an organization. The tag must exist in
        the allowed tags list.
      operationId: set_organization_default_tag_v3_enterprise_organizations__org_id__tags_default_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultTagRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultTagResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Set Organization Default Tag
      tags:
      - organization-tags
  /v3/enterprise/organizations/{org_id}/tags/{tag}:
    delete:
      description: Remove a single tag from the allowed session tags for an organization.
      operationId: remove_organization_allowed_tag_v3_enterprise_organizations__org_id__tags__tag__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: path
        name: tag
        required: true
        schema:
          title: Tag
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remove Organization Tag
      tags:
      - organization-tags
  /v3/enterprise/playbooks:
    get:
      deprecated: true
      operationId: handle_list_playbooks_v3_enterprise_playbooks_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_PlaybookResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List all playbooks.
      tags:
      - playbooks
    post:
      deprecated: true
      operationId: handle_create_playbook_v3_enterprise_playbooks_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybookCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an enterprise-level playbook
      tags:
      - playbooks
  /v3/enterprise/playbooks/{playbook_id}:
    delete:
      deprecated: true
      operationId: handle_delete_playbook_v3_enterprise_playbooks__playbook_id__delete
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete a playbook
      tags:
      - playbooks
    get:
      deprecated: true
      description: Get a specific playbook by ID.
      operationId: handle_get_playbook_v3_enterprise_playbooks__playbook_id__get
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get a playbook by ID.
      tags:
      - playbooks
    put:
      deprecated: true
      operationId: handle_update_playbook_v3_enterprise_playbooks__playbook_id__put
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybookCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update a playbook
      tags:
      - playbooks
  /v3/enterprise/pr-reviews:
    get:
      description: "Return the latest Devin Review for a PR scoped to the enterprise.\n\
        \nThe owning organization is resolved server-side from ``pr_url`` \u2014\n\
        the same way as the trigger endpoint. When ``commit_sha`` is\nomitted, the\
        \ PR's current head commit is fetched from the provider\nand used. Returns\
        \ ``404`` when no review exists for the resolved\ncommit."
      operationId: handle_get_pr_review_status_v3_enterprise_pr_reviews_get
      parameters:
      - description: Full URL of the pull/merge request to look up (e.g. `https://github.com/owner/repo/pull/123`).
        in: query
        name: pr_url
        required: true
        schema:
          description: Full URL of the pull/merge request to look up (e.g. `https://github.com/owner/repo/pull/123`).
          examples:
          - https://github.com/owner/repo/pull/123
          title: Pr Url
          type: string
      - description: Commit SHA to look up (full or short prefix). Defaults to the
          PR's current head commit when omitted.
        in: query
        name: commit_sha
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Commit SHA to look up (full or short prefix). Defaults to the
            PR's current head commit when omitted.
          examples:
          - abc123def4567890abc123def4567890abc123de
          title: Commit Sha
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get latest Devin Review status
      tags:
      - pr-reviews
    post:
      description: 'Trigger a Devin Review for a pull/merge request.


        Creates a database record that will be picked up by the review

        worker pool. Always fetches the latest commit from the PR.'
      operationId: handle_create_pr_review_v3_enterprise_pr_reviews_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrReviewCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Trigger Devin Review
      tags:
      - pr-reviews
  /v3/enterprise/queue:
    get:
      description: 'Get the queue status for an enterprise.


        Returns the total number of queued sessions (status: new, resuming, claimed)

        and a status indicator (normal/elevated/high).


        This endpoint is useful for enterprise admins to monitor queue health and

        set up alerts for capacity issues.'
      operationId: get_queue_v3_enterprise_queue_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Queue
      tags:
      - queue
  /v3/enterprise/roles:
    get:
      description: Get roles for this enterprise
      operationId: handle_get_roles_v3_enterprise_roles_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_Role_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Roles
      tags:
      - roles
  /v3/enterprise/roles/{role_id}:
    get:
      description: Get a single role and its permissions for this enterprise
      operationId: handle_get_role_v3_enterprise_roles__role_id__get
      parameters:
      - in: path
        name: role_id
        required: true
        schema:
          title: Role Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleDetailResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Role
      tags:
      - roles
  /v3/enterprise/sessions:
    get:
      description: List all sessions across the enterprise.
      operationId: handle_get_account_sessions_v3_enterprise_sessions_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      - in: query
        name: created_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created After
      - in: query
        name: created_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created Before
      - in: query
        name: updated_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated After
      - in: query
        name: updated_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated Before
      - in: query
        name: tags
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      - in: query
        name: origins
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - webapp
              - slack
              - teams
              - api
              - linear
              - jira
              - automation
              - cli
              - desktop
              - code_scan
              - other
              type: string
            type: array
          - type: 'null'
          title: Origins
      - in: query
        name: schedule_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Schedule Id
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - description: Filter by repository names (e.g., 'owner/repo')
        in: query
        name: repo_names
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter by repository names (e.g., 'owner/repo')
          title: Repo Names
      - in: query
        name: category
        required: false
        schema:
          anyOf:
          - enum:
            - bug_fixing
            - ci_cd_and_devops
            - code_quality_and_security
            - code_review
            - code_review_and_analysis
            - data_and_automation
            - documentation_and_content
            - feature_development
            - migrations_and_upgrades
            - other
            - production_investigation
            - refactoring_and_optimization
            - research_and_exploration
            - security
            - unit_test_generation
            type: string
          - type: 'null'
          title: Category
      - in: query
        name: is_archived
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Archived
      - description: Filter to sessions created by any of these automations
        in: query
        name: automation_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter to sessions created by any of these automations
          title: Automation Ids
      - description: Filter to child sessions spawned by this parent session
        in: query
        name: parent_session_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to child sessions spawned by this parent session
          title: Parent Session Id
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: include_deleted_orgs
        required: false
        schema:
          default: false
          title: Include Deleted Orgs
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List sessions for account
      tags:
      - sessions
  /v3/enterprise/sessions/insights:
    get:
      description: 'List sessions with detailed insights including message counts,

        session size classification, and AI-generated analysis.'
      operationId: handle_get_account_sessions_insights_v3_enterprise_sessions_insights_get
      parameters:
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: session_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Session Ids
      - in: query
        name: created_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created After
      - in: query
        name: created_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Created Before
      - in: query
        name: updated_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated After
      - in: query
        name: updated_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Updated Before
      - in: query
        name: tags
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      - in: query
        name: origins
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - webapp
              - slack
              - teams
              - api
              - linear
              - jira
              - automation
              - cli
              - desktop
              - code_scan
              - other
              type: string
            type: array
          - type: 'null'
          title: Origins
      - in: query
        name: schedule_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Schedule Id
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - description: Filter by repository names (e.g., 'owner/repo')
        in: query
        name: repo_names
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter by repository names (e.g., 'owner/repo')
          title: Repo Names
      - in: query
        name: category
        required: false
        schema:
          anyOf:
          - enum:
            - bug_fixing
            - ci_cd_and_devops
            - code_quality_and_security
            - code_review
            - code_review_and_analysis
            - data_and_automation
            - documentation_and_content
            - feature_development
            - migrations_and_upgrades
            - other
            - production_investigation
            - refactoring_and_optimization
            - research_and_exploration
            - security
            - unit_test_generation
            type: string
          - type: 'null'
          title: Category
      - in: query
        name: is_archived
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Archived
      - description: Filter to sessions created by any of these automations
        in: query
        name: automation_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          description: Filter to sessions created by any of these automations
          title: Automation Ids
      - description: Filter to child sessions spawned by this parent session
        in: query
        name: parent_session_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to child sessions spawned by this parent session
          title: Parent Session Id
      - in: query
        name: org_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Org Ids
      - in: query
        name: include_deleted_orgs
        required: false
        schema:
          default: false
          title: Include Deleted Orgs
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionInsightsResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List sessions with insights
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}:
    get:
      description: Get details of a specific session.
      operationId: handle_get_account_session_v3_enterprise_sessions__devin_id__get
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get session details
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}/attachments:
    get:
      description: List all attachments for a session.
      operationId: handle_get_account_session_attachments_v3_enterprise_sessions__devin_id__attachments_get
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SessionAttachment'
                title: Response Handle Get Account Session Attachments V3 Enterprise
                  Sessions  Devin Id  Attachments Get
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List session attachments
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}/insights:
    get:
      description: 'Get detailed insights for a specific session, including message
        counts,

        session size classification, and AI-generated analysis.'
      operationId: handle_get_account_session_insights_v3_enterprise_sessions__devin_id__insights_get
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionInsightsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get session insights
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}/insights/generate:
    post:
      description: 'Trigger on-demand generation of session insights.


        Returns ``already_exists`` if insights have already been generated.

        Otherwise kicks off generation in the background. Poll the

        GET insights endpoint to retrieve results once generation completes.'
      operationId: handle_generate_account_session_insights_v3_enterprise_sessions__devin_id__insights_generate_post
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionInsightsGenerateResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Generate session insights
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}/messages:
    get:
      description: List all messages for a session with cursor-based pagination, ordered
        chronologically.
      operationId: handle_get_account_session_messages_v3_enterprise_sessions__devin_id__messages_get
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: qs
        required: true
        schema:
          $ref: '#/components/schemas/CursorPaginationParams'
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionMessage_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List session messages
      tags:
      - sessions
    post:
      description: Send a message to an active session. The session will be automatically
        resumed if suspended.
      operationId: handle_post_account_session_message_v3_enterprise_sessions__devin_id__messages_post
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMessageCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Send a message to a session
      tags:
      - sessions
  /v3/enterprise/sessions/{devin_id}/tags:
    get:
      description: Get the tags for a specific session.
      operationId: handle_get_account_session_tags_v3_enterprise_sessions__devin_id__tags_get
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get session tags
      tags:
      - sessions
    post:
      description: Append tags to a session (deduplicating with existing tags).
      operationId: handle_append_account_session_tags_v3_enterprise_sessions__devin_id__tags_post
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionTagsUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Append session tags
      tags:
      - sessions
    put:
      description: Replace all tags on a session.
      operationId: handle_replace_account_session_tags_v3_enterprise_sessions__devin_id__tags_put
      parameters:
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: org_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionTagsUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace session tags
      tags:
      - sessions
  /v3/enterprise/snapshot-setup/blueprints:
    get:
      operationId: list_enterprise_blueprints_v3_enterprise_snapshot_setup_blueprints_get
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintList'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List enterprise-tier blueprints
      tags:
      - snapshot_setup
    post:
      description: 'Create the single enterprise-tier blueprint.


        Returns 409 if a blueprint already exists for this enterprise.'
      operationId: create_enterprise_blueprint_endpoint_v3_enterprise_snapshot_setup_blueprints_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEnterpriseBlueprintBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create the enterprise-tier blueprint
      tags:
      - snapshot_setup
  /v3/enterprise/snapshot-setup/blueprints/{blueprint_id}:
    delete:
      operationId: delete_enterprise_blueprint_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__delete
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete the enterprise blueprint (soft-delete)
      tags:
      - snapshot_setup
    get:
      operationId: get_enterprise_blueprint_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get the enterprise blueprint
      tags:
      - snapshot_setup
    put:
      operationId: update_enterprise_blueprint_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__put
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateBlueprintContentsBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace the enterprise blueprint's YAML contents
      tags:
      - snapshot_setup
  /v3/enterprise/snapshot-setup/blueprints/{blueprint_id}/contents:
    get:
      operationId: get_enterprise_blueprint_contents_v3_enterprise_snapshot_setup_blueprints__blueprint_id__contents_get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedDownload'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Presigned URL for the enterprise blueprint YAML
      tags:
      - snapshot_setup
  /v3/enterprise/snapshot-setup/blueprints/{blueprint_id}/files:
    get:
      operationId: list_enterprise_blueprint_files_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files_get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintFileList'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List enterprise blueprint files
      tags:
      - snapshot_setup
    post:
      description: 'Upload a file attachment (env-var substitution material) to the
        blueprint.


        Returns 409 if the derived env-var name collides with another active file.'
      operationId: upload_enterprise_blueprint_file_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files_post
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - in: query
        name: name
        required: true
        schema:
          title: Name
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_enterprise_blueprint_file_endpoint_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files_post'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintFile'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Upload an enterprise blueprint file
      tags:
      - snapshot_setup
  /v3/enterprise/snapshot-setup/blueprints/{blueprint_id}/files/{file_id}:
    delete:
      operationId: delete_enterprise_blueprint_file_v3_enterprise_snapshot_setup_blueprints__blueprint_id__files__file_id__delete
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - in: path
        name: file_id
        required: true
        schema:
          title: File Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete an enterprise blueprint file
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/attachments:
    post:
      description: Upload a file attachment that can be used in Devin sessions.
      operationId: handle_upload_attachment_v3_organizations__org_id__attachments_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_handle_upload_attachment_v3_organizations__org_id__attachments_post'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Upload an attachment
      tags:
      - attachments
  /v3/organizations/{org_id}/attachments/{uuid}/{name}:
    get:
      description: 'Download a file attachment.


        Returns a 307 redirect: to the IP-enforcing presigned proxy for orgs with
        an

        IP allowlist, or to a presigned S3 URL otherwise.'
      operationId: handle_download_attachment_v3_organizations__org_id__attachments__uuid___name__get
      parameters:
      - in: path
        name: uuid
        required: true
        schema:
          title: Uuid
          type: string
      - in: path
        name: name
        required: true
        schema:
          title: Name
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '307':
          description: Redirect to the attachment download URL
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Download an attachment
      tags:
      - attachments
  /v3/organizations/{org_id}/automations:
    get:
      description: 'List all automations for the organization, newest first.


        Supports `metadata.<key>=<value>` query parameters to filter on

        metadata labels (exact match; multiple filters AND together).


        `agent_types` filters to automations containing at least one action of a

        given agent type; repeat the parameter to match any of several types

        (OR). Action payloads live in customer-data storage rather than

        queryable columns, so this filter scans pages server-side. `total` is

        only returned when a single unfiltered scan covered the whole result set

        (first page, no further pages, nothing hidden); otherwise it is omitted

        rather than reporting a count that includes automations the API will

        never return.'
      operationId: handle_list_automations_v3_organizations__org_id__automations_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: search
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - in: query
        name: creator_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Creator Id
      - in: query
        name: enabled
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
      - in: query
        name: event_type
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Event Type
      - in: query
        name: agent_types
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - new_session
              - long_running
              - auto_triage
              - remediate_finding
              - triage_session
              - generic_assistant
              - incident_session
              - code_scan
              type: string
            type: array
          - type: 'null'
          title: Agent Types
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_AutomationResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List automations
      tags:
      - automations
    post:
      description: Create a new automation with triggers and actions.
      operationId: handle_create_automation_v3_organizations__org_id__automations_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create automation
      tags:
      - automations
  /v3/organizations/{org_id}/automations/schemas:
    get:
      description: 'Return all supported trigger event schemas, keyed by source then
        event name.


        Each schema describes the event''s payload fields, which operators its

        conditions support, and the valid `replies` verbs, so callers can

        construct valid `triggers` for the create and update endpoints.'
      operationId: handle_get_automation_schemas_v3_organizations__org_id__automations_schemas_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: Resolve `default_net_policy` and `security_profile` for a create
          that sets `security_profile.profile_id` to this profile. Requires the security-profile
          management permission.
        in: query
        name: security_profile_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resolve `default_net_policy` and `security_profile` for a create
            that sets `security_profile.profile_id` to this profile. Requires the
            security-profile management permission.
          title: Security Profile Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationSchemasResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get automation event schemas
      tags:
      - automations
  /v3/organizations/{org_id}/automations/templates:
    get:
      description: 'List the built-in automation templates.


        `template_id` values are accepted by the create endpoint; when

        `tools.mcp_servers` is omitted at create time, the template''s

        `required_mcps` apply.'
      operationId: handle_list_automation_templates_v3_organizations__org_id__automations_templates_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationTemplatesResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List automation templates
      tags:
      - automations
  /v3/organizations/{org_id}/automations/{automation_id}:
    delete:
      description: Soft delete an automation and return the deleted automation.
      operationId: handle_delete_automation_v3_organizations__org_id__automations__automation_id__delete
      parameters:
      - in: path
        name: automation_id
        required: true
        schema:
          title: Automation Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete automation
      tags:
      - automations
    get:
      description: Get a single automation by ID.
      operationId: handle_get_automation_v3_organizations__org_id__automations__automation_id__get
      parameters:
      - in: path
        name: automation_id
        required: true
        schema:
          title: Automation Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get automation
      tags:
      - automations
    patch:
      description: 'Update an automation.


        Present groups merge member-wise by default (RFC 7396): omitted members

        keep their stored value and explicit nulls clear them. List membership

        replaces wholesale, and each sent element merges onto the stored element

        of the same type when that type occurs exactly once on both sides.'
      operationId: handle_update_automation_v3_organizations__org_id__automations__automation_id__patch
      parameters:
      - in: path
        name: automation_id
        required: true
        schema:
          title: Automation Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update automation
      tags:
      - automations
  /v3/organizations/{org_id}/code-scans:
    post:
      description: 'Start a new code scan on a repository in the organization.


        The scan is enqueued and launched asynchronously by the scan dispatcher.

        The scan is attributed to the calling principal (the service user or PAT

        that made the request). Returns ``409`` when the organization''s scan

        backlog is at capacity.'
      operationId: handle_start_code_scan_v3_organizations__org_id__code_scans_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgCodeScanCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Start Code Scan
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/findings:
    get:
      description: 'List code scan findings for the organization.


        Findings are returned newest first. Optionally filter by ``scan_id``,

        ``repo_name``, ``severity``, ``status``, ``payoff``, and created/updated

        timestamp bounds (``created_after``/``created_before``,

        ``updated_after``/``updated_before``). Results are paginated with an opaque

        cursor (``after`` / ``first``).'
      operationId: handle_list_code_scan_findings_v3_organizations__org_id__code_scans_findings_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter to findings produced by this scan.
        in: query
        name: scan_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to findings produced by this scan.
          title: Scan Id
      - description: Filter to findings reported in this repository.
        in: query
        name: repo_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to findings reported in this repository.
          title: Repo Name
      - description: Filter to findings with any of these severities (critical, high,
          medium, low).
        in: query
        name: severity
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - critical
              - high
              - medium
              - low
              type: string
            type: array
          - type: 'null'
          description: Filter to findings with any of these severities (critical,
            high, medium, low).
          title: Severity
      - description: Filter to findings with any of these statuses (open, dismissed,
          resolved).
        in: query
        name: status
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - open
              - dismissed
              - resolved
              type: string
            type: array
          - type: 'null'
          description: Filter to findings with any of these statuses (open, dismissed,
            resolved).
          title: Status
      - description: Filter to findings in any of these payoff quadrants (quick_win,
          big_fix, easy_fix, deprioritize). Unrated findings (null fix_effort) never
          match.
        in: query
        name: payoff
        required: false
        schema:
          anyOf:
          - items:
              enum:
              - quick_win
              - big_fix
              - easy_fix
              - deprioritize
              type: string
            maxItems: 4
            type: array
          - type: 'null'
          description: Filter to findings in any of these payoff quadrants (quick_win,
            big_fix, easy_fix, deprioritize). Unrated findings (null fix_effort) never
            match.
          title: Payoff
      - description: Findings created at or after this unix timestamp (seconds).
        in: query
        name: created_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings created at or after this unix timestamp (seconds).
          title: Created After
      - description: Findings created at or before this unix timestamp (seconds).
        in: query
        name: created_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings created at or before this unix timestamp (seconds).
          title: Created Before
      - description: Findings updated at or after this unix timestamp (seconds).
        in: query
        name: updated_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings updated at or after this unix timestamp (seconds).
          title: Updated After
      - description: Findings updated at or before this unix timestamp (seconds).
        in: query
        name: updated_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          description: Findings updated at or before this unix timestamp (seconds).
          title: Updated Before
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanFindingResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scan Findings
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/ingestion:
    post:
      description: 'Start an ingestion-mode code scan on one or more repositories
        in the organization.


        The scan is enqueued and launched asynchronously by the scan dispatcher.

        Only ingest-mode profiles are accepted; a non-ingest profile is rejected

        with ``400``. Optional attachment URLs (uploaded via the attachments API)

        are provided to the scan. Returns ``409`` when the organization''s scan

        backlog is at capacity.'
      operationId: handle_start_ingestion_scan_v3_organizations__org_id__code_scans_ingestion_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartIngestionScanRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Start Ingestion Scan
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/metrics:
    get:
      description: 'Get aggregated code scan metrics for the organization.


        Returns scan, finding, and remediation-PR metrics for code scans created

        within the specified time range.'
      operationId: handle_get_code_scan_metrics_v3_organizations__org_id__code_scans_metrics_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan Metrics
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/profiles:
    get:
      description: 'List code scan profiles for the organization.


        Returns profile summaries (without guidance) newest first, including both

        org-owned and account-shared profiles. Results are paginated with an

        opaque cursor (``after`` / ``first``).'
      operationId: handle_list_code_scan_profiles_v3_organizations__org_id__code_scans_profiles_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanProfileSummaryResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scan Profiles
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/profiles/{profile_id}:
    get:
      description: 'Get a code scan profile by ID.


        Returns the profile''s metadata, visibility (org-owned or shared

        account-wide), and all of its guidance fields. Returns ``404`` when the

        profile does not exist or is not visible to the organization.'
      operationId: handle_get_code_scan_profile_v3_organizations__org_id__code_scans_profiles__profile_id__get
      parameters:
      - in: path
        name: profile_id
        required: true
        schema:
          title: Profile Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanProfileDetailResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan Profile
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/scans:
    get:
      description: 'List code scans for the organization.


        Scans are returned newest first. Optionally filter by ``repo_name`` and

        creation time (``time_after`` / ``time_before``); results are paginated

        with an opaque cursor (``after`` / ``first``).'
      operationId: handle_list_code_scans_v3_organizations__org_id__code_scans_scans_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter to scans that scanned this repository. Matches multi-repo
          scans even when the repository is not the scan's primary repo, so returned
          items may report a different repo_name.
        in: query
        name: repo_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to scans that scanned this repository. Matches multi-repo
            scans even when the repository is not the scan's primary repo, so returned
            items may report a different repo_name.
          title: Repo Name
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_CodeScanResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Code Scans
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}:
    get:
      description: 'Get a single code scan, including the files attached to it.


        Returns ``404`` when the scan is not in the organization.'
      operationId: handle_get_code_scan_v3_organizations__org_id__code_scans__scan_id__get
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Code Scan
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/auto-scan:
    delete:
      description: 'Remove the recurring auto-scan schedule for a code scan.


        Deletes the underlying schedule automation. Idempotent: returns ``204``

        even when no schedule is configured.'
      operationId: handle_delete_auto_scan_schedule_v3_organizations__org_id__code_scans__scan_id__auto_scan_delete
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete Auto-Scan Schedule
      tags:
      - code-scans
    post:
      description: 'Create the recurring auto-scan schedule for a code scan.


        Auto-scan is backed by an automation with a ``schedule:recurring`` trigger

        (carrying the rrule) and a ``scan_new_commits`` action targeting this

        scan; when the schedule fires, commits landed since the last scan are

        scanned. Create-only: returns ``409`` if the scan already has a schedule

        (delete it first to change it).'
      operationId: handle_create_auto_scan_schedule_v3_organizations__org_id__code_scans__scan_id__auto_scan_post
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoScanScheduleCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoScanScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create Auto-Scan Schedule
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/effort:
    put:
      description: 'Set the effort applied to future incremental runs of a scan.


        Completed runs and their findings are unaffected. The scan must not

        have an active run (``409`` otherwise).'
      operationId: handle_update_code_scan_effort_v3_organizations__org_id__code_scans__scan_id__effort_put
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeScanEffortUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanEffortResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update Code Scan Effort
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/findings/remediate:
    post:
      description: 'Launch one Devin session to remediate several findings of a code
        scan.


        A batch of two or more findings (which may span repositories) gets a

        planner session that groups them and launches a fix session per group,

        each on its own branch with its own pull request. A single finding gets a

        fix session directly. The session is attributed to the calling principal.

        Returns ``409`` if any finding already has a remediation session, in which

        case none of them is claimed.


        Instead of ``finding_ids``, ``select_all`` remediates every open finding

        matching its filters that is not already being remediated.'
      operationId: handle_remediate_code_scan_findings_v3_organizations__org_id__code_scans__scan_id__findings_remediate_post
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemediateFindingsRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemediateFindingsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remediate Code Scan Findings
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/findings/{finding_id}/remediate:
    post:
      description: 'Launch a Devin session to remediate a code scan finding.


        The session analyzes the vulnerable code, implements a fix, and opens a

        pull request. The session is attributed to the calling principal (the

        service user or PAT that made the request). Returns ``409`` if the finding

        already has a remediation session.'
      operationId: handle_remediate_code_scan_finding_v3_organizations__org_id__code_scans__scan_id__findings__finding_id__remediate_post
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - in: path
        name: finding_id
        required: true
        schema:
          title: Finding Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemediateFindingResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remediate Code Scan Finding
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/profile:
    put:
      description: 'Switch the profile applied to future incremental runs of a scan.


        Incremental re-scans pick up their profile through the scan''s profile

        link, so repointing the link changes the profile used from the next run

        onward. Completed runs and their findings are unaffected. The new

        profile must have the same scan type and mode as the current one, and

        the scan must not have an active run (``409`` otherwise).'
      operationId: handle_switch_code_scan_profile_v3_organizations__org_id__code_scans__scan_id__profile_put
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CodeScanProfileSwitchRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeScanProfileSwitchResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Switch Code Scan Profile
      tags:
      - code-scans
  /v3/organizations/{org_id}/code-scans/{scan_id}/scan-new-commits:
    post:
      description: 'Immediately trigger an incremental (diff) scan of new commits.


        Re-runs the scan against only the commits landed since it last completed.

        This is the one-off, on-demand form of the auto-scan schedule. Returns

        ``409`` if the scan has no completed run to extend or is already in

        progress.'
      operationId: handle_scan_new_commits_v3_organizations__org_id__code_scans__scan_id__scan_new_commits_post
      parameters:
      - in: path
        name: scan_id
        required: true
        schema:
          title: Scan Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanNewCommitsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Scan New Commits
      tags:
      - code-scans
  /v3/organizations/{org_id}/consumption/daily:
    get:
      description: 'Get daily ACU consumption for the organization.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC.'
      operationId: handle_get_consumption_daily_v3_organizations__org_id__consumption_daily_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Daily Consumption
      tags:
      - consumption
  /v3/organizations/{org_id}/consumption/daily/service-users/{service_user_id}:
    get:
      description: 'Get daily ACU consumption for a specific service user within the
        organization.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC.'
      operationId: handle_get_service_user_consumption_daily_v3_organizations__org_id__consumption_daily_service_users__service_user_id__get
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Service User Daily Consumption
      tags:
      - consumption
  /v3/organizations/{org_id}/consumption/daily/sessions/{session_id}:
    get:
      description: 'Get daily ACU consumption for a specific session within the organization.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC.'
      operationId: handle_get_session_consumption_daily_v3_organizations__org_id__consumption_daily_sessions__session_id__get
      parameters:
      - description: 'Session ID (prefix: devin-). Alias for devin_id used in consumption
          endpoints.'
        in: path
        name: session_id
        required: true
        schema:
          example: devin-abc123def456
          title: Session Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session Daily Consumption
      tags:
      - consumption
  /v3/organizations/{org_id}/consumption/daily/users/{user_id}:
    get:
      description: 'Get daily ACU consumption for a specific user within the organization.


        **Timezone behavior**: Billing cycles use midnight PST (Pacific Standard Time)

        as the day boundary, which corresponds to 08:00:00 UTC.'
      operationId: handle_get_user_consumption_daily_v3_organizations__org_id__consumption_daily_users__user_id__get
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumptionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get User Daily Consumption
      tags:
      - consumption
  /v3/organizations/{org_id}/knowledge/folders:
    get:
      description: Return the full folder tree with per-folder note counts.
      operationId: handle_list_folders_v3_organizations__org_id__knowledge_folders_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderTreeResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get knowledge folder structure with note counts.
      tags:
      - notes
  /v3/organizations/{org_id}/knowledge/notes:
    get:
      description: List notes for an organization.
      operationId: handle_list_notes_v3_organizations__org_id__knowledge_notes_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: search
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - in: query
        name: folder_path
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Folder Path
      - in: query
        name: pinned_repo
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Pinned Repo
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_KnowledgeNoteResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List org-level notes
      tags:
      - notes
    post:
      description: Create a note for an organization.
      operationId: handle_create_note_v3_organizations__org_id__knowledge_notes_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeNoteCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an org-level note
      tags:
      - notes
  /v3/organizations/{org_id}/knowledge/notes/{note_id}:
    delete:
      description: Delete a note for an organization.
      operationId: handle_delete_note_v3_organizations__org_id__knowledge_notes__note_id__delete
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete an org-level note
      tags:
      - notes
    get:
      description: Get a note by ID for an organization.
      operationId: handle_get_note_v3_organizations__org_id__knowledge_notes__note_id__get
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get an org-level note
      tags:
      - notes
    put:
      description: Update a note for an organization.
      operationId: handle_update_note_v3_organizations__org_id__knowledge_notes__note_id__put
      parameters:
      - description: 'Knowledge note ID (prefix: note-)'
        in: path
        name: note_id
        required: true
        schema:
          example: note-abc123def456
          title: Note Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeNoteCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeNoteResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update an org-level note
      tags:
      - notes
  /v3/organizations/{org_id}/metrics/active-users:
    get:
      description: Get unique active users for a custom date range.
      operationId: handle_get_active_users_metrics_v3_organizations__org_id__metrics_active_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Active Users for Custom Date Range
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/dau:
    get:
      description: Get daily active users for each day in the specified time range.
      operationId: handle_get_dau_metrics_v3_organizations__org_id__metrics_dau_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Daily Active Users
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/mau:
    get:
      description: Get monthly active users for each month in the specified time range.
      operationId: handle_get_mau_metrics_v3_organizations__org_id__metrics_mau_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Monthly Active Users
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/prs:
    get:
      description: Get aggregated PR metrics for the organization.
      operationId: handle_get_pr_metrics_v3_organizations__org_id__metrics_prs_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get PR Metrics
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/searches:
    get:
      description: Get aggregated search metrics for the organization.
      operationId: handle_get_search_metrics_v3_organizations__org_id__metrics_searches_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Search Metrics
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/sessions:
    get:
      description: Get aggregated session metrics for the organization.
      operationId: handle_get_session_metrics_v3_organizations__org_id__metrics_sessions_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: User Ids
      - in: query
        name: service_user_ids
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Service User Ids
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: playbook_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Playbook Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session Metrics
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/usage:
    get:
      description: Get aggregated usage metrics for the organization.
      operationId: handle_get_usage_metrics_v3_organizations__org_id__metrics_usage_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageMetrics'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Usage Metrics
      tags:
      - metrics
  /v3/organizations/{org_id}/metrics/wau:
    get:
      description: Get weekly active users for each week in the specified time range.
      operationId: handle_get_wau_metrics_v3_organizations__org_id__metrics_wau_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: time_before
        required: true
        schema:
          title: Time Before
          type: integer
      - in: query
        name: time_after
        required: true
        schema:
          title: Time After
          type: integer
      - in: query
        name: min_sessions
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Sessions
          type: integer
      - in: query
        name: min_searches
        required: false
        schema:
          default: 1
          minimum: 0
          title: Min Searches
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveUserMetricsListResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Weekly Active Users
      tags:
      - metrics
  /v3/organizations/{org_id}/playbooks:
    get:
      deprecated: true
      description: List playbooks for an organization.
      operationId: handle_list_playbooks_v3_organizations__org_id__playbooks_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: 'Also return the enterprise-level playbooks shared with this
          organization (`access_type: enterprise`). They are read-only through the
          organization API.'
        in: query
        name: include_enterprise
        required: false
        schema:
          default: false
          description: 'Also return the enterprise-level playbooks shared with this
            organization (`access_type: enterprise`). They are read-only through the
            organization API.'
          title: Include Enterprise
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_PlaybookResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List org-level playbooks
      tags:
      - playbooks
    post:
      deprecated: true
      description: Create a playbook for an organization.
      operationId: handle_create_playbook_v3_organizations__org_id__playbooks_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybookCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an org-level playbook
      tags:
      - playbooks
  /v3/organizations/{org_id}/playbooks/{playbook_id}:
    delete:
      deprecated: true
      description: Delete a playbook for an organization.
      operationId: handle_delete_playbook_v3_organizations__org_id__playbooks__playbook_id__delete
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete an org-level playbook
      tags:
      - playbooks
    get:
      deprecated: true
      description: Get a specific organization- or enterprise-level playbook.
      operationId: handle_get_playbook_v3_organizations__org_id__playbooks__playbook_id__get
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get an organization- or enterprise-level playbook by ID
      tags:
      - playbooks
    put:
      deprecated: true
      description: Update a playbook for an organization.
      operationId: handle_update_playbook_v3_organizations__org_id__playbooks__playbook_id__put
      parameters:
      - description: 'Playbook ID (prefix: playbook-)'
        in: path
        name: playbook_id
        required: true
        schema:
          example: playbook-abc123def456
          title: Playbook Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaybookCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaybookResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update an org-level playbook
      tags:
      - playbooks
  /v3/organizations/{org_id}/pr-reviews:
    get:
      description: 'Return the latest Devin Review for a PR scoped to the organization.


        When ``commit_sha`` is omitted, the PR''s current head commit is

        fetched from the provider and used. Returns ``404`` when no review

        exists for the resolved commit.'
      operationId: handle_get_pr_review_status_v3_organizations__org_id__pr_reviews_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: Full URL of the pull/merge request to look up (e.g. `https://github.com/owner/repo/pull/123`).
        in: query
        name: pr_url
        required: true
        schema:
          description: Full URL of the pull/merge request to look up (e.g. `https://github.com/owner/repo/pull/123`).
          examples:
          - https://github.com/owner/repo/pull/123
          title: Pr Url
          type: string
      - description: Commit SHA to look up (full or short prefix). Defaults to the
          PR's current head commit when omitted.
        in: query
        name: commit_sha
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Commit SHA to look up (full or short prefix). Defaults to the
            PR's current head commit when omitted.
          examples:
          - abc123def4567890abc123def4567890abc123de
          title: Commit Sha
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get latest Devin Review status
      tags:
      - pr-reviews
    post:
      description: 'Trigger a Devin Review for a pull/merge request.


        Creates a database record that will be picked up by the review

        worker pool. Always fetches the latest commit from the PR.'
      operationId: handle_create_pr_review_v3_organizations__org_id__pr_reviews_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrReviewCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrReviewResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Trigger Devin Review
      tags:
      - pr-reviews
  /v3/organizations/{org_id}/repositories:
    get:
      operationId: handle_list_repositories_v3_organizations__org_id__repositories_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 100
          minimum: 1
          title: First
          type: integer
      - in: query
        name: filter_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Filter Name
      - in: query
        name: only_repo_paths
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Only Repo Paths
      - in: query
        name: exclude_repo_paths
        required: false
        schema:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Exclude Repo Paths
      - in: query
        name: load_indexing_status
        required: false
        schema:
          default: true
          title: Load Indexing Status
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_RepositoryResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List repositories available to an organization
      tags:
      - repositories
  /v3/organizations/{org_id}/repositories/indexing:
    delete:
      description: Disables indexing and clears configured branches for a batch of
        repositories.
      operationId: handle_bulk_remove_repositories_from_indexing_v3_organizations__org_id__repositories_indexing_delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveRepositoriesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/RepositoryIndexingResponse'
                title: Response Handle Bulk Remove Repositories From Indexing V3 Organizations  Org
                  Id  Repositories Indexing Delete
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Bulk remove repositories from indexing
      tags:
      - repositories
    get:
      operationId: handle_list_indexed_repositories_v3_organizations__org_id__repositories_indexing_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Case-insensitive substring filter on the repository path.
        in: query
        name: filter_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Case-insensitive substring filter on the repository path.
          title: Filter Name
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_RepositoryIndexingResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List indexed repositories
      tags:
      - repositories
    put:
      description: Idempotently enables indexing for a batch of repositories and triggers
        indexing jobs.
      operationId: handle_bulk_index_repositories_v3_organizations__org_id__repositories_indexing_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkIndexRepositoriesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/RepositoryIndexingResponse'
                title: Response Handle Bulk Index Repositories V3 Organizations  Org
                  Id  Repositories Indexing Put
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Bulk index repositories
      tags:
      - repositories
  /v3/organizations/{org_id}/repositories/{repository_path}/indexing:
    delete:
      description: Disables indexing and clears configured branches for a single repository.
      operationId: handle_remove_single_repository_from_indexing_v3_organizations__org_id__repositories__repository_path__indexing_delete
      parameters:
      - in: path
        name: repository_path
        required: true
        schema:
          title: Repository Path
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryIndexingResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remove a repository from indexing
      tags:
      - repositories
    get:
      operationId: handle_get_repository_indexing_status_v3_organizations__org_id__repositories__repository_path__indexing_get
      parameters:
      - in: path
        name: repository_path
        required: true
        schema:
          title: Repository Path
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoIndexingStatusResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get indexing status for a repository
      tags:
      - repositories
    put:
      description: Idempotently enables indexing for a single repository and triggers
        indexing jobs.
      operationId: handle_index_single_repository_v3_organizations__org_id__repositories__repository_path__indexing_put
      parameters:
      - in: path
        name: repository_path
        required: true
        schema:
          title: Repository Path
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/IndexRepositoryRequest'
              - type: 'null'
              title: Payload
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryIndexingResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Index a repository
      tags:
      - repositories
  /v3/organizations/{org_id}/repositories/{repository_path}/indexing/branches/{branch_name}:
    delete:
      operationId: handle_remove_branch_v3_organizations__org_id__repositories__repository_path__indexing_branches__branch_name__delete
      parameters:
      - in: path
        name: repository_path
        required: true
        schema:
          title: Repository Path
          type: string
      - in: path
        name: branch_name
        required: true
        schema:
          title: Branch Name
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryIndexingResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Remove a branch from indexing
      tags:
      - repositories
  /v3/organizations/{org_id}/schedules:
    get:
      deprecated: true
      description: 'List all schedules for the organization.


        **Deprecated.** Schedules are superseded by Automations: create an automation
        with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`
        instead. This endpoint remains available for existing schedules.'
      operationId: handle_list_schedules_v3_organizations__org_id__schedules_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: limit
        required: false
        schema:
          default: 200
          maximum: 200
          minimum: 1
          title: Limit
          type: integer
      - in: query
        name: offset
        required: false
        schema:
          default: 0
          minimum: 0
          title: Offset
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ScheduleResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List schedules
      tags:
      - schedules
    post:
      deprecated: true
      description: 'Create a new scheduled session.


        **Deprecated.** Schedules are superseded by Automations: create an automation
        with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`
        instead. For organizations migrated to Automations this endpoint returns `403`;
        existing schedules remain readable, updatable, and deletable.'
      operationId: handle_create_schedule_v3_organizations__org_id__schedules_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create schedule
      tags:
      - schedules
  /v3/organizations/{org_id}/schedules/{schedule_id}:
    delete:
      deprecated: true
      description: 'Soft delete a schedule.


        **Deprecated.** Schedules are superseded by Automations: create an automation
        with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`
        instead. This endpoint remains available for existing schedules.'
      operationId: handle_delete_schedule_v3_organizations__org_id__schedules__schedule_id__delete
      parameters:
      - description: 'Schedule ID (prefix: sched-)'
        in: path
        name: schedule_id
        required: true
        schema:
          example: sched-abc123def456
          title: Schedule Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete schedule
      tags:
      - schedules
    get:
      deprecated: true
      description: 'Get a specific schedule by ID.


        **Deprecated.** Schedules are superseded by Automations: create an automation
        with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`
        instead. This endpoint remains available for existing schedules.'
      operationId: handle_get_schedule_v3_organizations__org_id__schedules__schedule_id__get
      parameters:
      - description: 'Schedule ID (prefix: sched-)'
        in: path
        name: schedule_id
        required: true
        schema:
          example: sched-abc123def456
          title: Schedule Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get schedule
      tags:
      - schedules
    patch:
      deprecated: true
      description: 'Update an existing schedule.


        **Deprecated.** Schedules are superseded by Automations: create an automation
        with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`
        instead. This endpoint remains available for existing schedules.'
      operationId: handle_update_schedule_v3_organizations__org_id__schedules__schedule_id__patch
      parameters:
      - description: 'Schedule ID (prefix: sched-)'
        in: path
        name: schedule_id
        required: true
        schema:
          example: sched-abc123def456
          title: Schedule Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update schedule
      tags:
      - schedules
  /v3/organizations/{org_id}/secrets:
    get:
      description: List secrets for an organization.
      operationId: handle_list_secrets_v3_organizations__org_id__secrets_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SecretResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List org-level secrets
      tags:
      - secrets
    post:
      description: Create a secret for an organization.
      operationId: handle_create_secret_v3_organizations__org_id__secrets_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SecretCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an org-level secret
      tags:
      - secrets
  /v3/organizations/{org_id}/secrets/{secret_id}:
    delete:
      description: Delete a secret for an organization.
      operationId: handle_delete_secret_v3_organizations__org_id__secrets__secret_id__delete
      parameters:
      - description: 'Secret ID (prefix: secret-)'
        in: path
        name: secret_id
        required: true
        schema:
          example: secret-abc123def456
          title: Secret Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecretResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete an org-level secret
      tags:
      - secrets
  /v3/organizations/{org_id}/sessions:
    get:
      description: List sessions.
      operationId: handle_get_sessions_v3_organizations__org_id__sessions_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - in: query
        name: qs
        required: true
        schema:
          $ref: '#/components/schemas/SessionsQueryParams'
      - in: query
        name: devin_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Sessions
      tags:
      - sessions
    post:
      description: Create a new session
      operationId: handle_create_session_v3_organizations__org_id__sessions_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - in: query
        name: devin_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Devin Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create Session
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/insights:
    get:
      description: 'List sessions with detailed insights including message counts,

        session size classification, and AI-generated analysis.'
      operationId: handle_get_sessions_insights_v3_organizations__org_id__sessions_insights_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - in: query
        name: qs
        required: true
        schema:
          $ref: '#/components/schemas/SessionsQueryParams'
      - in: query
        name: devin_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionInsightsResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List sessions with insights
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}:
    delete:
      description: Terminate session
      operationId: handle_terminate_session_v3_organizations__org_id__sessions__devin_id__delete
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - description: Whether to archive the Devin session
        in: query
        name: archive
        required: false
        schema:
          default: false
          description: Whether to archive the Devin session
          title: Archive
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Terminate Session
      tags:
      - sessions
    get:
      description: Get details of a specific session.
      operationId: handle_get_session_v3_organizations__org_id__sessions__devin_id__get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Session
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/archive:
    post:
      description: Archive session and put it to sleep if currently running
      operationId: handle_archive_session_v3_organizations__org_id__sessions__devin_id__archive_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Archive Session
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/attachments:
    get:
      description: List all attachments for a session.
      operationId: handle_get_session_attachments_v3_organizations__org_id__sessions__devin_id__attachments_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/SessionAttachment'
                title: Response Handle Get Session Attachments V3 Organizations  Org
                  Id  Sessions  Devin Id  Attachments Get
                type: array
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List session attachments
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/insights:
    get:
      description: 'Get detailed insights for a specific session, including message
        counts,

        session size classification, and AI-generated analysis.'
      operationId: handle_get_session_insights_v3_organizations__org_id__sessions__devin_id__insights_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionInsightsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get session insights
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/insights/generate:
    post:
      description: 'Trigger on-demand generation of session insights.


        Returns ``already_exists`` if insights have already been generated.

        Otherwise kicks off generation in the background. Poll the

        GET insights endpoint to retrieve results once generation completes.'
      operationId: handle_generate_session_insights_v3_organizations__org_id__sessions__devin_id__insights_generate_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionInsightsGenerateResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Generate session insights
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/messages:
    get:
      description: List all messages for a session with cursor-based pagination, ordered
        chronologically.
      operationId: handle_get_session_messages_v3_organizations__org_id__sessions__devin_id__messages_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionMessage_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List session messages
      tags:
      - sessions
    post:
      description: Send a message to an active session. The session will be automatically
        resumed if suspended.
      operationId: handle_post_message_v3_organizations__org_id__sessions__devin_id__messages_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMessageCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Send a message to a session
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/tags:
    get:
      description: Get the tags for a specific session.
      operationId: handle_get_session_tags_v3_organizations__org_id__sessions__devin_id__tags_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get session tags
      tags:
      - sessions
    post:
      description: Append tags to a session (deduplicating with existing tags).
      operationId: handle_append_session_tags_v3_organizations__org_id__sessions__devin_id__tags_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionTagsUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Append session tags
      tags:
      - sessions
    put:
      description: Replace all tags on a session.
      operationId: handle_replace_session_tags_v3_organizations__org_id__sessions__devin_id__tags_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionTagsUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionTagsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Replace session tags
      tags:
      - sessions
  /v3/organizations/{org_id}/sessions/{devin_id}/unarchive:
    post:
      description: Unarchive session (does not cascade to child sessions)
      operationId: handle_unarchive_session_v3_organizations__org_id__sessions__devin_id__unarchive_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: org-abc123def456
          title: Org Id
      - description: 'Devin session ID (prefix: devin-)'
        in: path
        name: devin_id
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          example: devin-abc123def456
          title: Devin Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Unarchive Session
      tags:
      - sessions
  /v3/organizations/{org_id}/snapshot-setup/blueprints:
    get:
      operationId: list_org_blueprints_v3_organizations__org_id__snapshot_setup_blueprints_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - description: Filter to a specific repository (e.g. 'org/repo').
        in: query
        name: repo_name
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter to a specific repository (e.g. 'org/repo').
          title: Repo Name
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintList'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List org- and repo-tier blueprints
      tags:
      - snapshot_setup
    post:
      description: "Create a blueprint.  ``type`` is inferred from ``repo_name``.\n\
        \n``source`` defaults to ``database``.  With ``source='git'`` the YAML\n(and\
        \ any ``includes``) is read from ``.devin/blueprint.yaml`` on the\nrepo's\
        \ default branch \u2014 404 when the file is absent, 422 when it is\ninvalid,\
        \ 502 when the git provider is unreachable.\n\nPer spec, this never auto-triggers\
        \ a build \u2014 callers must\n``POST /builds`` explicitly."
      operationId: create_org_blueprint_v3_organizations__org_id__snapshot_setup_blueprints_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrgBlueprintBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create an org- or repo-tier blueprint
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}:
    delete:
      operationId: delete_org_blueprint_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__delete
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Soft-delete a blueprint
      tags:
      - snapshot_setup
    get:
      operationId: get_org_blueprint_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get a single blueprint
      tags:
      - snapshot_setup
    patch:
      description: "Partial update for a single blueprint. Does NOT auto-trigger a\
        \ build.\n\nFields honored:\n\n- ``contents`` \u2014 writes a new YAML version\
        \ for the blueprint.\n- ``position`` \u2014 sets the repo-tier blueprint's\
        \ execution position.\n  Returns ``400`` on an org-tier blueprint (those have\
        \ no position).\n- ``source`` \u2014 switches the repo between ``git`` and\
        \ ``database`` mode.\n  Root repo-tier blueprints only. ``{\"source\": \"\
        database\", \"contents\":\n  ...}`` detaches with ``contents`` as the new\
        \ (single) version.\n- ``build_on_default_branch_commit`` / ``report_check_runs``\
        \ \u2014 per-repo\n  commit builds and their GitHub check runs. Root blueprints\
        \ of\n  github.com repos only.\n\nReturns ``400`` when the body is empty."
      operationId: update_org_blueprint_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__patch
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrgBlueprintBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Blueprint'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Update a blueprint's contents, position, source and/or commit-build
        settings
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}/contents:
    get:
      operationId: get_org_blueprint_contents_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__contents_get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedDownload'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Presigned URL for the blueprint's YAML
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}/files:
    get:
      operationId: list_org_blueprint_files_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files_get
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintFileList'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List blueprint files
      tags:
      - snapshot_setup
    post:
      operationId: upload_org_blueprint_file_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files_post
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: name
        required: true
        schema:
          title: Name
          type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload_org_blueprint_file_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files_post'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlueprintFile'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Upload a blueprint file
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}/files/{file_id}:
    delete:
      operationId: delete_org_blueprint_file_v3_organizations__org_id__snapshot_setup_blueprints__blueprint_id__files__file_id__delete
      parameters:
      - in: path
        name: blueprint_id
        required: true
        schema:
          title: Blueprint Id
          type: string
      - in: path
        name: file_id
        required: true
        schema:
          title: File Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Delete a blueprint file
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/builds:
    get:
      operationId: list_org_builds_v3_organizations__org_id__snapshot_setup_builds_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by spec status.
        in: query
        name: status
        required: false
        schema:
          anyOf:
          - enum:
            - pending
            - running
            - succeeded
            - failed
            - cancelled
            type: string
          - type: 'null'
          description: Filter by spec status.
          title: Status
      - description: 'If true, returns 0 or 1 items: the build whose image is currently
          used by new sessions.'
        in: query
        name: active
        required: false
        schema:
          anyOf:
          - type: boolean
          - type: 'null'
          description: 'If true, returns 0 or 1 items: the build whose image is currently
            used by new sessions.'
          title: Active
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_Build_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List builds for the org
      tags:
      - snapshot_setup
    post:
      description: Manually trigger a snapshot build using the org's current blueprints.
      operationId: trigger_org_build_v3_organizations__org_id__snapshot_setup_builds_post
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerBuildBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Trigger a manual build
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/builds/{build_id}:
    get:
      operationId: get_org_build_v3_organizations__org_id__snapshot_setup_builds__build_id__get
      parameters:
      - in: path
        name: build_id
        required: true
        schema:
          title: Build Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get a single build
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/builds/{build_id}/cancel:
    post:
      operationId: cancel_org_build_v3_organizations__org_id__snapshot_setup_builds__build_id__cancel_post
      parameters:
      - in: path
        name: build_id
        required: true
        schema:
          title: Build Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Cancel an in-flight build
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/builds/{build_id}/logs:
    get:
      operationId: get_org_build_logs_v3_organizations__org_id__snapshot_setup_builds__build_id__logs_get
      parameters:
      - in: path
        name: build_id
        required: true
        schema:
          title: Build Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresignedDownload'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Presigned URL for the build's log file
      tags:
      - snapshot_setup
  /v3/organizations/{org_id}/snapshot-setup/builds/{build_id}/pin:
    delete:
      description: 'Unpin the org if and only if it is currently pinned to ``build_id``.


        No-op (still 204) when the org is not pinned to this build.'
      operationId: unpin_org_build_v3_organizations__org_id__snapshot_setup_builds__build_id__pin_delete
      parameters:
      - in: path
        name: build_id
        required: true
        schema:
          title: Build Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '204':
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Unpin a build (no-op if not pinned)
      tags:
      - snapshot_setup
    post:
      description: 'Pin a successful build (less than 7 days old).


        Translates the SDK''s 400 errors into 409 (per spec: "409 if the

        build is not succeeded, or older than 7 days").'
      operationId: pin_org_build_v3_organizations__org_id__snapshot_setup_builds__build_id__pin_post
      parameters:
      - in: path
        name: build_id
        required: true
        schema:
          title: Build Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PinBuildBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Build'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Pin the org to a specific successful build
      tags:
      - snapshot_setup
  /v3/self:
    get:
      operationId: handle_get_self_v3_self_get
      responses:
        '200':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ServiceUserSelf'
                - $ref: '#/components/schemas/PatUserSelf'
                - $ref: '#/components/schemas/DevinBrainUserSelf'
                - $ref: '#/components/schemas/WindsurfSessionUserSelf'
                title: Response Handle Get Self V3 Self Get
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Self
      tags:
      - self
  /v3beta1/ai-gateway/metrics:
    get:
      description: 'Query account-wide production OTel measurements. Requires

        account.ai_gateway.view_metrics for service users and PATs on any account
        type.

        E2E covers HTTP 200 responses. Requests without tenant attribution are excluded.

        Missing data stays null; this telemetry is independent of trace sampling and
        is

        not billing data. See the metric reference for populations and derivations.'
      operationId: handle_get_ai_gateway_metrics_v3beta1_ai_gateway_metrics_get
      parameters:
      - description: The gateway measurement to query.
        in: query
        name: metric
        required: true
        schema:
          $ref: '#/components/schemas/AiGatewayMetric'
          description: The gateway measurement to query.
      - description: Inclusive start, in Unix seconds. Must be a multiple of interval_seconds.
        in: query
        name: time_after
        required: true
        schema:
          description: Inclusive start, in Unix seconds. Must be a multiple of interval_seconds.
          title: Time After
          type: integer
      - description: Exclusive end, in Unix seconds. Must be a multiple of interval_seconds.
        in: query
        name: time_before
        required: true
        schema:
          description: Exclusive end, in Unix seconds. Must be a multiple of interval_seconds.
          title: Time Before
          type: integer
      - description: Requested bucket width; must evenly divide 86400. Datadog may
          return coarser buckets.
        in: query
        name: interval_seconds
        required: false
        schema:
          default: 300
          description: Requested bucket width; must evenly divide 86400. Datadog may
            return coarser buckets.
          maximum: 86400
          minimum: 60
          title: Interval Seconds
          type: integer
      - description: Model family such as kimi-k3 (every reasoning effort combined),
          or one model ID such as kimi-k3-high (case-insensitive). Omit for all models,
          reported by family.
        in: query
        name: model
        required: false
        schema:
          anyOf:
          - pattern: ^[a-zA-Z0-9][a-zA-Z0-9_./-]{0,199}$
            type: string
          - type: 'null'
          description: Model family such as kimi-k3 (every reasoning effort combined),
            or one model ID such as kimi-k3-high (case-insensitive). Omit for all
            models, reported by family.
          title: Model
      - description: 'Counters: sum. Distributions: avg, p50, p90, p95 (default),
          p99. Streaming share: ratio.'
        in: query
        name: aggregation
        required: false
        schema:
          anyOf:
          - enum:
            - sum
            - avg
            - p50
            - p90
            - p95
            - p99
            - ratio
            type: string
          - type: 'null'
          description: 'Counters: sum. Distributions: avg, p50, p90, p95 (default),
            p99. Streaming share: ratio.'
          title: Aggregation
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiGatewayMetricsResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Query AI Gateway Metrics
      tags:
      - ai-gateway-metrics
  /v3beta1/enterprise/guardrail-violations:
    get:
      description: List guardrail violations across the enterprise.
      operationId: handle_get_enterprise_guardrail_violations_v3beta1_enterprise_guardrail_violations_get
      parameters:
      - in: query
        name: order
        required: false
        schema:
          default: desc
          enum:
          - asc
          - desc
          title: Order
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: session_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
      - in: query
        name: guardrail_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Guardrail Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GuardrailViolationResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Guardrail Violations
      tags:
      - guardrail_violations
  /v3beta1/enterprise/organizations/{org_id}/guardrail-violations:
    get:
      description: List guardrail violations for a specific organization.
      operationId: handle_get_org_guardrail_violations_v3beta1_enterprise_organizations__org_id__guardrail_violations_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: order
        required: false
        schema:
          default: desc
          enum:
          - asc
          - desc
          title: Order
          type: string
      - in: query
        name: time_before
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time Before
      - in: query
        name: time_after
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Time After
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - in: query
        name: session_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Session Id
      - in: query
        name: guardrail_id
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Guardrail Id
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_GuardrailViolationResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization Guardrail Violations
      tags:
      - guardrail_violations
  /v3beta1/enterprise/service-users/{service_user_id}/api-keys:
    get:
      description: List API keys for a service user, optionally filtered by status.
      operationId: handle_list_service_user_api_keys_v3beta1_enterprise_service_users__service_user_id__api_keys_get
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      - in: query
        name: status
        required: false
        schema:
          default: all
          enum:
          - active
          - revoked
          - expired
          - all
          title: Status
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ApiKeyResponse_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List API keys for service user
      tags:
      - service_user_api_keys
    post:
      description: 'Create a new API key for a service user.


        The caller must have ManageAccountServiceUsers permission. Returns 409

        while static service user keys are disabled for the enterprise, unless the

        service user backs SCIM or an active Outpost.'
      operationId: handle_create_service_user_api_key_v3beta1_enterprise_service_users__service_user_id__api_keys_post
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApiKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyWithTokenResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Create API key for service user
      tags:
      - service_user_api_keys
  /v3beta1/enterprise/service-users/{service_user_id}/api-keys/{api_key_id}:
    delete:
      description: 'Revoke an API key for a service user.


        Returns 404 if the key is not found, 409 if already revoked.'
      operationId: handle_revoke_service_user_api_key_v3beta1_enterprise_service_users__service_user_id__api_keys__api_key_id__delete
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      - in: path
        name: api_key_id
        required: true
        schema:
          title: Api Key Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Revoke API key for service user
      tags:
      - service_user_api_keys
  /v3beta1/enterprise/service-users/{service_user_id}/api-keys/{api_key_id}/rotate:
    post:
      description: 'Rotate an API key for a service user.


        Creates a new key. By default revokes the old key; set revoke_current=false

        for graceful rollover where both keys remain active temporarily.

        Returns 404 if the key is not found, 400 if the key is not active, and 409

        while static service user keys are disabled for the enterprise, unless the

        service user backs SCIM or an active Outpost.'
      operationId: handle_rotate_service_user_api_key_v3beta1_enterprise_service_users__service_user_id__api_keys__api_key_id__rotate_post
      parameters:
      - description: 'Service user ID (prefix: service-user-)'
        in: path
        name: service_user_id
        required: true
        schema:
          example: service-user-abc123def456
          title: Service User Id
          type: string
      - in: path
        name: api_key_id
        required: true
        schema:
          title: Api Key Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RotateApiKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyWithTokenResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Rotate API key for service user
      tags:
      - service_user_api_keys
  /v3beta1/organizations/{org_id}/default-platform:
    get:
      description: 'Get the organization''s default placement for new sessions.


        This is the organization-wide default shown under Settings > Devin; a

        user''s personal default, when set, takes precedence for their own

        sessions. A stored default that is no longer available to the

        organization is still returned (and skipped at session creation).'
      operationId: handle_get_org_default_platform_v3beta1_organizations__org_id__default_platform_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgDefaultPlatformResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization Default Platform
      tags:
      - organization-settings
    put:
      description: 'Set or clear the organization''s default placement for new sessions.


        Accepts a hosted platform label, a shared outpost pool name

        (``platform``), or a shared outpost pool ID (``outpost_pool_id``).

        Outposts-only organizations only accept outpost pools. Sending neither

        clears the default.'
      operationId: handle_update_org_default_platform_v3beta1_organizations__org_id__default_platform_put
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgDefaultPlatformUpdateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgDefaultPlatformResponse'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Set Organization Default Platform
      tags:
      - organization-settings
  /v3beta1/organizations/{org_id}/members/idp-users:
    get:
      description: List users whose organization membership is derived from IDP group
        assignments.
      operationId: handle_list_organization_idp_users_v3beta1_organizations__org_id__members_idp_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IdpGroupUser_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization IDP Group Users
      tags:
      - users
  /v3beta1/organizations/{org_id}/members/users:
    get:
      description: List users with direct membership in the organization.
      operationId: handle_list_organization_users_v3beta1_organizations__org_id__members_users_get
      parameters:
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      - in: query
        name: after
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: After
      - in: query
        name: first
        required: false
        schema:
          default: 100
          maximum: 200
          minimum: 1
          title: First
          type: integer
      - description: Filter by exact email address
        in: query
        name: email
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter by exact email address
          title: Email
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_User_'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: List Organization Users
      tags:
      - users
  /v3beta1/organizations/{org_id}/members/users/{user_id}:
    get:
      description: Get an organization member by ID. Returns both direct and IDP-group-derived
        role assignments.
      operationId: handle_get_organization_user_v3beta1_organizations__org_id__members_users__user_id__get
      parameters:
      - description: User ID
        in: path
        name: user_id
        required: true
        schema:
          title: User Id
          type: string
      - description: 'Organization ID (prefix: org-)'
        in: path
        name: org_id
        required: true
        schema:
          example: org-abc123def456
          title: Org Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithIdpRoles'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      summary: Get Organization User
      tags:
      - users
security:
- bearerAuth: []
