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

# Update

> Enable or disable real-user measurements and set sampling and extra allowed origins.



## OpenAPI

````yaml /openapi.json put /v1/orgs/{orgId}/projects/{projectId}/speed-insights
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/orgs/{orgId}/projects/{projectId}/speed-insights:
    put:
      tags:
        - speedInsights
      summary: Update
      description: >-
        Enable or disable real-user measurements and set sampling and extra
        allowed origins.
      operationId: speedInsights.update
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
          description: The organization's id (UUID) or slug — either form is accepted.
        - name: projectId
          in: path
          required: true
          schema:
            type: string
          description: The project's id (UUID) or slug — either form is accepted.
      requestBody:
        required: true
        x-korve-max-bytes: 8192
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                sampleRate:
                  type: number
                  minimum: 0.01
                  maximum: 1
                  description: >-
                    Batch retention rate applied before telemetry storage and
                    billing.
                allowedOrigins:
                  type: array
                  items:
                    type: string
                    format: uri
                    maxLength: 255
                  maxItems: 20
                  uniqueItems: true
                  description: >-
                    Extra HTTPS origins allowed to submit measurements. The
                    managed project origin and verified domains are allowed
                    automatically.
              required:
                - enabled
              additionalProperties: false
      responses:
        '200':
          description: Updated Speed Insights configuration.
          content:
            application/json:
              schema:
                type: object
                properties:
                  enabled:
                    type: boolean
                  projectRef:
                    type: string
                    pattern: ^[a-z][a-z0-9-]{1,61}$
                    description: Public project reference used by the browser SDK.
                  endpoint:
                    type: string
                    format: uri
                  sampleRate:
                    type: number
                    minimum: 0.01
                    maximum: 1
                    description: >-
                      Batch retention rate applied before telemetry storage and
                      billing.
                  allowedOrigins:
                    type: array
                    items:
                      type: string
                      format: uri
                      maxLength: 255
                    maxItems: 20
                    uniqueItems: true
                  retentionDays:
                    type: integer
                    enum:
                      - 30
                required:
                  - enabled
                  - projectRef
                  - endpoint
                  - sampleRate
                  - allowedOrigins
                  - retentionDays
                additionalProperties: false
        '404':
          description: No such project.
        '422':
          description: Invalid Speed Insights configuration.
      security:
        - apiKey: []
        - session: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: korve_api_key
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````