> ## Documentation Index
> Fetch the complete documentation index at: https://developers.partoo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List messaging settings

> This endpoint lets you list all the Messaging Settings you have access to.

You can filter the Messaging Settings based on the Organization or the
Business that they are related to.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /messaging/settings
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /messaging/settings:
    get:
      tags:
        - Messaging Settings
      summary: List messaging settings
      description: >
        This endpoint lets you list all the Messaging Settings you have access
        to.


        You can filter the Messaging Settings based on the Organization or the

        Business that they are related to.
      operationId: settings
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/PerPage'
        - $ref: '#/components/parameters/query_business__in'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: Response object
                type: object
                properties:
                  settings:
                    type: array
                    description: The list of Messaging Settings, paginated.
                    items:
                      $ref: '#/components/schemas/MessagingSetting'
                  page:
                    $ref: '#/components/schemas/Page'
                  count:
                    $ref: '#/components/schemas/Count'
                  max_page:
                    $ref: '#/components/schemas/MaxPage'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
components:
  parameters:
    Page:
      in: query
      name: page
      schema:
        type: integer
        default: 1
        minimum: 1
      description: Current page number.
    PerPage:
      in: query
      name: per_page
      schema:
        type: integer
        default: 30
        minimum: 1
        maximum: 100
      description: Number of items to return per page.
    query_business__in:
      in: query
      name: business__in
      description: >-
        Filter by business ids. Use a comma-separated list to provide multiple
        ids.
      schema:
        type: array
        example: >-
          a1c9f37b4deca92f83b61d02,9f4e2a8c0d73b154e621bc97,c73b15e9fa42d60b3a8c21ef
        items:
          $ref: '#/components/schemas/BusinessId'
          description: ''
  schemas:
    MessagingSetting:
      type: object
      properties:
        id:
          type: integer
        business_id:
          type: string
          description: |
            The ID of the business that the MessagingSetting is related to.
        business_name:
          type:
            - string
            - 'null'
          description: |
            The Name of the business that the MessagingSetting is related to.
        business_address:
          type:
            - string
            - 'null'
          description: >
            The Formatted address of the business that the MessagingSetting
            isrelated to.
          example: 1 Rue de la Paix, 75000 Paris
        welcome_message:
          $ref: '#/components/schemas/MessagingSettingWelcomeMessage'
        offline_message:
          $ref: '#/components/schemas/MessagingSettingOfflineMessage'
        uses_business_hours:
          $ref: '#/components/schemas/MessagingSettingUsesBusinessHours'
        custom_chat_hours:
          $ref: '#/components/schemas/ChatHours'
        is_launched:
          $ref: '#/components/schemas/MessagingSettingIsLaunched'
    Page:
      description: The current page number.
      type: integer
      example: 1
    Count:
      description: >
        Total number of results available for the filters and dimensions
        requested.
      type: integer
      example: 1
    MaxPage:
      description: Total number of pages available for this request.
      type: integer
      example: 1
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    MessagingSettingWelcomeMessage:
      type:
        - string
        - 'null'
      description: >
        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.
    MessagingSettingOfflineMessage:
      type:
        - string
        - 'null'
      description: >
        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.
    MessagingSettingUsesBusinessHours:
      type:
        - boolean
        - 'null'
      description: >
        If set to true, the business' "open_hours" will be used as chat
        hours.    

        Otherwise, you need to specify "custom_chat_hours".
    ChatHours:
      type:
        - object
        - 'null'
      description: >
        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.
      required:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    MessagingSettingIsLaunched:
      type:
        - boolean
        - 'null'
      description: >
        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)
    Day:
      description: >-
        Open in the morning and in the evening `[10:00-14:00, 18:00-00:00]`.
        Closed the whole day `[]`
      type: array
      items:
        $ref: '#/components/schemas/TimeWindow'
      example:
        - 10:00-14:00
    TimeWindow:
      description: Time window
      type: string
      pattern: ^([0-1][0-9]|2[0-3]):([0-5][0-9])-([0-1][0-9]|2[0-3]):([0-5][0-9])$
      example: 10:00-14:00
  responses:
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
  securitySchemes:
    ApiKeyAuth:
      description: >
        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.
      type: apiKey
      in: header
      name: x-APIKey

````