# create_license

Create a license for an organization: a product (PMS, FM or OS), the workspaces it covers and the dates it is in
force. Returns the new license id. Lavanda staff only.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `string` | Yes | The ID of the organization the license belongs to |
| `type` | `Type` | Yes | The product the license is for. PMS covers residential and student product groups; FM and OS cover short-term stay product groups. - [Type](#type) |
| `workspaceScope` | `WorkspaceScope` | Yes | ALL_WORKSPACES covers every workspace in the organization, including ones added later. SELECTED_WORKSPACES covers only the workspaces in workspaceIds. - [WorkspaceScope](#workspacescope) |
| `workspaceIds` | `string[]` | No | The workspaces to cover. Required with SELECTED_WORKSPACES; must be empty or omitted with ALL_WORKSPACES. |
| `effectiveFrom` | `string` | Yes | The first day the license is in force (YYYY-MM-DD) |
| `effectiveTo` | `string \| null` | No | The last day the license is in force (YYYY-MM-DD). Omit or send null for no end date. |

### Type

| Value | Description |
| --- | --- |
| `PMS` | |
| `FM` | |
| `OS` | |

### WorkspaceScope

| Value | Description |
| --- | --- |
| `ALL_WORKSPACES` | |
| `SELECTED_WORKSPACES` | |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
