PATCH
/
v1
/
users
/
business-hours
curl --request PATCH \
  --url https://platform.thena.ai/v1/users/business-hours \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-org-id: <api-key>' \
  --data '{
  "timezone": "<string>",
  "routingRespectsTimezone": true,
  "routingRespectsUserCapacity": true,
  "fallbackSubTeam": "<string>",
  "holidays": [
    "25-12",
    "25-12-2024"
  ],
  "routingRespectsUserTimezone": true,
  "routingRespectsUserAvailability": true,
  "userRoutingStrategy": "manual",
  "commonDailyConfig": true,
  "commonSlots": [
    {
      "start": "09:00",
      "end": "17:00"
    }
  ],
  "dailyConfig": {
    "monday": {
      "isActive": true,
      "slots": [
        {
          "start": "09:00",
          "end": "17:00"
        }
      ]
    }
  }
}'
{
  "status": true,
  "message": "Success",
  "timestamp": "2024-01-01T00:00:00.000Z",
  "data": {
    "timezone": "<string>",
    "userId": "<string>",
    "dailyConfig": {
      "monday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "tuesday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "wednesday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "thursday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "friday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "saturday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      },
      "sunday": {
        "isActive": true,
        "slots": [
          {
            "start": "10:00",
            "end": "18:00"
          }
        ]
      }
    },
    "commonDailyConfig": true,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter JWT bearer token

x-org-id
string
header
required

Enter organization ID

Body

application/json
timezone
string

The timezone of the team

routingRespectsTimezone
boolean

Whether the routing rules respect the timezone for the teams

routingRespectsUserCapacity
boolean

Whether the routing rules respect the user capacity for the teams

fallbackSubTeam
string

The fallback sub team of the team

holidays
array

The dates of the team's holidays

Example:
["25-12", "25-12-2024"]
routingRespectsUserTimezone
boolean

Whether the routing rules respect the user timezone for the teams

routingRespectsUserAvailability
boolean

Whether the routing rules respect the user availability for the teams

userRoutingStrategy
enum<string>

The user routing strategy for the team

Available options:
manual,
round_robin
commonDailyConfig
boolean

Whether the team uses common daily config

commonSlots
string[]

The common slots for the team

Example:
[{ "start": "09:00", "end": "17:00" }]
dailyConfig
object

The business hours of the team

Example:
{
  "monday": {
    "isActive": true,
    "slots": [{ "start": "09:00", "end": "17:00" }]
  }
}

Response

200
application/json
Operation successful
status
boolean
default:true
required

The status of the response

message
string
default:Success
required

The message of the response

timestamp
string
default:2024-01-01T00:00:00.000Z
required

The timestamp of the response

data
object
required

The response for create/update/delete user configurations