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

# Update an insight



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json patch /insights/{insight_id}
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
paths:
  /insights/{insight_id}:
    patch:
      tags:
        - insights
      summary: Update an insight
      operationId: update_insight_route_insights__insight_id__patch
      parameters:
        - name: insight_id
          in: path
          required: true
          schema:
            type: string
            title: Insight Id
        - name: If-Match
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              The insight's current ETag, from a prior read. Required: the
              update is rejected if the insight has changed since.
            title: If-Match
          description: >-
            The insight's current ETag, from a prior read. Required: the update
            is rejected if the insight has changed since.
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsightUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Insight'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '428':
          $ref: '#/components/responses/PreconditionRequired'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    InsightUpdate:
      properties:
        status:
          anyOf:
            - type: string
              enum:
                - open
                - backlog
                - resolved
                - dismissed
            - type: 'null'
          title: Status
          description: >-
            Workflow status of the insight. Set it to `dismissed` to dismiss the
            insight. Cannot be `null`.
        assignee:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee
          description: >-
            Email address of the user to assign this insight to. The assignee is
            subscribed to the insight's activity feed. Send `null` to unassign.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        user_effort:
          anyOf:
            - type: string
            - type: 'null'
          title: User Effort
          description: >-
            Effort estimate for this insight, overriding SELECT's estimate. Send
            `null` to fall back to SELECT's estimate.
        user_annualized_potential_savings_lower_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: User Annualized Potential Savings Lower Bound
          description: >-
            Lower bound of the annualized savings for this insight, overriding
            SELECT's estimate. Send `null` to fall back to SELECT's estimate.
        user_annualized_potential_savings_upper_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: User Annualized Potential Savings Upper Bound
          description: >-
            Upper bound of the annualized savings for this insight, overriding
            SELECT's estimate. Send `null` to fall back to SELECT's estimate.
      additionalProperties: false
      type: object
      title: InsightUpdate
      description: >-
        The fields of an insight you can change.


        Omit a field to leave it unchanged; send `null` to clear it. Fields
        SELECT

        generates cannot be set.
    Insight:
      properties:
        id:
          type: string
          title: Id
          description: The unique identifier of the insight.
          readOnly: true
          x-terraform-computed: true
        etag:
          type: string
          title: Etag
          description: >-
            Opaque strong ETag for optimistic concurrency. Matches the ETag
            response header; supply it in an If-Match header on a later update
            to make that write conditional and avoid overwriting newer changes.
          readOnly: true
          x-terraform-computed: true
        create_time:
          type: string
          title: Create Time
          description: When the insight was first created, as an RFC 3339 UTC timestamp.
          readOnly: true
          x-terraform-computed: true
        update_time:
          type: string
          title: Update Time
          description: When the insight was last updated, as an RFC 3339 UTC timestamp.
          readOnly: true
          x-terraform-computed: true
        snowflake_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Snowflake Id
          description: >-
            Stable identifier for the insight, carried through from the source
            data. It stays the same across syncs and only changes if the insight
            is regenerated.
          readOnly: true
          x-terraform-computed: true
        is_current:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Current
          description: >-
            Whether this is the current, active version of the insight for its
            resource. Superseded insights stay queryable but are marked not
            current.
          readOnly: true
          x-terraform-computed: true
        connection_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Id
          description: Identifier of the connection this insight was generated for.
          readOnly: true
          x-terraform-computed: true
        connection_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Connection Type
          description: The type of connection this insight was generated for.
          readOnly: true
          x-terraform-computed: true
        account_metadata:
          title: Account Metadata
          description: Details of the account this insight relates to.
          readOnly: true
          x-terraform-computed: true
        resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Type
          description: The type of resource this insight is about, such as a warehouse.
          readOnly: true
          x-terraform-computed: true
        aggregate_resource_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Aggregate Resource Type
          description: >-
            When the insight covers a group of resources, the type of those
            resources.
          readOnly: true
          x-terraform-computed: true
        insight_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Insight Type
          description: The category of optimization opportunity this insight describes.
          readOnly: true
          x-terraform-computed: true
        identifying_metadata:
          anyOf:
            - {}
            - type: 'null'
          title: Identifying Metadata
          description: Details identifying the specific resource this insight applies to.
          readOnly: true
          x-terraform-computed: true
        aggregate_metadata:
          anyOf:
            - {}
            - type: 'null'
          title: Aggregate Metadata
          description: Additional details for insights that span multiple resources.
          readOnly: true
          x-terraform-computed: true
        usage_groups:
          anyOf:
            - {}
            - type: 'null'
          title: Usage Groups
          description: The usage groups associated with this insight.
          readOnly: true
          x-terraform-computed: true
        insight_metadata:
          anyOf:
            - {}
            - type: 'null'
          title: Insight Metadata
          description: Additional details specific to this insight's type.
          readOnly: true
          x-terraform-computed: true
        effort:
          anyOf:
            - type: string
            - type: 'null'
          title: Effort
          description: Estimated effort required to act on this insight.
          readOnly: true
          x-terraform-computed: true
        studied_period_start:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Studied Period Start
          description: Start of the time period analyzed to produce this insight.
          readOnly: true
          x-terraform-computed: true
        studied_period_end:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Studied Period End
          description: End of the time period analyzed to produce this insight.
          readOnly: true
          x-terraform-computed: true
        annualized_potential_savings_lower_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: Annualized Potential Savings Lower Bound
          description: >-
            Lower bound of the estimated annualized savings if this insight is
            acted on.
          readOnly: true
          x-terraform-computed: true
        annualized_potential_savings_upper_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: Annualized Potential Savings Upper Bound
          description: >-
            Upper bound of the estimated annualized savings if this insight is
            acted on.
          readOnly: true
          x-terraform-computed: true
        last_generated_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Generated Time
          description: >-
            When this insight was most recently generated, as an RFC 3339 UTC
            timestamp.
          readOnly: true
          x-terraform-computed: true
        first_generated_time:
          anyOf:
            - type: string
            - type: 'null'
          title: First Generated Time
          description: When this insight was first generated, as an RFC 3339 UTC timestamp.
          readOnly: true
          x-terraform-computed: true
        first_view_time:
          anyOf:
            - type: string
            - type: 'null'
          title: First View Time
          description: >-
            When this insight was first viewed by anyone in your organization,
            as an RFC 3339 UTC timestamp. Null if it has never been viewed.
          readOnly: true
          x-terraform-computed: true
        last_view_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Last View Time
          description: >-
            When this insight was most recently viewed by anyone in your
            organization, as an RFC 3339 UTC timestamp. Null if it has never
            been viewed.
          readOnly: true
          x-terraform-computed: true
        view_count:
          type: integer
          title: View Count
          description: >-
            Number of distinct days this insight was viewed by anyone in your
            organization. 0 if it has never been viewed.
          readOnly: true
          x-terraform-computed: true
        first_viewed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: First Viewed By
          description: >-
            Email address of the first user in your organization to view this
            insight. Null if it has never been viewed.
          readOnly: true
          x-doit-confidentiality: customer-data
          x-doit-pii: true
          x-terraform-computed: true
        last_viewed_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Viewed By
          description: >-
            Email address of the most recent user in your organization to view
            this insight. Null if it has never been viewed.
          readOnly: true
          x-doit-confidentiality: customer-data
          x-doit-pii: true
          x-terraform-computed: true
        status:
          type: string
          title: Status
          description: >-
            Current workflow status of the insight: `open`, `backlog`,
            `resolved` or `dismissed`.
        assignee:
          anyOf:
            - type: string
            - type: 'null'
          title: Assignee
          description: Email address of the user this insight is assigned to.
          x-doit-confidentiality: customer-data
          x-doit-pii: true
        user_effort:
          anyOf:
            - type: string
            - type: 'null'
          title: User Effort
          description: >-
            Effort estimate you have set for this insight, overriding SELECT's
            estimate.
        user_annualized_potential_savings_lower_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: User Annualized Potential Savings Lower Bound
          description: >-
            Lower bound of the annualized savings you have set for this insight,
            overriding SELECT's estimate.
        user_annualized_potential_savings_upper_bound:
          anyOf:
            - type: number
            - type: 'null'
          title: User Annualized Potential Savings Upper Bound
          description: >-
            Upper bound of the annualized savings you have set for this insight,
            overriding SELECT's estimate.
      type: object
      required:
        - id
        - etag
        - create_time
        - update_time
        - account_metadata
        - view_count
        - status
      title: Insight
      description: |-
        A single insight — an optimization opportunity SELECT has surfaced for
        one of your resources.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    PreconditionFailed:
      description: Precondition failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    PreconditionRequired:
      description: Precondition required
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````