Update Contact Request
Update an existing contact request. Only the fields included in the request body are modified; omitted fields retain their current values.
πΉ Endpoint Detailsβ
PUT /api/v1/contact-requests/{id}
π Authenticationβ
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | Must be application/json |
| Authorization | Yes | Format: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature |
π Path Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | ID of the contact request to update |
π Updatable Fieldsβ
All fields are optional on update (the body is validated with PartialType of the create DTO).
| Field | Type | Description |
|---|---|---|
organizationId | string (UUID) | Organization the request belongs to |
type | enum | contactmeback | keepmeinformed |
status | enum | pending | accepted | rejected |
preferredContact | enum | email | phone | whatsapp |
name | string | Contact name |
email | string | Contact email |
phone | string | Contact phone |
message | string | Free-form message |
relatedService | string (UUID) | Related service ID |
extraFields | object | Custom metadata bag |
agentId | string (UUID) | Assigned agent |
agentComment | string | Comment from the agent |
userGroupId | string (UUID) | Assigned user group |
taxonomies | array of strings | Taxonomy tags |
externalId | string | External identifier |
createdAt | date (ISO 8601) | Client-supplied creation timestamp |
π§© Request Exampleβ
curl -X PUT "https://openapi.onlive.site/api/v1/contact-requests/123e4567-e89b-12d3-a456-426614174000" \
-H "Content-Type: application/json" \
-H "Authorization: ONLIVESITE Credential:ONLIVEAccessKeyId, Signature=CalculatedSignature" \
-d '{
"status": "accepted",
"agentId": "e4567-e89b-12d3-a456-426614174000",
"agentComment": "Contacted the lead; sent brochure."
}'
π₯ Responseβ
Success Response (200 OK)β
Returns the full updated Contact Request entity.
Response Exampleβ
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"organizationName": "Acme Inc.",
"type": "contactmeback",
"status": "accepted",
"preferredContact": "email",
"name": "John Doe",
"phone": "+33612345678",
"message": "Please send me a copy of the contract",
"relatedService": "7a96c97a-bcf9-42df-984a-051c0fb8487e",
"extraFields": { "department": "Sales" },
"agentId": "e4567-e89b-12d3-a456-426614174000",
"agentComment": "Contacted the lead; sent brochure.",
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"userGroup": "Sales Team",
"taxonomies": ["/model/contact-request"],
"externalId": "frm_abc123",
"communicationLogs": [],
"countCommunicationLogs": 0,
"createdAt": "2025-05-13T15:00:00Z",
"updatedAt": "2025-05-13T16:42:11Z"
}
β Error Responsesβ
| Status | Description |
|---|---|
| 404 | Contact request not found |
This endpoint follows the standard error format.
π Validation Rulesβ
- Partial update
- Any subset of the create DTO fields may be sent; omitted fields are preserved
- Format
- UUIDs must be valid when provided
emailmust be a valid email when provided
- Enum values (when provided)
typeβ keepmeinformedstatusβ rejectedpreferredContactβ whatsapp
π‘ Best Practicesβ
- Status transitions
pendingβaccepted/rejectedonce an agent triages the request
- Assignment
- Update
agentIdandagentCommenttogether to record ownership context
- Update
- Classification
- Use
taxonomiesandextraFieldsto enrich requests over time
- Use
- Audit
- Prefer small, focused updates β each one updates
updatedAt
- Prefer small, focused updates β each one updates
π Notesβ
- Only the fields you include are updated
- The
updatedAttimestamp is refreshed automatically communicationLogsandcountCommunicationLogsare server-managed- You must have access to the owning organization
β Common Use Casesβ
- β
Triage: Move a request from
pendingtoaccepted/rejected - π€ Assignment: Assign an agent and leave a comment
- π·οΈ Tagging: Add
taxonomiesas a request is categorized - π Follow-up: Append
agentCommentafter contacting the lead