# Update Agent Working Hours

PUT https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/working-hours

Fully replaces the working-hours configuration for an AI agent. Returns 404 when none exists yet — use the create endpoint first. This is a replace, not a merge: omitted fields are not preserved.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `conversation-ai.write`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `agentId` | string | Yes | Conversations AI agent id |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/conversation-ai/agents/{agentId}/working-hours": {
      "put": {
        "summary": "Update Agent Working Hours",
        "operationId": "updateAgentWorkingHours",
        "description": "Fully replaces the working-hours configuration for an AI agent. Returns 404 when none exists yet — use the create endpoint first. This is a replace, not a merge: omitted fields are not preserved.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "agentId",
            "required": true,
            "in": "path",
            "description": "Conversations AI agent id",
            "schema": {
              "example": "EmployeeId123",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WorkingHoursConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHoursConfigResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "404": {
            "description": "Not configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkingHoursNotFoundDto"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "conversation-ai.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "WorkingHoursConfigDto": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "example": false,
            "description": "Master toggle for working hours."
          },
          "channels": {
            "type": "array",
            "example": [
              "SMS",
              "WhatsApp"
            ],
            "description": "Channels the gate applies to. Must be non-empty when enabled.",
            "items": {
              "type": "string",
              "enum": [
                "SMS",
                "Email",
                "WhatsApp",
                "IG",
                "FB",
                "WebChat",
                "Live_Chat",
                "TIKTOK"
              ]
            }
          },
          "timezoneMode": {
            "type": "string",
            "enum": [
              "contact",
              "business"
            ]
          },
          "schedule": {
            "type": "object",
            "properties": {
              "mon": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "tue": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "wed": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "thu": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "fri": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "sat": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              },
              "sun": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "slots": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startHour": {
                          "type": "number",
                          "example": 9,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "startMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        },
                        "endHour": {
                          "type": "number",
                          "example": 17,
                          "minimum": 0,
                          "maximum": 23
                        },
                        "endMinute": {
                          "type": "number",
                          "example": 0,
                          "minimum": 0,
                          "maximum": 59
                        }
                      },
                      "required": [
                        "startHour",
                        "startMinute",
                        "endHour",
                        "endMinute"
                      ],
                      "title": "TimeSlotDto"
                    }
                  }
                },
                "required": [
                  "enabled",
                  "slots"
                ],
                "title": "DayScheduleDto"
              }
            },
            "required": [
              "mon",
              "tue",
              "wed",
              "thu",
              "fri",
              "sat",
              "sun"
            ],
            "title": "WeeklyScheduleDto"
          },
          "continueConversations": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "example": true
              },
              "inactivityTimeout": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number",
                    "example": 15,
                    "minimum": 1,
                    "maximum": 1440,
                    "description": "5–1440 for minutes, 1–24 for hours (5 min – 24 h). Exact bound depends on `unit`."
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "minutes",
                      "hours"
                    ]
                  }
                },
                "required": [
                  "value",
                  "unit"
                ],
                "title": "InactivityTimeoutDto"
              }
            },
            "required": [
              "enabled",
              "inactivityTimeout"
            ],
            "title": "ContinueConversationsDto"
          },
          "offHoursAutoReply": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "example": false
              },
              "message": {
                "type": "string",
                "example": "Thanks for reaching out! We're currently outside of business hours."
              },
              "sendNotification": {
                "type": "boolean",
                "example": false
              },
              "notificationConfig": {
                "nullable": true,
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "emailNotification": {
                        "type": "object",
                        "properties": {
                          "enabled": {
                            "type": "boolean",
                            "example": false
                          },
                          "notifyAdmins": {
                            "type": "boolean",
                            "example": false
                          },
                          "notifyAllUsers": {
                            "type": "boolean",
                            "example": false
                          },
                          "notifyAssignedUser": {
                            "type": "boolean",
                            "example": false
                          },
                          "notifySpecificUsers": {
                            "type": "boolean",
                            "example": false
                          },
                          "specificUserIds": {
                            "example": [],
                            "maxItems": 1000,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "notifyCustomEmail": {
                            "type": "boolean",
                            "example": false
                          },
                          "customEmail": {
                            "type": "string",
                            "example": "",
                            "description": "Comma-separated emails. May be empty; a blank value simply yields no custom recipient."
                          }
                        },
                        "required": [
                          "notifyAdmins",
                          "notifyAllUsers",
                          "notifyAssignedUser",
                          "notifySpecificUsers",
                          "specificUserIds",
                          "notifyCustomEmail",
                          "customEmail"
                        ],
                        "title": "EmailNotificationRecipientsDto"
                      },
                      "contactTags": {
                        "example": [],
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "emailNotification",
                      "contactTags"
                    ],
                    "title": "OffHoursNotificationConfigDto"
                  }
                ]
              }
            },
            "required": [
              "enabled",
              "message"
            ],
            "title": "OffHoursAutoReplyDto"
          },
          "followUp": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "example": false
              },
              "message": {
                "type": "string",
                "example": "Hi {{contact.name}}, we're here now and happy to help."
              }
            },
            "required": [
              "enabled",
              "message"
            ],
            "title": "WorkingHoursFollowUpMessageDto"
          }
        },
        "required": [
          "enabled",
          "channels",
          "timezoneMode",
          "schedule",
          "continueConversations",
          "offHoursAutoReply",
          "followUp"
        ],
        "title": "WorkingHoursConfigDto"
      },
      "WorkingHoursConfigResponseDto": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean",
                "example": false,
                "description": "Master toggle for working hours."
              },
              "channels": {
                "type": "array",
                "example": [
                  "SMS",
                  "WhatsApp"
                ],
                "description": "Channels the gate applies to. Must be non-empty when enabled.",
                "items": {
                  "type": "string",
                  "enum": [
                    "SMS",
                    "Email",
                    "WhatsApp",
                    "IG",
                    "FB",
                    "WebChat",
                    "Live_Chat",
                    "TIKTOK"
                  ]
                }
              },
              "timezoneMode": {
                "type": "string",
                "enum": [
                  "contact",
                  "business"
                ]
              },
              "schedule": {
                "type": "object",
                "properties": {
                  "mon": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "tue": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "wed": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "thu": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "fri": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "sat": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  },
                  "sun": {
                    "type": "object",
                    "properties": {
                      "enabled": {
                        "type": "boolean",
                        "example": true
                      },
                      "slots": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "startHour": {
                              "type": "number",
                              "example": 9,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "startMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            },
                            "endHour": {
                              "type": "number",
                              "example": 17,
                              "minimum": 0,
                              "maximum": 23
                            },
                            "endMinute": {
                              "type": "number",
                              "example": 0,
                              "minimum": 0,
                              "maximum": 59
                            }
                          },
                          "required": [
                            "startHour",
                            "startMinute",
                            "endHour",
                            "endMinute"
                          ],
                          "title": "TimeSlotDto"
                        }
                      }
                    },
                    "required": [
                      "enabled",
                      "slots"
                    ],
                    "title": "DayScheduleDto"
                  }
                },
                "required": [
                  "mon",
                  "tue",
                  "wed",
                  "thu",
                  "fri",
                  "sat",
                  "sun"
                ],
                "title": "WeeklyScheduleDto"
              },
              "continueConversations": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": true
                  },
                  "inactivityTimeout": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "number",
                        "example": 15,
                        "minimum": 1,
                        "maximum": 1440,
                        "description": "5–1440 for minutes, 1–24 for hours (5 min – 24 h). Exact bound depends on `unit`."
                      },
                      "unit": {
                        "type": "string",
                        "enum": [
                          "minutes",
                          "hours"
                        ]
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ],
                    "title": "InactivityTimeoutDto"
                  }
                },
                "required": [
                  "enabled",
                  "inactivityTimeout"
                ],
                "title": "ContinueConversationsDto"
              },
              "offHoursAutoReply": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": false
                  },
                  "message": {
                    "type": "string",
                    "example": "Thanks for reaching out! We're currently outside of business hours."
                  },
                  "sendNotification": {
                    "type": "boolean",
                    "example": false
                  },
                  "notificationConfig": {
                    "nullable": true,
                    "allOf": [
                      {
                        "type": "object",
                        "properties": {
                          "emailNotification": {
                            "type": "object",
                            "properties": {
                              "enabled": {
                                "type": "boolean",
                                "example": false
                              },
                              "notifyAdmins": {
                                "type": "boolean",
                                "example": false
                              },
                              "notifyAllUsers": {
                                "type": "boolean",
                                "example": false
                              },
                              "notifyAssignedUser": {
                                "type": "boolean",
                                "example": false
                              },
                              "notifySpecificUsers": {
                                "type": "boolean",
                                "example": false
                              },
                              "specificUserIds": {
                                "example": [],
                                "maxItems": 1000,
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "notifyCustomEmail": {
                                "type": "boolean",
                                "example": false
                              },
                              "customEmail": {
                                "type": "string",
                                "example": "",
                                "description": "Comma-separated emails. May be empty; a blank value simply yields no custom recipient."
                              }
                            },
                            "required": [
                              "notifyAdmins",
                              "notifyAllUsers",
                              "notifyAssignedUser",
                              "notifySpecificUsers",
                              "specificUserIds",
                              "notifyCustomEmail",
                              "customEmail"
                            ],
                            "title": "EmailNotificationRecipientsDto"
                          },
                          "contactTags": {
                            "example": [],
                            "maxItems": 500,
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "emailNotification",
                          "contactTags"
                        ],
                        "title": "OffHoursNotificationConfigDto"
                      }
                    ]
                  }
                },
                "required": [
                  "enabled",
                  "message"
                ],
                "title": "OffHoursAutoReplyDto"
              },
              "followUp": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean",
                    "example": false
                  },
                  "message": {
                    "type": "string",
                    "example": "Hi {{contact.name}}, we're here now and happy to help."
                  }
                },
                "required": [
                  "enabled",
                  "message"
                ],
                "title": "WorkingHoursFollowUpMessageDto"
              },
              "employeeId": {
                "type": "string",
                "example": "wK36brxPYCOikC85FkbA",
                "description": "AI employee id this config belongs to."
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "description": "ISO-8601 creation time."
              },
              "updatedAt": {
                "type": "string",
                "format": "date-time",
                "description": "ISO-8601 last-update time."
              }
            },
            "required": [
              "enabled",
              "channels",
              "timezoneMode",
              "schedule",
              "continueConversations",
              "offHoursAutoReply",
              "followUp",
              "employeeId"
            ],
            "title": "WorkingHoursConfigPayloadDto"
          },
          "success": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "data",
          "success"
        ],
        "title": "WorkingHoursConfigResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "WorkingHoursNotFoundDto": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 404,
            "description": "HTTP status code"
          },
          "message": {
            "type": "string",
            "example": "Working hours configuration not found",
            "description": "Error message"
          },
          "error": {
            "type": "string",
            "example": "Not Found",
            "description": "Error type"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ],
        "title": "WorkingHoursNotFoundDto"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X PUT 'https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "enabled": false,
  "channels": [
    "SMS",
    "WhatsApp"
  ],
  "schedule": {
    "mon": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "tue": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "wed": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "thu": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "fri": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sat": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sun": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    }
  },
  "continueConversations": {
    "enabled": true,
    "inactivityTimeout": {
      "value": 15
    }
  },
  "offHoursAutoReply": {
    "enabled": false,
    "message": "Thanks for reaching out! We're currently outside of business hours.",
    "sendNotification": false,
    "notificationConfig": {
      "emailNotification": {
        "enabled": false,
        "notifyAdmins": false,
        "notifyAllUsers": false,
        "notifyAssignedUser": false,
        "notifySpecificUsers": false,
        "specificUserIds": [],
        "notifyCustomEmail": false,
        "customEmail": ""
      },
      "contactTags": []
    }
  },
  "followUp": {
    "enabled": false,
    "message": "Hi {{contact.name}}, we're here now and happy to help."
  }
}'
```

**Node.js**

```javascript
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "enabled": false,
      "channels": [
        "SMS",
        "WhatsApp"
      ],
      "schedule": {
        "mon": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "tue": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "wed": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "thu": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "fri": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "sat": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        },
        "sun": {
          "enabled": true,
          "slots": [
            {
              "startHour": 9,
              "startMinute": 0,
              "endHour": 17,
              "endMinute": 0
            }
          ]
        }
      },
      "continueConversations": {
        "enabled": true,
        "inactivityTimeout": {
          "value": 15
        }
      },
      "offHoursAutoReply": {
        "enabled": false,
        "message": "Thanks for reaching out! We're currently outside of business hours.",
        "sendNotification": false,
        "notificationConfig": {
          "emailNotification": {
            "enabled": false,
            "notifyAdmins": false,
            "notifyAllUsers": false,
            "notifyAssignedUser": false,
            "notifySpecificUsers": false,
            "specificUserIds": [],
            "notifyCustomEmail": false,
            "customEmail": ""
          },
          "contactTags": []
        }
      },
      "followUp": {
        "enabled": false,
        "message": "Hi {{contact.name}}, we're here now and happy to help."
      }
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/conversation-ai/agents/{agentId}/working-hours"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "enabled": false,
    "channels": [
        "SMS",
        "WhatsApp"
    ],
    "schedule": {
        "mon": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "tue": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "wed": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "thu": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "fri": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "sat": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        },
        "sun": {
            "enabled": true,
            "slots": [
                {
                    "startHour": 9,
                    "startMinute": 0,
                    "endHour": 17,
                    "endMinute": 0
                }
            ]
        }
    },
    "continueConversations": {
        "enabled": true,
        "inactivityTimeout": {
            "value": 15
        }
    },
    "offHoursAutoReply": {
        "enabled": false,
        "message": "Thanks for reaching out! We're currently outside of business hours.",
        "sendNotification": false,
        "notificationConfig": {
            "emailNotification": {
                "enabled": false,
                "notifyAdmins": false,
                "notifyAllUsers": false,
                "notifyAssignedUser": false,
                "notifySpecificUsers": false,
                "specificUserIds": [],
                "notifyCustomEmail": false,
                "customEmail": ""
            },
            "contactTags": []
        }
    },
    "followUp": {
        "enabled": false,
        "message": "Hi {{contact.name}}, we're here now and happy to help."
    }
}

response = requests.put(url, json=payload, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "enabled": false,
  "channels": [
    "SMS",
    "WhatsApp"
  ],
  "schedule": {
    "mon": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "tue": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "wed": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "thu": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "fri": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sat": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sun": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    }
  },
  "continueConversations": {
    "enabled": true,
    "inactivityTimeout": {
      "value": 15
    }
  },
  "offHoursAutoReply": {
    "enabled": false,
    "message": "Thanks for reaching out! We're currently outside of business hours.",
    "sendNotification": false,
    "notificationConfig": {
      "emailNotification": {
        "enabled": false,
        "notifyAdmins": false,
        "notifyAllUsers": false,
        "notifyAssignedUser": false,
        "notifySpecificUsers": false,
        "specificUserIds": [],
        "notifyCustomEmail": false,
        "customEmail": ""
      },
      "contactTags": []
    }
  },
  "followUp": {
    "enabled": false,
    "message": "Hi {{contact.name}}, we're here now and happy to help."
  }
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .put("https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"enabled\":false,\"channels\":[\"SMS\",\"WhatsApp\"],\"schedule\":{\"mon\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"tue\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"wed\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"thu\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"fri\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"sat\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]},\"sun\":{\"enabled\":true,\"slots\":[{\"startHour\":9,\"startMinute\":0,\"endHour\":17,\"endMinute\":0}]}},\"continueConversations\":{\"enabled\":true,\"inactivityTimeout\":{\"value\":15}},\"offHoursAutoReply\":{\"enabled\":false,\"message\":\"Thanks for reaching out! We're currently outside of business hours.\",\"sendNotification\":false,\"notificationConfig\":{\"emailNotification\":{\"enabled\":false,\"notifyAdmins\":false,\"notifyAllUsers\":false,\"notifyAssignedUser\":false,\"notifySpecificUsers\":false,\"specificUserIds\":[],\"notifyCustomEmail\":false,\"customEmail\":\"\"},\"contactTags\":[]}},\"followUp\":{\"enabled\":false,\"message\":\"Hi {{contact.name}}, we're here now and happy to help.\"}}")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
  "strings"
)

func main() {
  url := "https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours"
  payload := strings.NewReader(`{
  "enabled": false,
  "channels": [
    "SMS",
    "WhatsApp"
  ],
  "schedule": {
    "mon": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "tue": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "wed": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "thu": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "fri": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sat": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sun": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    }
  },
  "continueConversations": {
    "enabled": true,
    "inactivityTimeout": {
      "value": 15
    }
  },
  "offHoursAutoReply": {
    "enabled": false,
    "message": "Thanks for reaching out! We're currently outside of business hours.",
    "sendNotification": false,
    "notificationConfig": {
      "emailNotification": {
        "enabled": false,
        "notifyAdmins": false,
        "notifyAllUsers": false,
        "notifyAssignedUser": false,
        "notifySpecificUsers": false,
        "specificUserIds": [],
        "notifyCustomEmail": false,
        "customEmail": ""
      },
      "contactTags": []
    }
  },
  "followUp": {
    "enabled": false,
    "message": "Hi {{contact.name}}, we're here now and happy to help."
  }
}`)
  req, _ := http.NewRequest("PUT", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "enabled": false,
  "channels": [
    "SMS",
    "WhatsApp"
  ],
  "schedule": {
    "mon": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "tue": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "wed": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "thu": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "fri": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sat": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sun": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    }
  },
  "continueConversations": {
    "enabled": true,
    "inactivityTimeout": {
      "value": 15
    }
  },
  "offHoursAutoReply": {
    "enabled": false,
    "message": "Thanks for reaching out! We're currently outside of business hours.",
    "sendNotification": false,
    "notificationConfig": {
      "emailNotification": {
        "enabled": false,
        "notifyAdmins": false,
        "notifyAllUsers": false,
        "notifyAssignedUser": false,
        "notifySpecificUsers": false,
        "specificUserIds": [],
        "notifyCustomEmail": false,
        "customEmail": ""
      },
      "contactTags": []
    }
  },
  "followUp": {
    "enabled": false,
    "message": "Hi {{contact.name}}, we're here now and happy to help."
  }
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "enabled": false,
  "channels": [
    "SMS",
    "WhatsApp"
  ],
  "schedule": {
    "mon": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "tue": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "wed": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "thu": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "fri": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sat": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    },
    "sun": {
      "enabled": true,
      "slots": [
        {
          "startHour": 9,
          "startMinute": 0,
          "endHour": 17,
          "endMinute": 0
        }
      ]
    }
  },
  "continueConversations": {
    "enabled": true,
    "inactivityTimeout": {
      "value": 15
    }
  },
  "offHoursAutoReply": {
    "enabled": false,
    "message": "Thanks for reaching out! We're currently outside of business hours.",
    "sendNotification": false,
    "notificationConfig": {
      "emailNotification": {
        "enabled": false,
        "notifyAdmins": false,
        "notifyAllUsers": false,
        "notifyAssignedUser": false,
        "notifySpecificUsers": false,
        "specificUserIds": [],
        "notifyCustomEmail": false,
        "customEmail": ""
      },
      "contactTags": []
    }
  },
  "followUp": {
    "enabled": false,
    "message": "Hi {{contact.name}}, we're here now and happy to help."
  }
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/conversation-ai/agents/<agentId>/working-hours' -Method 'PUT' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
