﻿# Project Templates

## Share a project template to spaces

:endpoint{method="POST" path="/api/platformhub/\{gitRef\}/projecttemplates/\{slug\}/share"}

**Path Parameters**

- **`gitRef`** :span[string]{.type-label} *(required)*
- **`slug`** :span[string]{.type-label} *(required)*

**Request Body**

- **`GitRef`** :span[string]{.type-label} *(required)*
- **`IndividuallySharedSpaceIds`** :span[array of string]{.type-label} *(required)*
- **`ShareToAllSpaces`** :span[boolean]{.type-label} *(required)*
- **`Slug`** :span[string]{.type-label} *(required)*  
  Minimum length 1.

:::api-example{label="Request"}
```json
{
  "GitRef": "string",
  "IndividuallySharedSpaceIds": [
    "Spaces-1",
    "..."
  ],
  "ShareToAllSpaces": true,
  "Slug": "string"
}
```
:::

**Response**

`200` — Response containing the results of the share project template command

- **`IndividuallySharedSpaceIds`** :span[array of string]{.type-label}
- **`IndividuallyUnsharedSpaceIds`** :span[array of string]{.type-label}
- **`SharedToAllSpaces`** :span[boolean]{.type-label}

:::api-example{label="Response"}
```json
{
  "IndividuallySharedSpaceIds": [
    "Spaces-1",
    "..."
  ],
  "IndividuallyUnsharedSpaceIds": [
    "Spaces-1",
    "..."
  ],
  "SharedToAllSpaces": true
}
```
:::
