Views

Save a view

Save a named filter over mentions. The filter takes the same fields as GET /v1/mentions (lists are any-of, `not` lists none-of, every condition ANDed), plus `anyOf`, groups of those conditions of which at least one must hold; an empty filter is every mention. Nothing is materialized: the view selects whatever matches when it is read.

POST
/v1/views
AuthorizationBearer <token>

API key minted via POST /v1/api-keys (format mk_live_...)

In: header

namestring

Unique per workspace, case-insensitive.

Length1 <= length <= 80
description?string

What the view is for, shown under its name.

Default""
Lengthlength <= 500
filter?

The filter; empty selects every mention.

Default{}

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.mentio.dev/v1/views" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "id": "string",
  "name": "string",
  "description": "string",
  "filter": {
    "q": "string",
    "keywordIds": [
      "string"
    ],
    "notKeywordIds": [
      "string"
    ],
    "keywordKinds": [
      "brand"
    ],
    "groupIds": [
      "string"
    ],
    "notGroupIds": [
      "string"
    ],
    "platforms": [
      "bluesky"
    ],
    "notPlatforms": [
      "bluesky"
    ],
    "status": "open",
    "relevant": true,
    "minRelevance": 100,
    "minConfidence": 1,
    "sentiments": [
      "positive"
    ],
    "notSentiments": [
      "positive"
    ],
    "intents": [
      "string"
    ],
    "notIntents": [
      "string"
    ],
    "automated": true,
    "languages": [
      "string"
    ],
    "notLanguages": [
      "string"
    ],
    "countries": [
      "us"
    ],
    "notCountries": [
      "us"
    ],
    "organization": true,
    "tags": [
      "string"
    ],
    "notTags": [
      "string"
    ],
    "linkHosts": [
      "string"
    ],
    "notLinkHosts": [
      "string"
    ],
    "subreddits": [
      "string"
    ],
    "notSubreddits": [
      "string"
    ],
    "minFollowers": 0,
    "maxFollowers": 0,
    "isReply": true,
    "kind": "post",
    "excludeAuthors": [
      "string"
    ],
    "ratings": [
      1
    ],
    "notRatings": [
      1
    ],
    "minLikes": 0,
    "minReposts": 0,
    "minReplies": 0,
    "minQuotes": 0,
    "minViews": 0,
    "minBookmarks": 0,
    "anyOf": [
      {
        "q": "string",
        "keywordIds": [
          "string"
        ],
        "notKeywordIds": [
          "string"
        ],
        "keywordKinds": [
          "brand"
        ],
        "groupIds": [
          "string"
        ],
        "notGroupIds": [
          "string"
        ],
        "platforms": [
          "bluesky"
        ],
        "notPlatforms": [
          "bluesky"
        ],
        "status": "open",
        "relevant": true,
        "minRelevance": 100,
        "minConfidence": 1,
        "sentiments": [
          "positive"
        ],
        "notSentiments": [
          "positive"
        ],
        "intents": [
          "string"
        ],
        "notIntents": [
          "string"
        ],
        "automated": true,
        "languages": [
          "string"
        ],
        "notLanguages": [
          "string"
        ],
        "countries": [
          "us"
        ],
        "notCountries": [
          "us"
        ],
        "organization": true,
        "tags": [
          "string"
        ],
        "notTags": [
          "string"
        ],
        "linkHosts": [
          "string"
        ],
        "notLinkHosts": [
          "string"
        ],
        "subreddits": [
          "string"
        ],
        "notSubreddits": [
          "string"
        ],
        "minFollowers": 0,
        "maxFollowers": 0,
        "isReply": true,
        "kind": "post",
        "excludeAuthors": [
          "string"
        ],
        "ratings": [
          1
        ],
        "notRatings": [
          1
        ],
        "minLikes": 0,
        "minReposts": 0,
        "minReplies": 0,
        "minQuotes": 0,
        "minViews": 0,
        "minBookmarks": 0
      }
    ]
  },
  "createdAt": "string",
  "updatedAt": "string"
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}
{
  "error": {
    "code": "unauthorized",
    "message": "string",
    "requestId": "string",
    "retryAfterSeconds": 0
  }
}