# Make issue type default.

`PUT /api/issue-types/{id}/default`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

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

- `tenant` (optional)
  Type: object

- `tenantId` (optional)
  Type: string

- `organization` (optional)
  Type: object

- `organizationId` (optional)
  Type: string

- `sentTo` (optional)
  Type: string

- `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"
  ```

- `name` (optional)
  Type: string

- `value` (optional)
  Type: string

- `description` (optional)
  Type: string

- `icon` (optional)
  Type: string

- `color` (optional)
  Type: string

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

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

- `imageId` (optional)
  Type: string

- `projectId` (optional)
  Type: string

- `organizationTeamId` (optional)
  Type: string

Responses:

- 200: Task issue type marked as default

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/issue-types/%7Bid%7D/default' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "value": "string",
  "description": "string",
  "icon": "string",
  "color": "string",
  "isDefault": false,
  "isSystem": false,
  "imageId": "string",
  "projectId": "string",
  "organizationTeamId": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "value": "string",
  "description": "string",
  "icon": "string",
  "color": "string",
  "isDefault": false,
  "isSystem": false,
  "imageId": "string",
  "projectId": "string",
  "organizationTeamId": "string"
}`;

const response = await fetch('http://localhost:3000/api/issue-types/%7Bid%7D/default', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

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

### Python

```python
import requests

body = '''{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "deletedAt": "2018-11-21T06:20:32.232Z",
  "createdAt": "2018-11-21T06:20:32.232Z",
  "updatedAt": "2018-11-21T06:20:32.232Z",
  "id": "string",
  "isActive": true,
  "isArchived": false,
  "archivedAt": "2018-11-21T06:20:32.232Z",
  "name": "string",
  "value": "string",
  "description": "string",
  "icon": "string",
  "color": "string",
  "isDefault": false,
  "isSystem": false,
  "imageId": "string",
  "projectId": "string",
  "organizationTeamId": "string"
}'''

response = requests.put(
    'http://localhost:3000/api/issue-types/%7Bid%7D/default',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
