# Update organization project by ID

`PUT /api/organization-projects/{id}`

Authentication (security requirement alternatives):

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

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

Parameters:

- `id` (path, string, required) - UUID of the organization project
  Type: string

Request body: application/json (required)

Payload for updating the organization project

Type: object

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

- `tenant` (optional)
  Type: object

- `tenantId` (optional)
  Type: string

- `organization` (optional)
  Type: object

- `organizationId` (optional)
  Type: string

- `sentTo` (optional)
  Type: string

- `name` (optional)
  Type: string

- `billing` (optional)
  Type: string
  
  enum: ["RATE","FLAT_FEE","MILESTONES"]
  
  Example:
  
  ```json
  "FLAT_FEE"
  ```

- `budgetType` (optional)
  Type: string
  
  enum: ["hours","cost"]

- `imageId` (optional)
  Type: string

- `taskListType` (optional)
  Type: string
  
  enum: ["GRID","SPRINT"]
  
  Example:
  
  ```json
  "GRID"
  ```

- `memberIds` (optional)
  Type: array
  
  Items:
    Type: string

- `managerIds` (optional)
  Type: array
  
  Items:
    Type: string

Responses:

- 202: The organization project has been successfully updated

Content type: application/json

Type: object

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

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

- `isActive` (optional)
  Type: boolean
  
  default: true

- `isArchived` (optional)
  Type: boolean
  
  default: false

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `name` (required)
  Type: string

- `startDate` (optional)
  Type: string

- `endDate` (optional)
  Type: string

- `billing` (optional)
  Type: string
  
  enum: ["RATE","FLAT_FEE","MILESTONES"]
  
  Example:
  
  ```json
  "FLAT_FEE"
  ```

- `currency` (optional)
  Type: string
  
  enum: ["AFN","AFA","ALL","ALK","DZD","ADP","AOA","AOK","AON","AOR","ARA","ARS","ARM","ARP","ARL","AMD","AWG","AUD","ATS","AZN","AZM","BSD","BHD","BDT","BBD","BYN","BYB","BYR","BEF","BEC","BEL","BZD","BMD","BTN","BOB","BOL","BOV","BOP","BAM","BAD","BAN","BWP","BRC","BRZ","BRE","BRR","BRN","BRB","BRL","GBP","BND","BGL","BGN","BGO","BGM","BUK","BIF","XPF","KHR","CAD","CVE","KYD","XAF","CLE","CLP","CLF","CNX","CNY","COP","COU","KMF","CDF","CRC","HRD","HRK","CUC","CUP","CYP","CZK","CSK","DKK","DJF","DOP","NLG","XCD","DDM","ECS","ECV","EGP","GQE","ERN","EEK","ETB","EUR","XEU","FKP","FJD","FIM","FRF","XFO","XFU","GMD","GEK","GEL","DEM","GHS","GHC","GIP","GRD","GTQ","GWP","GNF","GNS","GYD","HTG","HNL","HKD","HUF","ISK","ISJ","INR","IDR","IRR","IQD","IEP","ILS","ILP","ILR","ITL","JMD","JPY","JOD","KZT","KES","KWD","KGS","LAK","LVL","LVR","LBP","LSL","LRD","LYD","LTL","LTT","LUL","LUC","LUF","MOP","MKD","MKN","MGA","MGF","MWK","MYR","MVR","MVP","MLF","MTL","MTP","MRO","MUR","MXV","MXN","MXP","MDC","MDL","MCF","MNT","MAD","MAF","MZE","MZN","MZM","MMK","NAD","NPR","ANG","TWD","NZD","NIO","NIC","NGN","KPW","NOK","OMR","PKR","PAB","PGK","PYG","PEI","PEN","PES","PHP","PLN","PLZ","PTE","GWE","QAR","XRE","RHD","RON","ROL","RUB","RUR","RWF","SVC","WST","SAR","RSD","CSD","SCR","SLL","SGD","SKK","SIT","SBD","SOS","ZAR","ZAL","KRH","KRW","KRO","SSP","SUR","ESP","ESA","ESB","LKR","SHP","SDD","SDG","SDP","SRD","SRG","SZL","SEK","CHF","SYP","STD","TJR","TJS","TZS","THB","TPE","TOP","TTD","TND","TRY","TRL","TMT","TMM","USD","USN","USS","UGX","UGS","UAH","UAK","AED","UYU","UYP","UYI","UZS","VUV","VEF","VEB","VND","VNN","CHE","CHW","XOF","YDD","YER","YUN","YUD","YUM","YUR","ZRN","ZRZ","ZMW","ZMK","ZWD","ZWR","ZWL"]
  
  Example:
  
  ```json
  "USD"
  ```

- `public` (optional)
  Type: boolean

- `owner` (optional)
  Type: string
  
  enum: ["CLIENT","INTERNAL"]
  
  Example:
  
  ```json
  "CLIENT"
  ```

- `taskListType` (required)
  Type: string
  
  enum: ["GRID","SPRINT"]
  
  Example:
  
  ```json
  "GRID"
  ```

- `code` (optional)
  Type: string

- `description` (optional)
  Type: string

- `color` (optional)
  Type: string

- `billable` (optional)
  Type: boolean

- `billingFlat` (optional)
  Type: boolean

- `openSource` (optional)
  Type: boolean

- `projectUrl` (optional)
  Type: string

- `openSourceProjectUrl` (optional)
  Type: string

- `budget` (optional)
  Type: number

- `budgetType` (optional)
  Type: string
  
  enum: ["hours","cost"]

- `imageUrl` (optional)
  Type: string

- `icon` (optional)
  Type: string

- `status` (optional)
  Type: string
  
  default: "open"
  
  enum: ["open","in-progress","completed","cancelled","custom"]

- `isTasksAutoSync` (optional)
  Type: boolean

- `isTasksAutoSyncOnLabel` (optional)
  Type: boolean

- `syncTag` (optional)
  Type: string

- `archiveTasksIn` (optional)
  Type: number

- `closeTasksIn` (optional)
  Type: number

- `organizationContactId` (optional)
  Type: string

- `imageId` (optional)
  Type: string

- `defaultAssigneeId` (optional)
  Type: string

- 401: Unauthorized

- 403: Forbidden

- 404: Organization project not found

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/organization-projects/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "name": "string",
  "billing": "FLAT_FEE",
  "budgetType": "hours",
  "imageId": "string",
  "taskListType": "GRID",
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "name": "string",
  "billing": "FLAT_FEE",
  "budgetType": "hours",
  "imageId": "string",
  "taskListType": "GRID",
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ]
}`;

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

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

### Python

```python
import requests

body = '''{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "name": "string",
  "billing": "FLAT_FEE",
  "budgetType": "hours",
  "imageId": "string",
  "taskListType": "GRID",
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ]
}'''

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