# Update record

`PUT /api/event-type/{id}`

Authentication (security requirement alternatives):

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

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

Parameters:

- `id` (path, string, required)
  Type: string

Request body: application/json (required)

Type: object

Schema: [EventType](https://sourcey-gauzy.pages.dev/api-reference/models/eventtype/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

- `duration` (required)
  Type: number

- `durationUnit` (required)
  Type: string

- `title` (required)
  Type: string

- `description` (optional)
  Type: string

- `employee` (required)
  Reference: [Employee](https://sourcey-gauzy.pages.dev/api-reference/models/employee/index.md); Type: object

- `employeeId` (required)
  Type: string
  
  readOnly: true

- `tags` (required)
  Type: array
  
  Items:
    Reference: [Tag](https://sourcey-gauzy.pages.dev/api-reference/models/tag/index.md); Type: object

Responses:

- 201: The record has been successfully updated.

- 400: Invalid input, The response body may contain clues as to what went wrong

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X PUT 'http://localhost:3000/api/event-type/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "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",
  "tenantId": "string",
  "organizationId": "string",
  "duration": 0,
  "durationUnit": "string",
  "title": "string",
  "description": "string",
  "employee": {
    "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",
    "tenantId": "string",
    "organizationId": "string",
    "short_description": "string",
    "description": "string",
    "startedWorkOn": "2024-01-15T09:30:00Z",
    "endWork": "2024-01-15T09:30:00Z",
    "payPeriod": "WEEKLY",
    "billRateValue": 0,
    "minimumBillingRate": 0,
    "billRateCurrency": "USD",
    "reWeeklyLimit": 0,
    "offerDate": "2024-01-15T09:30:00Z",
    "acceptDate": "2024-01-15T09:30:00Z",
    "rejectDate": "2024-01-15T09:30:00Z",
    "employeeLevel": "string",
    "anonymousBonus": true,
    "averageIncome": 0,
    "averageBonus": 0,
    "totalWorkHours": 0,
    "averageExpenses": 0,
    "show_anonymous_bonus": true,
    "show_average_bonus": true,
    "show_average_expenses": true,
    "show_average_income": true,
    "show_billrate": true,
    "show_payperiod": true,
    "show_start_work_on": true,
    "isJobSearchActive": true,
    "linkedInUrl": "string",
    "facebookUrl": "string",
    "instagramUrl": "string",
    "twitterUrl": "string",
    "githubUrl": "string",
    "gitlabUrl": "string",
    "upworkUrl": "string",
    "stackoverflowUrl": "string",
    "isVerified": true,
    "isVetted": true,
    "totalJobs": 0,
    "jobSuccess": 0,
    "profile_link": "string",
    "isTrackingEnabled": true,
    "isOnline": true,
    "isAway": false,
    "isTrackingTime": true,
    "allowScreenshotCapture": true,
    "allowManualTime": true,
    "allowModifyTime": true,
    "allowDeleteTime": true,
    "allowAgentAppExit": true,
    "allowLogoutFromAgentApp": true,
    "trackKeyboardMouseActivity": true,
    "trackAllDisplays": true,
    "upworkId": "string",
    "linkedInId": "string",
    "userId": "string",
    "contactId": "string",
    "organizationPositionId": "string"
  },
  "tags": [
    {
      "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",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "color": "string",
      "textColor": "string",
      "description": "string",
      "icon": "string",
      "isSystem": false,
      "tagTypeId": "string",
      "organizationTeamId": "string"
    }
  ]
}'
```

### JavaScript

```javascript
const body = `{
  "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",
  "tenantId": "string",
  "organizationId": "string",
  "duration": 0,
  "durationUnit": "string",
  "title": "string",
  "description": "string",
  "employee": {
    "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",
    "tenantId": "string",
    "organizationId": "string",
    "short_description": "string",
    "description": "string",
    "startedWorkOn": "2024-01-15T09:30:00Z",
    "endWork": "2024-01-15T09:30:00Z",
    "payPeriod": "WEEKLY",
    "billRateValue": 0,
    "minimumBillingRate": 0,
    "billRateCurrency": "USD",
    "reWeeklyLimit": 0,
    "offerDate": "2024-01-15T09:30:00Z",
    "acceptDate": "2024-01-15T09:30:00Z",
    "rejectDate": "2024-01-15T09:30:00Z",
    "employeeLevel": "string",
    "anonymousBonus": true,
    "averageIncome": 0,
    "averageBonus": 0,
    "totalWorkHours": 0,
    "averageExpenses": 0,
    "show_anonymous_bonus": true,
    "show_average_bonus": true,
    "show_average_expenses": true,
    "show_average_income": true,
    "show_billrate": true,
    "show_payperiod": true,
    "show_start_work_on": true,
    "isJobSearchActive": true,
    "linkedInUrl": "string",
    "facebookUrl": "string",
    "instagramUrl": "string",
    "twitterUrl": "string",
    "githubUrl": "string",
    "gitlabUrl": "string",
    "upworkUrl": "string",
    "stackoverflowUrl": "string",
    "isVerified": true,
    "isVetted": true,
    "totalJobs": 0,
    "jobSuccess": 0,
    "profile_link": "string",
    "isTrackingEnabled": true,
    "isOnline": true,
    "isAway": false,
    "isTrackingTime": true,
    "allowScreenshotCapture": true,
    "allowManualTime": true,
    "allowModifyTime": true,
    "allowDeleteTime": true,
    "allowAgentAppExit": true,
    "allowLogoutFromAgentApp": true,
    "trackKeyboardMouseActivity": true,
    "trackAllDisplays": true,
    "upworkId": "string",
    "linkedInId": "string",
    "userId": "string",
    "contactId": "string",
    "organizationPositionId": "string"
  },
  "tags": [
    {
      "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",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "color": "string",
      "textColor": "string",
      "description": "string",
      "icon": "string",
      "isSystem": false,
      "tagTypeId": "string",
      "organizationTeamId": "string"
    }
  ]
}`;

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

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

### Python

```python
import requests

body = '''{
  "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",
  "tenantId": "string",
  "organizationId": "string",
  "duration": 0,
  "durationUnit": "string",
  "title": "string",
  "description": "string",
  "employee": {
    "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",
    "tenantId": "string",
    "organizationId": "string",
    "short_description": "string",
    "description": "string",
    "startedWorkOn": "2024-01-15T09:30:00Z",
    "endWork": "2024-01-15T09:30:00Z",
    "payPeriod": "WEEKLY",
    "billRateValue": 0,
    "minimumBillingRate": 0,
    "billRateCurrency": "USD",
    "reWeeklyLimit": 0,
    "offerDate": "2024-01-15T09:30:00Z",
    "acceptDate": "2024-01-15T09:30:00Z",
    "rejectDate": "2024-01-15T09:30:00Z",
    "employeeLevel": "string",
    "anonymousBonus": true,
    "averageIncome": 0,
    "averageBonus": 0,
    "totalWorkHours": 0,
    "averageExpenses": 0,
    "show_anonymous_bonus": true,
    "show_average_bonus": true,
    "show_average_expenses": true,
    "show_average_income": true,
    "show_billrate": true,
    "show_payperiod": true,
    "show_start_work_on": true,
    "isJobSearchActive": true,
    "linkedInUrl": "string",
    "facebookUrl": "string",
    "instagramUrl": "string",
    "twitterUrl": "string",
    "githubUrl": "string",
    "gitlabUrl": "string",
    "upworkUrl": "string",
    "stackoverflowUrl": "string",
    "isVerified": true,
    "isVetted": true,
    "totalJobs": 0,
    "jobSuccess": 0,
    "profile_link": "string",
    "isTrackingEnabled": true,
    "isOnline": true,
    "isAway": false,
    "isTrackingTime": true,
    "allowScreenshotCapture": true,
    "allowManualTime": true,
    "allowModifyTime": true,
    "allowDeleteTime": true,
    "allowAgentAppExit": true,
    "allowLogoutFromAgentApp": true,
    "trackKeyboardMouseActivity": true,
    "trackAllDisplays": true,
    "upworkId": "string",
    "linkedInId": "string",
    "userId": "string",
    "contactId": "string",
    "organizationPositionId": "string"
  },
  "tags": [
    {
      "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",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "color": "string",
      "textColor": "string",
      "description": "string",
      "icon": "string",
      "isSystem": false,
      "tagTypeId": "string",
      "organizationTeamId": "string"
    }
  ]
}'''

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