---
title: "Create a hub"
method: POST
path: "/datainsights/v1.1/hubs"
tags: ["Hub"]
---

# Create a hub

`POST /datainsights/v1.1/hubs`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

## Headers

- `X-PROPERTY-ID` integer, required

## Request body

- CreateHub
  - `title` string, required: Hub title
  - `description` string, nullable: Hub Description
  - `settings` CardPositioning[]
    - `i` string, required: A string corresponding to the component key
    - `x` number: X coordinate
    - `y` number: Y coordinate
    - `w` number: Width
    - `h` number: Height
    - `minW` number: Minimum width
    - `maxW` number: Maximum width
    - `minH` number: Minimum height
    - `maxH` number: Maximum height
    - `moved` boolean: Moved
    - `static` boolean: Static
    - `isDraggable` boolean: Is draggable
    - `isResizable` boolean: Is resizable
    - `resizeHandles` string[]: Resize handles
    - `isBounded` boolean: Is bounded

## Response `201`

Created

- Hub
  - `id` integer, required: Hub Id
  - `title` string, required: Hub title
  - `description` string, nullable: Hub Description
  - `cards` Card[]
    - `id` integer, required: Card Id
    - `hub_id` integer, required: Hub id
    - `chart_id` integer, required: Chart id
  - `property_id` integer, required: Property id
  - `settings` CardPositioning[]
    - `i` string, required: A string corresponding to the component key
    - `x` number: X coordinate
    - `y` number: Y coordinate
    - `w` number: Width
    - `h` number: Height
    - `minW` number: Minimum width
    - `maxW` number: Maximum width
    - `minH` number: Minimum height
    - `maxH` number: Maximum height
    - `moved` boolean: Moved
    - `static` boolean: Static
    - `isDraggable` boolean: Is draggable
    - `isResizable` boolean: Is resizable
    - `resizeHandles` string[]: Resize handles
    - `isBounded` boolean: Is bounded
  - `created_at` string, date-time: Created at timestamp of the hub
  - `updated_at` string, date-time: Updated at timestamp of the hub
  - `created_by` User
    - `id` integer
    - `name` string
    - `email` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/cloudbeds/apis/data-insights-api.md) - [All operations](https://skmtc.dev/cloudbeds/apis/data-insights-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudbeds/apis/data-insights-api/revisions/0a16807149c2?raw)
