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

# Update employee schedule template dates

> Change the start and end dates of a schedule already assigned to an employee. The assignment keeps its id; the schedule template itself cannot be changed here. Send both dates on every call: an omitted or null `endDate` leaves the assignment with no end date, it does not keep the current one. The id is the one returned by `GET /public/schedule/v1/employees/{employeeId}/entity-schedule-templates`. Rejected with 422 when the id does not exist, when the dates match another assignment of the employee exactly, when the same template already starts on `startDate`, or when the period is too long.

Version:
v4


## OpenAPI

````yaml openapi-v2.json PUT /schedule/v4/entity-schedule-templates/{entityScheduleTemplateId}
openapi: 3.0.0
info:
  title: Sesame Public API v2
  description: >-
    Public API v2 — additive surface `/public/{context}/v{N}`,
    endpoint-versioned from v4
  version: 1.0.0
servers:
  - url: https://api.sesamehr.com
    description: Production
security:
  - Bearer: []
paths:
  /schedule/v4/entity-schedule-templates/{entityScheduleTemplateId}:
    put:
      tags:
        - Employee Schedule Templates
      summary: Update employee schedule template dates
      description: >-
        Change the start and end dates of a schedule already assigned to an
        employee. The assignment keeps its id; the schedule template itself
        cannot be changed here. Send both dates on every call: an omitted or
        null `endDate` leaves the assignment with no end date, it does not keep
        the current one. The id is the one returned by `GET
        /public/schedule/v1/employees/{employeeId}/entity-schedule-templates`.
        Rejected with 422 when the id does not exist, when the dates match
        another assignment of the employee exactly, when the same template
        already starts on `startDate`, or when the period is too long.
      operationId: UpdateEntityScheduleTemplate
      parameters:
        - name: entityScheduleTemplateId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEntityScheduleTemplateRequest'
      responses:
        '204':
          description: The assignment dates were updated.
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    UpdateEntityScheduleTemplateRequest:
      required:
        - startDate
      properties:
        startDate:
          description: First day the schedule applies (YYYY-MM-DD).
          type: string
          format: date
        endDate:
          description: >-
            Last day the schedule applies (YYYY-MM-DD). Null or omitted leaves
            the assignment with no end date.
          type: string
          format: date
          nullable: true
      type: object
  securitySchemes:
    Bearer:
      type: http
      description: 'Sesame Public API consumer token (Authorization: Bearer <token>)'
      scheme: bearer

````

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