Edit a contact

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.usehearsay.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "integrations MCP server": {
    "url": "https://docs.usehearsay.com/mcp"
  }
}

Close
PATCH /case/contacts/{orgId}/case/{caseId}/{contactId}

Edits a contact's name, email or phone. The values the device reported are kept, so the contact shows as edited.

Headers

  • organization string Required

    id of the selected (active) organization

Path parameters

  • orgId string Required

    ID of the organization

  • caseId string Required

    ID of the case

  • contactId string Required

    ID of the contact

application/json

Body Required

  • firstName string

    Minimum length is 3, maximum length is 100.

  • middleName string
  • lastName string
  • email string
  • address string
  • city string
  • country string
  • note string
  • phone array[string]

Responses

  • 201 application/json
    Hide response attributes Show response attributes object
    • data object Required
      Hide data attributes Show data attributes object
      • createdAt string(date-time) Required
      • updatedAt string(date-time) Required
      • id string Required
      • fullName string Required
      • firstName string Required
      • lastName string Required
      • originalFullName string Required
      • email string Required
      • address string Required
      • phone array[string] Required
      • phoneNational array[string] Required
      • source string Required

        Values are default, message, device_contact, whatsapp, voicemail, call_log, social, facebook, instagram, or threads.

      • linkedContacts array[object] | null Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

      • avatar object Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

        Hide avatar attributes Show avatar attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • name string Required
        • providerId string Required
        • convertedName string | null Required
        • convertedProviderId string Required
        • provider string Required
        • size number Required

          Size in bytes

        • transferState number | null Required
      • device object Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

        Hide device attributes Show device attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • deviceId string Required
        • serialNumber string Required
        • name string Required
        • type string Required
        • nonDeviceType string | null Required
        • model string Required
        • timeZone string Required
        • osVersion string Required
        • owner object | null Required

          Not loaded by any route, so always null.

        • devicePhoneNumber string Required
        • organizations array[string] Required

          Organization ids

        • extractionCodes array[string] Required

          Extraction code ids

        • availableData object

          Which data types exist for this device (optionally scoped by query filters).

      • owner object Required

        The full record on routes that load it; null (or an empty list) on routes that do not.

        Hide owner attributes Show owner attributes object
        • createdAt string(date-time) Required
        • updatedAt string(date-time) Required
        • id string Required
        • name string Required
        • email string Required
        • phone array[string] Required
        • isActive boolean Required
        • isEmailVerified boolean Required
        • lastActive string(date-time) Required
        • roles array[string] Required
        • avatar object Required

          The full record on routes that load it; null (or an empty list) on routes that do not.

          Hide avatar attributes Show avatar attributes object
          • createdAt string(date-time) Required
          • updatedAt string(date-time) Required
          • id string Required
          • name string Required
          • providerId string Required
          • convertedName string | null Required
          • convertedProviderId string Required
          • provider string Required
          • size number Required

            Size in bytes

          • transferState number | null Required
        • onboardingStatus string | null Required
        • userType string | null Required
        • firstName string Required
        • lastName string Required
        • initials string Required
        • userOrganizations array[object]

          Only filled on the signed-in user's own profile; absent or empty on a user nested in another record.

      • initials string Required
      • conversations array[string]
      • isEdited boolean Required

        True when the name differs from the one on the device

    • statusCode number Required
    • timestamp string(date-time) Required
PATCH /case/contacts/{orgId}/case/{caseId}/{contactId}
curl \
 --request PATCH 'http://api.example.com/case/contacts/{orgId}/case/{caseId}/{contactId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "organization: string" \
 --data '{
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "email": "string",
  "address": "string",
  "city": "string",
  "country": "string",
  "note": "string",
  "phone": [
    "string"
  ]
}'
Request examples
# Headers
organization: string

# Payload
{
  "firstName": "string",
  "middleName": "string",
  "lastName": "string",
  "email": "string",
  "address": "string",
  "city": "string",
  "country": "string",
  "note": "string",
  "phone": [
    "string"
  ]
}
Response examples (201)
{
  "data": {
    "createdAt": "2026-01-15T14:30:00.000Z",
    "updatedAt": "2026-01-15T14:30:00.000Z",
    "id": "507f1f77bcf86cd799439011",
    "fullName": "Jane Doe",
    "firstName": "Jane",
    "lastName": "Doe",
    "originalFullName": "Jane Doe",
    "email": "jane.doe@example.com",
    "address": "1 Main St, New York, NY",
    "phone": [
      "+15555550100"
    ],
    "phoneNational": [
      "(555) 555-0100"
    ],
    "source": "default",
    "linkedContacts": [
      {}
    ],
    "avatar": {
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-01-15T14:30:00.000Z",
      "id": "507f1f77bcf86cd799439011",
      "name": "photo.heic",
      "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
      "convertedName": "photo.jpg",
      "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
      "provider": "s3",
      "size": 204800,
      "transferState": 42.0
    },
    "device": {
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-01-15T14:30:00.000Z",
      "id": "507f1f77bcf86cd799439011",
      "deviceId": "3F2504E0-4F89-11D3-9A0C-0305E82C3301",
      "serialNumber": "F2LXK0QJHG7F",
      "name": "Jane's iPhone",
      "type": "ios",
      "nonDeviceType": "string",
      "model": "iPhone 15",
      "timeZone": "America/New_York",
      "osVersion": "18.0",
      "owner": {},
      "devicePhoneNumber": "+15555550100",
      "organizations": [
        "507f1f77bcf86cd799439011"
      ],
      "extractionCodes": [
        "507f1f77bcf86cd799439013"
      ],
      "availableData": {
        "messages": true,
        "calls": false
      }
    },
    "owner": {
      "createdAt": "2026-01-15T14:30:00.000Z",
      "updatedAt": "2026-01-15T14:30:00.000Z",
      "id": "507f1f77bcf86cd799439011",
      "name": "Jane Doe",
      "email": "jane.doe@example.com",
      "phone": [
        "+15555550100"
      ],
      "isActive": true,
      "isEmailVerified": true,
      "lastActive": "2026-01-15T14:30:00.000Z",
      "roles": [
        "user"
      ],
      "avatar": {
        "createdAt": "2026-01-15T14:30:00.000Z",
        "updatedAt": "2026-01-15T14:30:00.000Z",
        "id": "507f1f77bcf86cd799439011",
        "name": "photo.heic",
        "providerId": "uploads/507f1f77bcf86cd799439011/photo.heic",
        "convertedName": "photo.jpg",
        "convertedProviderId": "uploads/507f1f77bcf86cd799439011/photo.jpg",
        "provider": "s3",
        "size": 204800,
        "transferState": 42.0
      },
      "onboardingStatus": "completed",
      "userType": "attorney",
      "firstName": "Jane",
      "lastName": "Doe",
      "initials": "JD",
      "userOrganizations": [
        {}
      ]
    },
    "initials": "JD",
    "conversations": [
      "507f1f77bcf86cd799439014"
    ],
    "isEdited": false
  },
  "statusCode": 201,
  "timestamp": "2026-01-15T10:15:00.000Z"
}