Messenger

Metadata




 
 




Actions

Settings

RESOURCE FIELDS

Name Type Read-only Description
brand Brand
reply_time_expectation string AUTO, ASAP, FEW_MINS, FEW_HOURS

Default: AUTO
home_titles Array of Field Locales
home_subtitles Array of Field Locales
businesshour Business Hours
metadata JSON object Could be any valid JSON object. JSON arrays are not supported yet.
created_at timestamp
ISO-8601 Format
updated_at timestamp
ISO-8601 Format

Retrieve all settings

GET /api/v1/messenger/settings.json

Information

Allowed for Admins & Owners

Response

    {
        "status": 200,
        "data": [
            {
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "reply_time_expectation": "AUTO",
    "home_titles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "home_subtitles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "businesshour": [
        {
    "id": 1,

    "resource_type": "business_hour"

}

    ],
    "metadata": {
        "widgets": {
            "presence": {
                "enabled": true
            },
            "twitter": {
                "enabled": false,
                "twitterHandle": null
            },
            "articles": {
                "enabled": false,
                "sectionId": 1
            }
        },
        "styles": {
            "primaryColor": "#F1703F",
            "homeBackground": "-192deg, #40364D 37%, #9B4779 100%",
            "homePattern": "https://assets.kayako.com/messenger/pattern-1--dark.svg",
            "homeTextColor": "#FFFFFF"
        }
    }
}
        ],
        "resource": "messenger_setting",
        "offset": 0,
        "limit": 10,
        "total_count": 1
    }

Retrieve settings for current Brand

GET /api/v1/messenger/settings/current.json

Retrieve settings for the Brand associated with the domain.

Information

Allowed for Public

If no messenger setting exists for the Brand, RESOURCE_NOT_FOUND is returned.

Response

    {
        "status": 200,
        "data": {
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "reply_time_expectation": "AUTO",
    "home_titles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "home_subtitles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "businesshour": [
        {
    "id": 1,

    "resource_type": "business_hour"

}

    ],
    "metadata": {
        "widgets": {
            "presence": {
                "enabled": true
            },
            "twitter": {
                "enabled": false,
                "twitterHandle": null
            },
            "articles": {
                "enabled": false,
                "sectionId": 1
            }
        },
        "styles": {
            "primaryColor": "#F1703F",
            "homeBackground": "-192deg, #40364D 37%, #9B4779 100%",
            "homePattern": "https://assets.kayako.com/messenger/pattern-1--dark.svg",
            "homeTextColor": "#FFFFFF"
        }
    }
},
        "resource": "messenger_setting"
    }

Update settings for a Brand

PUT /api/v1/messenger/settings.json

Information

Allowed for Admins & Owners

Parameters

Name Type Mandatory Description
brand_id integer
reply_time_expectation string AUTO, ASAP, FEW_MINS, FEW_HOURS

Default: AUTO
home_titles JSON array e.g. [{"locale": "en-us", "translation": "Hello"}]
home_subtitles JSON array e.g. [{"locale": "en-us", "translation": "How are you"}]
businesshour_id integer
metadata JSON object Could be any valid JSON object. JSON arrays are not supported yet.

Request

curl -X PUT https://brewfictus.kayako.com/api/v1/messenger/settings.json \
    -d '{"brand_id": 1, "reply_time_expecation": "AUTO", "home_titles": [{"locale": "en-us", "translation": "Hello"}],
    "home_subtitles": [{"locale": "en-us", "translation": "How are you"}], "businesshour_id": 1,
    "metadata": {"widgets":{"presence":{"enabled":true},"twitter":{"enabled":false,"twitterHandle":null},"articles":{"enabled":false,"sectionId":1}},"styles":{"primaryColor":"#F1703F","homeBackground":"-192deg, #40364D 37%, #9B4779 100%","homePattern":"https://assets.kayako.com/messenger/pattern-1--dark.svg","homeTextColor":"#FFFFFF"}} }' \
    -H "Content-Type: application/json" \
    -u "jordan.mitchell@brewfictus.com:jmit6#lsXo"

Response

    {
        "status": 200,
        "data": {
    "brand": {
    "id": 1,

    "resource_type": "brand"

}
,
    "reply_time_expectation": "AUTO",
    "home_titles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "home_subtitles": [






{
    "id": 1,

    "resource_type": "locale_field"

}
    ],
    "businesshour": [
        {
    "id": 1,

    "resource_type": "business_hour"

}

    ],
    "metadata": {
        "widgets": {
            "presence": {
                "enabled": true
            },
            "twitter": {
                "enabled": false,
                "twitterHandle": null
            },
            "articles": {
                "enabled": false,
                "sectionId": 1
            }
        },
        "styles": {
            "primaryColor": "#F1703F",
            "homeBackground": "-192deg, #40364D 37%, #9B4779 100%",
            "homePattern": "https://assets.kayako.com/messenger/pattern-1--dark.svg",
            "homeTextColor": "#FFFFFF"
        }
    }
},
        "resource": "messenger_setting"
    }