# Update Plane integration settings.

`PUT /api/integration/plane/settings`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Parameters:

- `organizationId` (query, string, required)
  Type: string

Request body: application/json (required)

Type: object

Schema: [UpdatePlaneSettingsDto](https://sourcey-gauzy.pages.dev/api-reference/models/updateplanesettingsdto/index.md)

- `mode` (optional)
  Type: string
  
  Integration mode: "shared" uses the global hosted Ever Gauzy PM UIs, "custom" uses tenant-provided URLs
  
  enum: ["shared","custom"]
  
  Example:
  
  ```json
  "shared"
  ```

- `planeWebUrl` (optional)
  Type: string
  
  Main Plane web app URL (required only in custom mode)
  
  Example:
  
  ```json
  "https://plane.example.com"
  ```

- `planeAdminUrl` (optional)
  Type: string
  
  Plane admin panel URL (optional; not used in shared mode)
  
  Example:
  
  ```json
  "https://admin.plane.example.com"
  ```

- `planeSpaceUrl` (optional)
  Type: string
  
  Plane public space URL (required in custom mode)
  
  Example:
  
  ```json
  "https://space.plane.example.com"
  ```

Responses:

- 200: Settings updated successfully.

- 404: Plane integration not configured.

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/integration/plane/settings?organizationId=string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "mode": "shared",
  "planeWebUrl": "https://plane.example.com",
  "planeAdminUrl": "https://admin.plane.example.com",
  "planeSpaceUrl": "https://space.plane.example.com"
}'
```

### JavaScript

```javascript
const body = `{
  "mode": "shared",
  "planeWebUrl": "https://plane.example.com",
  "planeAdminUrl": "https://admin.plane.example.com",
  "planeSpaceUrl": "https://space.plane.example.com"
}`;

const response = await fetch('http://localhost:3000/api/integration/plane/settings?organizationId=string', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "mode": "shared",
  "planeWebUrl": "https://plane.example.com",
  "planeAdminUrl": "https://admin.plane.example.com",
  "planeSpaceUrl": "https://space.plane.example.com"
}'''

response = requests.put(
    'http://localhost:3000/api/integration/plane/settings?organizationId=string',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
