---
updatedAt: 2026-06-12T16:45:46.000Z
agentTools:
  projectIndex: https://docs.hosttools.com/llms.txt
---

# Create or Update Listing Group

Creates a new listing group, or updates an existing one when an `_id`
is provided in the body. Returns the saved group, including its
`ownerImportLink` (which is `null` until you call
/api/listingGroups/{id}/generateOwnerImportToken).


# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.30.0",
    "title": "Host Tools API Reference",
    "description": "Host Tools API. Supports two authentication methods:\n- **Legacy auth token**: Pass the `authToken` header with your user token\n- **OAuth 2.0 Bearer token**: Pass `Authorization: Bearer <token>` header (see OAuth endpoints below)\n\nOAuth 2.0 is recommended for new integrations. It supports granular scopes and automatic token refresh.\n",
    "contact": {
      "name": "Tom Krones",
      "email": "support@hosttools.com",
      "url": "https://hosttools.com"
    }
  },
  "servers": [
    {
      "url": "https://app.hosttools.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth2 Access Token",
        "description": "OAuth 2.0 access token obtained via the authorization code flow"
      },
      "authToken": {
        "type": "apiKey",
        "in": "header",
        "name": "authToken",
        "description": "Legacy user authentication token (UUID)"
      }
    },
    "schemas": {
      "ErrorModel": {
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "ListingGroup": {
        "required": [
          "_id",
          "name",
          "listingIDs",
          "ownerImportLink"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "description": "Listing group ID",
            "example": "6553a15c2f4c1e0017a1b1c1"
          },
          "name": {
            "type": "string",
            "description": "Display name of the listing group",
            "example": "Owner John"
          },
          "listingIDs": {
            "type": "array",
            "description": "IDs of the listings in this group",
            "items": {
              "type": "string"
            }
          },
          "accessCode": {
            "type": "string",
            "description": "Access code for the public turnover URL (Pro feature; optional)"
          },
          "ownerImportLink": {
            "type": "string",
            "nullable": true,
            "description": "Shareable URL an owner can use to connect OTA accounts and import\nlistings into this group. `null` until you call\n/api/listingGroups/{listingGroupID}/generateOwnerImportToken.\n\nOptional query params you can append, for example to embed the page\nin an iframe:\n- `channels` — comma-separated list limiting which channel tiles appear\n  (`airbnb`, `vrbo`, `booking`, `houfy`), e.g. `&channels=vrbo,booking`.\n  Omitted or all-unrecognized shows all channels.\n- `embed=1` (or `embed=true`) — hides the Host Tools footer, support\n  widget and analytics scripts for a clean iframe embed.\n- `redirect` — HTTPS URL on an allowlisted domain. After the owner\n  imports listings, the whole browser tab goes there, unchanged.\n\nYour domain must be allowlisted before browsers will show the page in\nyour iframe, and Airbnb can't be connected inside an iframe. See\n[Embedding Owner Import](https://docs.hosttools.com/reference/owner-import-embed).\n",
            "example": "https://app.hosttools.com/owner-import?ownerImportToken=8f1a2c3d-..."
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "authToken": []
    }
  ],
  "paths": {
    "/api/addListingGroup": {
      "post": {
        "summary": "Create or Update Listing Group",
        "description": "Creates a new listing group, or updates an existing one when an `_id`\nis provided in the body. Returns the saved group, including its\n`ownerImportLink` (which is `null` until you call\n/api/listingGroups/{id}/generateOwnerImportToken).\n",
        "tags": [
          "ListingGroups"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "OAuth 2.0 Bearer token (e.g. 'Bearer abc123'). Preferred over authToken for new integrations.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "apiKey",
            "in": "header",
            "description": "Partner API key (deprecated — use OAuth 2.0 for new integrations)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "authToken",
            "in": "header",
            "description": "User's authentication token (legacy). Use Authorization Bearer header for new integrations.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "_id": {
                    "type": "string",
                    "description": "Provide to update an existing group; omit to create a new one."
                  },
                  "name": {
                    "type": "string"
                  },
                  "listingIDs": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Listing `_id`s from GET /api/getListings. Every one must be a listing of this account; any other id is a `400` that names it in `data.listingIDs`."
                  },
                  "accessCode": {
                    "type": "string",
                    "minLength": 20,
                    "description": "Code for the public turnover link (`/turnovers/{accessCode}`), which needs no login. At least 20 characters; send an empty string to turn the link off."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Saved listing group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListingGroup"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorModel"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests"
          }
        }
      }
    }
  }
}
```