PUT
/
v1
/
analyses
/
{analysisId}
{
  "403": {},
  "404": {},
  "422": {},
  "analysisId": "<string>",
  "updated": true,
  "updatedAt": "<string>",
  "updatedFields": [
    {}
  ]
}

Update Analysis

Update metadata, tags, notes, and other properties of an existing analysis.

Request

analysisId
string
required
The unique identifier of the analysis to update
tags
array
Array of tags for categorization
notes
string
Additional notes or observations
metadata
object
Custom metadata fields
priority
string
Update priority: low, medium, high, urgent
status
string
Update status (admin only): archived, flagged

Response

analysisId
string
The analysis identifier
updated
boolean
Whether the update was successful
updatedAt
string
ISO 8601 timestamp of the update
updatedFields
array
List of fields that were updated

Examples

curl -X PUT https://api.authentivoice.com/v1/analyses/ana_1234567890abcdef \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tags": ["sales", "high-priority", "follow-up"],
    "notes": "Customer reported suspicious activity. Escalated to fraud team.",
    "metadata": {
      "callerId": "555-0123",
      "department": "Sales",
      "caseNumber": "CASE-2024-001"
    },
    "priority": "high"
  }'

Response Example

{
  "analysisId": "ana_1234567890abcdef",
  "updated": true,
  "updatedAt": "2024-01-15T11:45:30Z",
  "updatedFields": [
    "tags",
    "notes",
    "metadata",
    "priority"
  ]
}

Partial Updates

You can update individual fields without affecting others:
# Update only tags
curl -X PUT https://api.authentivoice.com/v1/analyses/ana_1234567890abcdef \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tags": ["reviewed", "confirmed-fraud"]
  }'

Error Responses

404
Not Found
Analysis not found
{
  "error": {
    "code": "ANALYSIS_NOT_FOUND",
    "message": "The specified analysis was not found"
  }
}
403
Forbidden
Insufficient permissions
{
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You do not have permission to update this analysis"
  }
}
422
Unprocessable Entity
Invalid update data
{
  "error": {
    "code": "INVALID_UPDATE",
    "message": "Invalid priority value. Must be: low, medium, high, or urgent"
  }
}