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
  • Lead name - A descriptive name for the lead, typically including company and opportunity details

  • AE Owner - Account Executive who will handle the lead if qualified. Must be a valid user ID starting with 'u-'

  • Qualification Reason - Why the lead was marked as qualified (required when status is CLOSED_QUALIFIED)

  • Company ID - Associated company for this lead. Must be a valid company ID starting with 'c-'

  • Contact ID - Primary contact person for this lead. Must be a valid person ID starting with 'p-'

  • Conversion Probability - Estimated likelihood of converting to a qualified opportunity (0.0 to 1.0)

  • Creation Date - When the lead was first created in the system

  • Company Disqualification Reason - Reason for disqualifying the entire company

  • Disqualification Reason - Why the lead was disqualified (required when status is DISQUALIFIED)

  • Engagement Score - Measures the lead's level of interest and interaction (COLD, LUKEWARM, ON_FIRE)

    values
    123
  • Inbound Campaign Type - Specific inbound marketing campaign that generated this lead

  • License ID - Specific product license being evaluated or discussed

Responses

  • application/json
  • application/json
Request Example for put/{entity_id}
curl 'https://crm.dreamhub.ai/api/v1/leads/{entity_id}?include_additionals=false' \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Acme Corp - Enterprise Platform Evaluation",
  "sdrOwner": "u-abc123",
  "aeOwner": "u-xyz789",
  "companyId": "c-company123",
  "contactId": "p-contact789",
  "status": 1,
  "createdAt": "2024-01-15T10:30:00Z",
  "engagementScore": 1,
  "conversionProbability": 0.75,
  "source": 1,
  "disqualifiedReason": 1,
  "disqualifiedCompanyReason": 2,
  "closedAsQualifiedReason": 1,
  "statusNotes": "Waiting for budget approval from CFO",
  "statusChangedBy": "u-user123",
  "statusChangedAt": "2024-01-20T14:45:00Z",
  "licenseId": "l-license123",
  "productId": "prod-platform",
  "numberOfLicenses": 10,
  "salesExplorationMeetingDate": "2024-02-01T15:00:00Z",
  "inboundCampaignType": 1,
  "outboundCampaignType": 2,
  "referringCompany": "c-referrer123",
  "referringPerson": "p-referrer456",
  "otherCompanyName": "Subsidiary Corp",
  "otherPersonName": "John Smith (Decision Maker)",
  "partnerId": "ptn-partner123",
  "partnerContactId": "ptc-contact789",
  "additionalProperty": "anything"
}'
{
  "name": "Acme Corp - Enterprise Platform Evaluation",
  "sdrOwner": "u-abc123",
  "aeOwner": "u-xyz789",
  "companyId": "c-company123",
  "contactId": "p-contact789",
  "status": 1,
  "createdAt": "2026-11-12T20:58:47.474Z",
  "engagementScore": 1,
  "conversionProbability": 0.75,
  "source": 1,
  "disqualifiedReason": 1,
  "disqualifiedCompanyReason": 2,
  "closedAsQualifiedReason": 1,
  "statusNotes": "Waiting for budget approval from CFO",
  "statusChangedBy": "u-user123",
  "statusChangedAt": "2024-01-20T14:45:00Z",
  "licenseId": "l-license123",
  "productId": "prod-platform",
  "numberOfLicenses": 10,
  "salesExplorationMeetingDate": "2024-02-01T15:00:00Z",
  "inboundCampaignType": 1,
  "outboundCampaignType": 2,
  "referringCompany": "c-referrer123",
  "referringPerson": "p-referrer456",
  "otherCompanyName": "Subsidiary Corp",
  "otherPersonName": "John Smith (Decision Maker)",
  "partnerId": "ptn-partner123",
  "partnerContactId": "ptc-contact789",
  "previousStatus": 1,
  "companyUpdated": false,
  "personUpdated": false,
  "tokenHolder": "string",
  "tokenHolderNextSteps": "string",
  "closedAt": "2026-11-12T20:58:47.474Z",
  "lastModifiedBy": "string",
  "salesExplorationStatus": "not_booked",
  "id": "l-logi-f47ac10b",
  "lastActivity": "2026-11-12T20:58:47.474Z",
  "openForDays": 1,
  "salesExplorationStatusDisplay": "string",
  "contactJobTitle": "string",
  "contactEmail": "string",
  "contactFirstName": "string",
  "contactLastName": "string",
  "companyName": "string",
  "productName": "string",
  "contact": "string",
  "additionalProperty": "anything"
}