CREATE

Create new off hours settings that will be associated with the given customer API key

CREATE

POST https://api.eyelevel.ai/v1/partner/offhours/:apiKey

Path Parameters

Request Body

{
    "message": "OK"
}

Request

{
    "offhoursSetting": {
        "id":       "STRING IDENTIFIER",
        "name":     "STRING",
        "settings": [
            {
                "active": BOOLEAN,
                "day":    "ENUMERATED STRING",
                "end":    "TIME STRING",
                "start":  "TIME STRING"
            }
        ],
        "timezone": "IANA TIME ZONE"
    }
}

id

REQUIRED - String

Validation: Value is an existing EyeLevel flow identifier

The unique identifier for the chat flow you want to associate with the off hours setting. This chat flow will run during the time periods defined as active.

name

REQUIRED - String

Validation: 255 character limit

The human readable name for the off hours setting.

settings

OPTIONAL - Object

An array of SETTINGS objects that define when the hours settings are active. If settings array is not included in the request, default hours settings will be created making the setting always active.

settings.active

OPTIONAL - Boolean

Defines whether the hours settings are active for the given day. If settings.active is not included in the request, a default value of true will be applied. If settings.active is set to false, start and end are ignored.

settings.day

OPTIONAL - String

Validation: Value is one of the pre-defined enumerated values

The day of week that the setting applies to. Must be one of (case insensitive):

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

settings.end

OPTIONAL - String

Validation: Must be a properly formatted time string

The time of day when the chat flow associated with the off hours setting will no longer be active. The string must be formatted in 24 hour time, including seconds, as follows:

HH:MM:SS

settings.start

OPTIONAL - String

Validation: Must be a properly formatted time string

The time of day when the chat flow associated with the off hours setting will become active. The string must be formatted in 24 hour time, including seconds, as follows:

HH:MM:SS

timezone

REQUIRED - String

Validation: Must be a valid IANA timezone

The timezone for the off hours settings. The timezone must be provided in IANA format.

Response

{
    "message": "OK"
}

Last updated