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

# Update One-Time Window

> Update a one-time window. Its kind and owning team are immutable.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml patch /v2/one-time-windows/{id}
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Report API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team Group API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/one-time-windows/{id}:
    patch:
      tags:
        - One-Time Window API
      summary: Update One-Time Window
      description: Update a one-time window. Its kind and owning team are immutable.
      operationId: svrelay.publicv2.PublicAPIServiceV2.UpdateOneTimeWindow
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                    - string
                    - 'null'
                  title: name
                startsAt:
                  oneOf:
                    - $ref: '#/components/schemas/google.protobuf.Timestamp'
                    - type: 'null'
                  title: starts_at
                endsAt:
                  oneOf:
                    - $ref: '#/components/schemas/google.protobuf.Timestamp'
                    - type: 'null'
                  title: ends_at
                allDay:
                  type:
                    - boolean
                    - 'null'
                  title: all_day
                  description: >-
                    When true, the resulting starts_at and ends_at must be
                    midnight UTC boundaries.
                description:
                  type:
                    - string
                    - 'null'
                  title: description
                scopedId:
                  type:
                    - string
                    - 'null'
                  title: scoped_id
                  description: Rekeys the copy-invariant identity. Omit to preserve it.
              title: UpdateOneTimeWindowRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.UpdateOneTimeWindowResponse
      security:
        - BearerAuth: []
components:
  schemas:
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2025-01-15T01:30:15.000Z'
        - '2025-06-01T00:00:00.000Z'
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    svhelp.publicapi.UpdateOneTimeWindowResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svhelp.pubapimodels.OneTimeWindow'
          title: data
          x-stainless-terraform-configurability: optional
      title: UpdateOneTimeWindowResponse
      additionalProperties: false
    svhelp.pubapimodels.OneTimeWindow:
      type: object
      properties:
        id:
          type: string
          title: id
          readOnly: true
          x-stainless-terraform-configurability: computed
        teamId:
          type: string
          title: team_id
          readOnly: true
          x-stainless-terraform-configurability: computed
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        kind:
          $ref: '#/components/schemas/svhelp.models.TimeWindowKind'
          title: kind
          x-stainless-terraform-configurability: optional
        startsAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: starts_at
          x-stainless-terraform-configurability: optional
        endsAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: ends_at
          x-stainless-terraform-configurability: optional
        allDay:
          type: boolean
          title: all_day
          x-stainless-terraform-configurability: computed_optional
        description:
          type: string
          title: description
          x-stainless-terraform-configurability: optional
        createdAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: created_at
          readOnly: true
          x-stainless-terraform-configurability: computed
        updatedAt:
          $ref: '#/components/schemas/google.protobuf.Timestamp'
          title: updated_at
          readOnly: true
          x-stainless-terraform-configurability: computed
        scopedId:
          type: string
          title: scoped_id
          readOnly: true
          x-stainless-terraform-configurability: computed
      title: OneTimeWindow
      additionalProperties: false
    svhelp.models.TimeWindowKind:
      type: string
      title: TimeWindowKind
      enum:
        - TIME_WINDOW_KIND_UNSPECIFIED
        - TIME_WINDOW_KIND_HOLIDAY
        - TIME_WINDOW_KIND_BLACKOUT
        - TIME_WINDOW_KIND_OTHER
      description: TimeWindowKind is the role of a one-time window (see OneTimeWindow).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````