---
title: "Read the behaviour patterns detected on both sides of a conversation"
method: POST
path: "/api/v1/contacts/{id}/analyze-patterns"
---

# Read the behaviour patterns detected on both sides of a conversation

`POST /api/v1/contacts/{id}/analyze-patterns`

## Request

- Base URL: `https://memchats.com`
- URL: `https://memchats.com/api/v1/contacts/{id}/analyze-patterns`
- Auth: HTTP bearer

## Path parameters

- `id` integer, required

## Response `200`

Pattern analysis result with risk level and detected patterns

- object
  - `contact_name` string
  - `analyzed_messages` integer
  - `disclaimer` string: Localised by account language
  - `patterns_detected` object[]
    - `id` integer: Pattern id, for POST /patterns/{patternId}/dismiss
    - `type` string: Pattern key from the catalogue
    - `subject` 'user' | 'contact': Whose behaviour this is. Detection is bidirectional.
    - `subject_label` string: The contact's name, or the second person for the user
    - `severity` 'info' | 'caution' | 'alert'
    - `severity_label` string: Localised severity
    - `title` string: Localised by account language
    - `description` string
    - `occurrences` integer
    - `evidence_message_ids` integer[]
    - `dismissable` boolean
    - `first_detected` string, date-time
    - `last_confirmed` string, date-time
  - `risk_level` 'insufficient' | 'low' | 'moderate' | 'high'
  - `risk_level_label` string: Localised risk level
  - `summary` string: Localised by account language

## Other responses

- `404`: Contact not found
- `422`: No conversations found or insufficient messages

---

[API](https://skmtc.dev/memchats/apis/memchats-api.md) · [All operations](https://skmtc.dev/memchats/apis/memchats-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memchats/apis/memchats-api/revisions/e62bca06f785?raw)
