Skip to main content
POST
/
messaging
/
settings
/
{setting_id}
Update messaging settings
curl --request POST \
  --url https://api.partoo.co/v2/messaging/settings/{setting_id} \
  --header 'Content-Type: application/json' \
  --header 'x-APIKey: <api-key>' \
  --data '{
  "welcome_message": "<string>",
  "offline_message": "<string>",
  "uses_business_hours": true,
  "custom_chat_hours": {
    "monday": [
      "10:00-14:00"
    ],
    "tuesday": [
      "10:00-14:00"
    ],
    "wednesday": [
      "10:00-14:00"
    ],
    "thursday": [
      "10:00-14:00"
    ],
    "friday": [
      "10:00-14:00"
    ],
    "saturday": [
      "10:00-14:00"
    ],
    "sunday": [
      "10:00-14:00"
    ]
  },
  "is_launched": true
}'
{
  "id": 123,
  "business_id": "<string>",
  "business_name": "<string>",
  "business_address": "1 Rue de la Paix, 75000 Paris",
  "welcome_message": "<string>",
  "offline_message": "<string>",
  "uses_business_hours": true,
  "custom_chat_hours": {
    "monday": [
      "10:00-14:00"
    ],
    "tuesday": [
      "10:00-14:00"
    ],
    "wednesday": [
      "10:00-14:00"
    ],
    "thursday": [
      "10:00-14:00"
    ],
    "friday": [
      "10:00-14:00"
    ],
    "saturday": [
      "10:00-14:00"
    ],
    "sunday": [
      "10:00-14:00"
    ]
  },
  "is_launched": true
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Path Parameters

setting_id
integer
required

The id of the Messaging Settings to update

Body

application/json

Request body to update a Post

welcome_message
string | null

When a consumer first contacts the business, an automated reply is sent. The content of the reply depends on whether the consumer contacted the business during it's chat hours.
If it is, the welcome_message is sent as a reply.

The welcome_message is mandatory, and can be customized. A default will be set if none is specified.

offline_message
string | null

When a consumer first contacts the business, an automated reply is sent.
The content of the reply depends on whether the consumer contacted the business during it's chat hours.
If it is not, the offline_message is sent as a reply.

The offline_message is mandatory, and can be customized. A default will be set if none is specified.

uses_business_hours
boolean | null

If set to true, the business' "open_hours" will be used as chat hours.
Otherwise, you need to specify "custom_chat_hours".

custom_chat_hours
object | null

The chat hours of the business (in its timezone).

Chat hours are specified per weekday. This is done by supplying an object mapping weekdays ("monday", "tuesday", etc.) to a list of strings. These strings in turn represent time slots during which the business is open.

For example, the following value would set the chat hours to between 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:

{"monday": ["08:00-15:00", "18:00-23:00"]}

To indicate that a business can be contacted for 24 hours, for a specific weekday, use the value ["00:00-23:59"].

This field is not mandatory unless "uses_business_hours" is set to false.

is_launched
boolean | null

Some messaging channels (Google and Facebook) can be temporarily deactivated. This allows the business to close for a period of time without having to answer consumer messages.

This is important because consumers will get frustrated if they are able to contact a business and do not get an answer. It is also important to note that for some messaging channels, not responding to messages may lead to decreased visibility of the business, or suspension of the messaging service.

The is_launched property indicates whether the business is reachable for those messaging channels.

The value can be updated, and the changes will be propagated to the messaging channels, effectively toggling the On or Off the ability for consumers to reach the business. (The change to "is_launched" is made asychronously, and the update will be effective when the messaging channels have finished propagating the information)

Response

OK

id
integer
business_id
string

The ID of the business that the MessagingSetting is related to.

business_name
string | null

The Name of the business that the MessagingSetting is related to.

business_address
string | null

The Formatted address of the business that the MessagingSetting isrelated to.

Example:

"1 Rue de la Paix, 75000 Paris"

welcome_message
string | null

When a consumer first contacts the business, an automated reply is sent. The content of the reply depends on whether the consumer contacted the business during it's chat hours.
If it is, the welcome_message is sent as a reply.

The welcome_message is mandatory, and can be customized. A default will be set if none is specified.

offline_message
string | null

When a consumer first contacts the business, an automated reply is sent.
The content of the reply depends on whether the consumer contacted the business during it's chat hours.
If it is not, the offline_message is sent as a reply.

The offline_message is mandatory, and can be customized. A default will be set if none is specified.

uses_business_hours
boolean | null

If set to true, the business' "open_hours" will be used as chat hours.
Otherwise, you need to specify "custom_chat_hours".

custom_chat_hours
object | null

The chat hours of the business (in its timezone).

Chat hours are specified per weekday. This is done by supplying an object mapping weekdays ("monday", "tuesday", etc.) to a list of strings. These strings in turn represent time slots during which the business is open.

For example, the following value would set the chat hours to between 08:00-15:00 in the afternoon and 18:00-23:00 in the evening on Mondays:

{"monday": ["08:00-15:00", "18:00-23:00"]}

To indicate that a business can be contacted for 24 hours, for a specific weekday, use the value ["00:00-23:59"].

This field is not mandatory unless "uses_business_hours" is set to false.

is_launched
boolean | null

Some messaging channels (Google and Facebook) can be temporarily deactivated. This allows the business to close for a period of time without having to answer consumer messages.

This is important because consumers will get frustrated if they are able to contact a business and do not get an answer. It is also important to note that for some messaging channels, not responding to messages may lead to decreased visibility of the business, or suspension of the messaging service.

The is_launched property indicates whether the business is reachable for those messaging channels.

The value can be updated, and the changes will be propagated to the messaging channels, effectively toggling the On or Off the ability for consumers to reach the business. (The change to "is_launched" is made asychronously, and the update will be effective when the messaging channels have finished propagating the information)