---
title: "Get assistant messages matching a specific SOP violation"
method: POST
path: "/dashboard/api/sop-messages"
tags: ["SOPs"]
---

# Get assistant messages matching a specific SOP violation

`POST /dashboard/api/sop-messages`

## Request

- Base URL: `https://api.agnost.ai`
- URL: `https://api.agnost.ai/dashboard/api/sop-messages`
- Auth: one of:
  - HTTP bearer and API key in header `x-org-id`
  - API key in header `x-api-key`

Mirrors `/sentiment-messages`, but matches on the assistant output rather
than the user input. The `tag` field is the SOP title to filter on.

## Request body

- object
  - `time_range` '1min' | '1h' | '1d' | '1w' | '1m' | 'all'
  - `connection_type` union
    - string
    - string[]
  - `agent_name` union
    - string
    - string[]
  - `metadata_filters` object[]
    - `key` string
    - `value` string
  - `page` integer
  - `page_size` integer
  - `tag` string, required: SOP title to match
  - `limit` integer

## Response `200`

Paginated assistant messages that violated the SOP

## Changes

- **2026-11-03** `a61431b48f36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agnost/apis/agnost-ai-api/changes/dashboard/api/sop-messages/post.md)

---

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