Update a schedule
PUT/schedules/:scheduleId
The Update Schedule request allows users to update an existing schedule.
Request
Path Parameters
scheduleId stringrequired
The ID of the schedule to update or delete
- application/json
Body
required
_id uuid
name string
Possible values: >= 3 characters and <= 50 characters
startTime date-time
endTime date-time
type string
Possible values: [repeat, specific]
date date-time
isActive boolean
createdBy object
_id string
name string
email email
updatedBy object
_id string
name string
email email
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Schedule updated
- application/json
- Schema
- Example (from schema)
Schema
_id uuid
name string
Possible values: >= 3 characters and <= 50 characters
startTime date-time
endTime date-time
type string
Possible values: [repeat, specific]
date date-time
isActive boolean
createdBy object
_id string
name string
email email
updatedBy object
_id string
name string
email email
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"startTime": "2024-12-03T13:26:27.722Z",
"endTime": "2024-12-03T13:26:27.722Z",
"type": "repeat",
"date": "2024-12-03T13:26:27.722Z",
"isActive": true,
"createdBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
},
"updatedBy": {
"_id": "string",
"name": "string",
"email": "user@example.com"
}
}
Bad Request due to validation errors in the request body
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
{
"message": "Validation failed.",
"errors": [
{
"field": "name",
"message": "Name is required."
},
{
"field": "email",
"message": "Email must be a valid email address."
}
]
}
Unauthorized.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Authentication token not provided."
}
{
"message": "Authentication token not provided."
}
Forbidden.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Access to this resource is forbidden."
}
{
"message": "Access to this resource is forbidden."
}
Resource not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Resource not found."
}
{
"message": "Resource not found."
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"message": "Internal Server Error. Please try again later."
}
{
"message": "Internal Server Error. Please try again later."
}
Loading...