Mangools/API

Generate AI prompts for brand monitoring

Generate suggested monitoring prompts and a brand-perception summary for a given brand — useful during monitor onboarding so users do not have to come up with AI Search Watcher prompts manually. Send brand_profile to generate the prompts from a brand profile the user reviewed instead (see POST /aiwatcher/brand-profile/build); they then come grouped per product or service.

Request body:

  • brand — brand name to analyze
  • domain — without brand_profile, the brand perception is written from the title and meta description of the homepage on this domain when the page has them; not used with brand_profile (to draft a brand profile from the homepage, call POST /aiwatcher/brand-profile/build)
  • location_id — without brand_profile, accepted but not used when generating prompts; with it, the location is passed to the AI model, and prompts for a local service can name the city when the location is a city
  • platform_id — accepted but not used when generating prompts
  • language_id — optional language for prompt generation
  • brand_profile — optional brand profile to generate the prompts from; its about must not be empty. The prompts are grouped per product or service, one group per product; when the profile lists no products, the AI model infers them from about. The groups share one total: on an AI or Combo plan the larger of maxGeneratePrompts and the number of products, so every product gets at least one prompt, but no more than the prompts left on the account unless that is below maxGeneratePrompts; on other plans maxGeneratePrompts, the first products getting one each when there are more products than that

Response:

  • prompts — array of suggested prompt strings ready to pass into POST /aiwatcher/monitor; with brand_profile, the prompts of all groups in one list, one prompt per group per round, which on an AI or Combo plan can be more than maxGeneratePrompts
  • maxGeneratePrompts — number of prompts the current plan generates, regardless of the products in brand_profile
  • perception — a short textual summary of how AI models currently describe the brand; with brand_profile, the profile's about
  • groups — only when brand_profile was sent: the prompts per product or service, each group with its name and prompts
POST
/aiwatcher/prompts/generate

Authorization

ApiKeyAuth
x-access-token<token>

API token issued for your Mangools account, sent as an API key in the x-access-token HTTP header. This is NOT a standard RFC 6750 Authorization: Bearer <token> header. Auto-generated clients should be configured to send the token in x-access-token accordingly.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://api.mangools.com/v3/aiwatcher/prompts/generate" \  -H "Content-Type: application/json" \  -d '{    "location_id": 0,    "platform_id": 0,    "brand": "string",    "domain": "string"  }'
{
  "prompts": [
    "string"
  ],
  "perception": "string",
  "maxGeneratePrompts": 0,
  "groups": [
    {
      "name": "string",
      "prompts": [
        "string"
      ]
    }
  ]
}
{
  "error": {
    "type": "AuthError",
    "message": "Invalid API Key"
  }
}
{
  "error": {
    "type": "FailedDependencyException",
    "message": "The AI model did not answer, the prompts could not be generated"
  }
}