---
updatedAt: 2026-04-24T16:37:26.000Z
agentTools:
  projectIndex: https://developers.cloudbeds.com/llms.txt
---

# Create a favorite in a property for the user that is authorized

A favorite gives the ability to quick search their most wanted reports

**Notes**
- There is not possible to have 2 ranks with the same value could not be duplicated.
- The maximum numbers of reports to favorite is 12.
- If a report is favorited in the rank 1 and there is already one report favorited in
the rank 1, the latest one will be put in the desired and position and all the rest of
the elements will be move one position

# OpenAPI definition

```json
{
  "info": {
    "description": "#### The Cloudbeds Data Insights API provides programmatic methods to access report data in [Data Insights](https://www.cloudbeds.com/measure-success/). With the Cloudbeds Data Insights API, you can:\n\n- Build custom reports to display Cloudbeds data.\n- Automate complex reporting tasks to save time.\n- Integrate your Cloudbeds data with other business applications.\n- Schedule your reports to your email in a custom frequency\n- Access stock/custom reports created by Cloudbeds\n- And many others\n- Export Request has a limit of 100000 records\n- Data and Summary requests has a limit of 100 records when the mode is Preview\n- Data and Summary requests has a limit of 12000 records when the mode is Run\n\n*Note: The API return application/json*.",
    "version": "1.1",
    "title": "Data Insights API",
    "termsOfService": "https://www.cloudbeds.com/terms/api/",
    "contact": {
      "email": "support@cloudbeds.com"
    },
    "license": {
      "name": "Cloudbeds",
      "url": "https://www.cloudbeds.com/"
    }
  },
  "components": {
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "##### Authorization refers to the process of granting a user or application access permissions to Cloudbeds data and features.\n\nTo authenticate your users, your App will need to implement an [authorization code flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1).\n[Cloudbeds API Authentication](https://hotels.cloudbeds.com/api/docs/#api-Authentication) lets you direct your users to an authorization dialog on Cloudbeds.\nFrom there, the primary Cloudbeds experience will show the authorization dialog and handle the authorization on behalf of your App.\nYour users will be able to authorize or decline.\nAfter the user makes their choice, Cloudbeds will redirect the user to your App, where you can exchange the authorization code for an access token (if the user authorized your App), or handle a rejection (if the user did not authorize your App).\n\nIf using a cloudbeds API key, you can pass it as a header with the following format: `X-API-KEY: <your_api_key>`\n\n###### Cloudbeds implements the [OAuth 2.0](https://integrations.cloudbeds.com/hc/en-us/articles/360006450433-OAuth-2-0) authorization framework."
      }
    },
    "schemas": {
      "ErrorContent": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code"
          },
          "status": {
            "type": "string",
            "description": "Error status"
          },
          "description": {
            "type": "string",
            "description": "Error description"
          },
          "message": {
            "type": "object",
            "description": "Error message"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorContent"
          }
        }
      },
      "Favorite": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "readOnly": true,
            "description": "Favorite Id",
            "example": 1
          },
          "rank": {
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "description": "Rank associated to the favorite in order to display the reports",
            "example": "1"
          },
          "report_id": {
            "type": "integer",
            "description": "Report, Stock Report or Hub Id favorited",
            "example": "1"
          },
          "entity_id": {
            "type": "integer",
            "description": "Report, Stock Report or Hub Id favorited",
            "example": "1"
          },
          "report_kind": {
            "type": "string",
            "enum": [
              "report",
              "stock_report",
              "hub"
            ],
            "description": "Report Kind",
            "example": "stock_report"
          },
          "kind": {
            "type": "string",
            "enum": [
              "report",
              "stock_report",
              "hub"
            ],
            "description": "Favorite Kind",
            "example": "stock_report"
          }
        },
        "required": [
          "id",
          "rank"
        ]
      }
    }
  },
  "paths": {
    "/datainsights/v1.1/favorites": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "name": "X-PROPERTY-ID",
            "required": true,
            "description": "Property id of the client",
            "schema": {
              "type": "integer",
              "writeOnly": true,
              "minimum": 1
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Favorite"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Favorite"
              }
            }
          }
        },
        "summary": "Create a favorite in a property for the user that is authorized",
        "description": "A favorite gives the ability to quick search their most wanted reports\n\n**Notes**\n- There is not possible to have 2 ranks with the same value could not be duplicated.\n- The maximum numbers of reports to favorite is 12.\n- If a report is favorited in the rank 1 and there is already one report favorited in\nthe rank 1, the latest one will be put in the desired and position and all the rest of\nthe elements will be move one position",
        "tags": [
          "Favorites"
        ],
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Favorites",
      "description": "Operations on Favorites"
    }
  ],
  "openapi": "3.0.2",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```