Hubflo chat_room API

The chat_room API from Hubflo — 4 operation(s) for chat_room.

OpenAPI Specification

hubflo-chat-room-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Hubflo chat_room API
  version: v2
  description: "The Hubflo API allows you to write and read data from the Hubflo application.\nIt conforms to [REST](https://en.wikipedia.org/wiki/REST).\nIt has predictable resource-oriented URLS, accepts JSON request bodies, returns JSON and uses standard HTTP status codes\nand verbs.\n\n# Authentication\n\nThe Hubflo API requires authentication.\nIt's a bearer authentication, also called token authentication.\n\nTo start your integration journey with the Hubflo API, you must send your **authentication token** in the\n`Authorization` header when making requests to the API.\n\n```\nAuthorization: Bearer <token>\n```\n\n# Getting started\n\nNavigate to [https://app.hubflo.com/organizations/](https://app.hubflo.com/organizations/).\nIn the **Integrations** settings panel, click on the **Generate key** button if you don't already have an API key.\n\nThe generated API key is the required authentication token you must send in the `Authorization` header.\nLet's copy it.\n\nYou can use the `/pings` endpoint to check that you can successfully make an authenticated request.\nDo it directly from this documentation, using the **Authorize** button to paste your authentication token, then push\nthe **Try it out** button.\n\nAlternatively, you can run the following cURL command in a terminal:\n\n```\ncurl -X 'POST' \\\n  'https://app.hubflo.com/api/v2/pings' \\\n  -H 'accept: application/json' \\\n  -H 'Authorization: Bearer <token>' \\\n  -d ''\n```\n\nIf you're successfully authenticated, you receive:\n\n```json\n{\n  \"pong\": \"ok\"\n}\n```\n\nOtherwise you get a `401 - Unauthorized` error. For example:\n\n```json\n{\n  \"status\": 401,\n  \"title\": \"Unauthorized\",\n  \"message\": \"API token not found\"\n}\n```\n\n# Versioning\n\nThe API is versioned. The current version is 2.0 (referenced as v2 in the endpoints).\n\n# Routes\n\nThe API endpoints are accessible through a route of the form: `https://<domain>/api/<version>/<endpoint>`.\n\nWhere:\n\n- `domain` is the domain to use, usually \"app.hubflo.com\"\n- `version` is the API version\n- `endpoint` is the endpoint name\n\nFor example, we will have: `https://app.hubflo.com/api/v2/pings`.\n\n# Request headers\n\nEvery request should include the header `Content-Type: application/json`, except for file uploads.\n\n# Requests and parameters\n\nThe API adheres to REST principles:\n\n- `GET` requests: read without modification\n- `POST` requests: create a new resource\n- `PATCH` requests: update an existing resource\n- `DELETE` requests: delete a resource\n\nThe parameters for `GET` requests should be sent via the query string of the request.\n\nThe parameters for `POST` and `PATCH` requests should be transmitted in the request body in a valid JSON format.\n\nThe parameters should follow the following formats:\n- `date`: \"YYYY-MM-DD\", for example: \"2021-10-21\"\n- `time`: \"H:m[:s]\", for example: \"10:30\"\n- `date-time`: \"YYYY-MM-DDThh:mm:ssZ\", which is the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format, using UTC\n\n# Response headers\n\nAs specified for each endpoint, the response headers contain:\n- `Content-Type`: the response content type\n- `X-Organization-ID`: your organization ID\n- `X-Rate-Limit` the maximum allowed requests in a given period\n- `X-Remaining-Requests`: the remaining requests count in the current period\n\n# Response format\n\nThe API only supports JSON format.\nAll responses sent by the API will contain the header `Content-Type: application/json` and their content is present in\nthe body in a JSON format to be de-serialized.\n\n# Rate limit\n\nThe use of the API is limited.\nYou can make a maximum of 1000 calls per minute.\nIf you exceed this limit, you receive a `429 - Too Many Requests` error and are blocked for one minute.\n\n# Pagination\n\nAll endpoints that return lists are paginated.\nIn general, any endpoint that returns a list can return an empty list.\n\nThe (optional) `page` parameter allows you to access a specific page.\n\nThe (optional) `per_page` parameter allows you to change the number of items on a given page.\nThe default value is 20 and it is limited to a maximum of 100.\n\n# Response codes\n\nThe API may return the following codes:\n\n| Code  | Name                  | Description                                                                      |\n| ----  | --------              | --------                                                                         |\n| `200` | Success               | Success                                                                          |\n| `201` | Created               | Resource created                                                                 |\n| `204` | No Content            | Success but the response does not contain any data (e.g., deletion)              |\n| `400` | Bad Request           | The request is invalid                                                           |\n| `401` | Unauthorized          | Authentication failed                                                            |\n| `403` | Forbidden             | Insufficient rights to perform the requested action                              |\n| `404` | Not Found             | The resource is not found                                                        |\n| `422` | Unprocessable Content  | The transmitted data is malformed                                                |\n| `429` | Too Many Requests     | Too many requests have been made                                                 |\n| `500` | Internal Server Error | An internal server error occurred (the technical team is automatically notified) |\n\n# Errors\n\nWhen an error occurs, the response code informs you about what is happening.\nThe response body contains:\n- the status code,\n- the status name, a.k.a the error title,\n- a human readable message.\n\nSee the error schemas below.\n\n# Resources\n\nAll resources are identified by a unique ID that looks like this: \"16242d6f-a808-41b7-8c4d-fe29b9b3245f\".\n\nJSON data types are used at most: `string`, `number`, `float`, `object`, `array`, `boolean` and `null`.\nDates and datetimes attributes are serialized with UTC [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.\n\n\n"
servers:
- url: https://app.hubflo.com
  description: The production API server
- url: https://staging.hubflo.com
  description: The staging API server
- url: http://localhost:3000
  description: The local API server
tags:
- name: chat_room
paths:
  /api/v2/chat_rooms/{chat_room_id}/messages:
    get:
      summary: Retrieves messages from a given chat room
      security:
      - bearer_auth: []
      description: Returns messages
      tags:
      - chat_room
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        example: 1
        schema:
          type: number
      - name: per_page
        in: query
        required: false
        description: Number of items per page (max 100)
        example: 10
        schema:
          type: number
      - name: chat_room_id
        in: path
        required: true
        description: Chat room ID
        schema:
          type: string
      responses:
        '200':
          description: Messages retrieved
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
            X-Page:
              schema:
                type: integer
              description: Current page number
            X-Per-Page:
              schema:
                type: integer
              description: Number of items per page
            X-Total-Pages:
              schema:
                type: integer
              description: Total number of pages
            X-Next-Page:
              schema:
                type: integer
                nullable: true
              description: Next page number
            X-Prev-Page:
              schema:
                type: integer
                nullable: true
              description: Previous page number
            X-Total-Count:
              schema:
                type: integer
              description: Total number of items
          content:
            application/json:
              examples:
                example:
                  value:
                  - id: 94038351-45ac-48a3-b01f-8608cd6645b7
                    chat_room_id: 248ca71b-0c54-479e-a672-2bc522116f08
                    body: Hello, world!
                    private: false
                    participant_id: 5b1af97d-4908-4342-b331-273b09c775c9
                    participant_type: User
                    created_at: '2026-07-17T13:08:46Z'
                    files_count: 0
                  - id: 2f93b56d-9f9c-49fc-b5c0-7c4a88c7a42a
                    chat_room_id: 248ca71b-0c54-479e-a672-2bc522116f08
                    body: Hello, world!
                    private: false
                    participant_id: 0c5f74f8-05d0-48c5-8ec6-b70ef1d07d36
                    participant_type: User
                    created_at: '2026-07-17T13:08:47Z'
                    files_count: 0
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '404':
          description: 'not found: the resource is not found'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 404
                    title: Not Found
                    message: Resource not found
              schema:
                $ref: '#/components/schemas/error_not_found'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
    post:
      summary: Creates a message
      security:
      - bearer_auth: []
      description: "Post a message within a chat room as an internal user.\n        The user posting the message must be a participant in the chat room.\n        Private messages are not available for announcements chat rooms.\n        You can also attach files to the message."
      tags:
      - chat_room
      parameters:
      - name: chat_room_id
        in: path
        required: true
        description: Chat room ID
        schema:
          type: string
      - name: user_id
        in: query
        required: true
        description: User ID
        schema:
          type: string
      - name: body
        in: query
        required: true
        description: Message body
        schema:
          type: string
      - name: private
        in: query
        required: false
        description: Private message
        schema:
          type: boolean
      responses:
        '201':
          description: Message created
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
          content:
            application/json:
              examples:
                example:
                  value:
                    id: bf06eddf-0633-4494-89d2-2fb35ddf6d9f
                    chat_room_id: 73b4c234-198c-4db7-8ec1-6ac3fd5ca0a3
                    body: <p>Hello World! <a target="_blank" rel="noopener noreferrer nofollow" href="https://google.com"><u>google.com</u></a> and <a target="_blank" rel="noopener noreferrer nofollow" href="https://hubflo.com"><u>hubflo.com</u></a></p>
                    private: false
                    participant_id: e68a6422-fdb4-4c64-922a-8ac109b3ed33
                    participant_type: User
                    created_at: '2026-07-17T13:08:49Z'
                    files_count: 0
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: array
              items:
                type: string
                format: binary
        description: Files to attach
  /api/v2/chat_rooms/{chat_room_id}/participants:
    get:
      summary: Retrieves the participants of the given chat room
      security:
      - bearer_auth: []
      description: Returns the participants
      tags:
      - chat_room
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        example: 1
        schema:
          type: number
      - name: per_page
        in: query
        required: false
        description: Number of items per page (max 100)
        example: 10
        schema:
          type: number
      - name: chat_room_id
        in: path
        required: true
        description: Chat room ID
        schema:
          type: string
      responses:
        '200':
          description: Participants retrieved
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
            X-Page:
              schema:
                type: integer
              description: Current page number
            X-Per-Page:
              schema:
                type: integer
              description: Number of items per page
            X-Total-Pages:
              schema:
                type: integer
              description: Total number of pages
            X-Next-Page:
              schema:
                type: integer
                nullable: true
              description: Next page number
            X-Prev-Page:
              schema:
                type: integer
                nullable: true
              description: Previous page number
            X-Total-Count:
              schema:
                type: integer
              description: Total number of items
          content:
            application/json:
              examples:
                example:
                  value:
                  - id: 780e98ee-8ca2-49fa-bd4d-6d2a644ee40a
                    participant_id: 780e98ee-8ca2-49fa-bd4d-6d2a644ee40a
                    participant_type: User
                    company_name: Organization
                    email: member@organization.com
                    first_name: Memby
                    last_name: Member
                    full_name: Memby Member
                  - id: abb01058-c604-4347-9aff-5386663cf704
                    participant_id: abb01058-c604-4347-9aff-5386663cf704
                    participant_type: Contact
                    company_name: null
                    email: ramon@crist.test
                    first_name: Claretha
                    last_name: Luettgen
                    full_name: Claretha Luettgen
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '404':
          description: 'not found: the resource is not found'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 404
                    title: Not Found
                    message: Resource not found
              schema:
                $ref: '#/components/schemas/error_not_found'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
    post:
      summary: Adds a participant to the given chat room
      security:
      - bearer_auth: []
      description: Adds a participant to the chat room
      tags:
      - chat_room
      parameters:
      - name: chat_room_id
        in: path
        required: true
        description: Chat room ID
        schema:
          type: string
      - name: participant_type
        in: query
        required: true
        description: Type of participant (User or Contact)
        schema:
          type: string
      - name: participant_id
        in: query
        required: true
        description: ID of the participant to add
        schema:
          type: string
      responses:
        '201':
          description: Participant added
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
          content:
            application/json:
              examples:
                example:
                  value:
                    id: e68a6422-fdb4-4c64-922a-8ac109b3ed33
                    participant_id: e68a6422-fdb4-4c64-922a-8ac109b3ed33
                    participant_type: User
                    company_name: Organization
                    email: bot-1@hubflo.com
                    first_name: Hubflo
                    last_name: Bot
                    full_name: Hubflo API
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '404':
          description: 'not found: the resource is not found'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 404
                    title: Not Found
                    message: Resource not found
              schema:
                $ref: '#/components/schemas/error_not_found'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
  /api/v2/chat_rooms:
    get:
      summary: Retrieves the chat rooms
      security:
      - bearer_auth: []
      description: Returns the chat rooms
      tags:
      - chat_room
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        example: 1
        schema:
          type: number
      - name: per_page
        in: query
        required: false
        description: Number of items per page (max 100)
        example: 10
        schema:
          type: number
      - name: contact_id
        in: query
        required: false
        description: Filter by Contact ID
        schema:
          type: string
      - name: user_id
        in: query
        required: false
        description: Filter by User ID
        schema:
          type: string
      - name: name
        in: query
        required: false
        description: Filter by name
        schema:
          type: string
      - name: type
        in: query
        required: false
        description: Filter by room type
        schema:
          type: string
      responses:
        '200':
          description: Chat room retrieved
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
            X-Page:
              schema:
                type: integer
              description: Current page number
            X-Per-Page:
              schema:
                type: integer
              description: Number of items per page
            X-Total-Pages:
              schema:
                type: integer
              description: Total number of pages
            X-Next-Page:
              schema:
                type: integer
                nullable: true
              description: Next page number
            X-Prev-Page:
              schema:
                type: integer
                nullable: true
              description: Previous page number
            X-Total-Count:
              schema:
                type: integer
              description: Total number of items
          content:
            application/json:
              examples:
                example:
                  value:
                  - id: 2407aba0-5ec3-4b67-8a66-fed38f3be1a1
                    name: Action Required Room
                    action_required: true
                    type: regular
                    created_at: '2026-07-17T13:08:42Z'
                  - id: 047ae361-5967-4fb8-8586-3baf30d6e41e
                    name: Announcement Room
                    action_required: false
                    type: announcement
                    created_at: '2026-07-17T13:08:42Z'
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
    post:
      summary: Creates a chat room
      security:
      - bearer_auth: []
      description: Creates a chat room. Optionally links it to a workspace and adds participants.
      tags:
      - chat_room
      parameters: []
      responses:
        '201':
          description: Chat room created
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
          content:
            application/json:
              examples:
                example:
                  value:
                    id: 09097317-a681-4b48-94a9-ab6fb6034537
                    name: New Chat Room
                    action_required: false
                    type: regular
                    created_at: '2026-07-17T13:08:53Z'
        '400':
          description: When contact does not have authentication
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 400
                    title: Bad Request
                    message: Contact found but no associated authentication exists for this contact
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '422':
          description: 'unprocessable content: the resource can''t be created'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 422
                    title: Unprocessable Content
                    message: 'Validation failed: Title must be filled in'
              schema:
                $ref: '#/components/schemas/error_unprocessable_content'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Project Discussion
                workspace_id:
                  type: string
                  example: a0a0e818-749a-41d6-b898-43fa3ea55dd8
                user_ids:
                  type: array
                  items:
                    type: string
                  example:
                  - a0a0e818-749a-41d6-b898-43fa3ea55dd8
                contact_ids:
                  type: array
                  items:
                    type: string
                  example:
                  - a0a0e818-749a-41d6-b898-43fa3ea55dd8
              required:
              - name
        required: true
        description: Request body (flat). Chat room attributes at root.
  /api/v2/chat_rooms/{id}:
    parameters:
    - name: id
      in: path
      required: true
      description: Chat Room ID
      schema:
        type: string
    get:
      summary: Retrieves a chat room
      security:
      - bearer_auth: []
      description: Returns the chat room
      tags:
      - chat_room
      responses:
        '200':
          description: Chat Room retrieved
          headers:
            Content-Type:
              schema:
                type: string
              description: application/json; charset=utf-8
            X-Organization-ID:
              schema:
                type: string
              description: The organization ID
            X-Rate-Limit:
              schema:
                type: integer
              description: Max allowed requests in the current period
            X-Remaining-Requests:
              schema:
                type: integer
              description: Remaining requests in the current period
          content:
            application/json:
              examples:
                example:
                  value:
                    id: 730b3e0e-fa2c-4f1d-958b-99544e01a2ed
                    name: My Chat Room
                    action_required: false
                    type: regular
                    created_at: '2026-07-17T13:08:54Z'
        '401':
          description: 'unauthorized: the Authorization header is missing or invalid'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 401
                    title: Unauthorized
                    message: Invalid API token
              schema:
                $ref: '#/components/schemas/error_unauthorized'
        '404':
          description: 'not found: the resource is not found'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 404
                    title: Not Found
                    message: Resource not found
              schema:
                $ref: '#/components/schemas/error_not_found'
        '429':
          description: 'too many requests: the user has reached the rate limit'
          content:
            application/json:
              examples:
                example:
                  value:
                    status: 429
                    title: Too Many Requests
                    message: Rate limit reached. Please wait for a couple of minutes.
              schema:
                $ref: '#/components/schemas/error_too_many_requests'
components:
  schemas:
    error_not_found:
      descrip

# --- truncated at 32 KB (33 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/hubflo/refs/heads/main/openapi/hubflo-chat-room-api-openapi.yml