Update Session Field (v1)
Method + Path
PATCH /v1/workspace/:workspaceId/sessions/fields/:fieldId
Actual backend path: /v1/workspace/:workspaceId/sessions/fields/:fieldId
Description
Update an existing session field definition. All fields are optional - only provided fields will be updated.
Authentication
Required - JWT token in Authorization header
Required Permissions:
sessions.update
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token: Bearer <token> |
Content-Type | string | Yes | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
fieldId | string | Yes | Field identifier |
Request Body
{
"label": "Updated Pre-Session Notes",
"isRequired": true
}
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
label | string | No | Display label for the field |
isRequired | boolean | No | Whether the field is required |
metadata | object | No | Additional metadata for the field |
Response (200)
{
"field": {
"id": "507f1f77bcf86cd799439011",
"label": "Updated Pre-Session Notes",
"isRequired": true,
"updatedAt": "2024-01-15T11:00:00Z"
}
}
Common Errors
- 400 Bad Request: Invalid request body
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: Insufficient permissions (requires
sessions.update) - 404 Not Found: Field or workspace not found
- 422 Unprocessable Entity: Validation errors
- 500 Internal Server Error: Server error