Update Entity

​

Update an existing entity (PUT).

The body is validated against the full input schema, so every field the schema marks as required must be present, even when its value does not change; a body missing one is rejected with 422. Optional fields that are omitted keep their stored values, and a field sent as null is cleared. To change only some fields without resending the required ones, use PATCH /{entity_id}.

Args: entity_id: Unique identifier of the entity to update entity_info: Entity data validated against the full input schema: - All required fields must be present - Omitted optional fields retain their current values - Custom field updates if applicable user: Authenticated user information (used for audit trails) response: HTTP response object for status code modification

Returns: Complete updated entity data including: - All entity fields with updated values - Updated timestamp information - Computed fields and relationships

Note: - Returns HTTP 200 on successful update - Returns HTTP 206 (Partial Content) if entity is updated but some custom fields failed to update - Automatically updates modification timestamp and user information

Raises: HTTPException: - 400: Invalid input data or validation errors - 401: Authentication required - 403: Insufficient permissions to update this entity - 404: Entity not found - 409: Update conflict (entity modified by another user) - 422: Validation error in request data, including a missing required field - 500: Internal server error during update

Path Parameters

Query Parameters

  • Whether to include additional fields from the additional fields tab.

Body·

required
application/json
  • Integer numbers.

  • Integer numbers.

  • Integer numbers.

  • Integer numbers.

Responses

  • application/json
  • application/json
Request Example for put/thresholds/{entity_id}
curl 'https://crm.dreamhub.ai/api/v1/settings/thresholds/{entity_id}?include_additionals=false' \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "id": "",
  "low": 1,
  "medium": 1,
  "high": 1,
  "max": 1,
  "additionalProperty": "anything"
}'
{
  "id": "thr-f47ac10b",
  "low": 1,
  "medium": 1,
  "high": 1,
  "max": 1,
  "createdAt": "2026-11-12T20:58:57.912Z",
  "additionalProperty": "anything"
}