Mangools/API

Save monitor brand profile

Save a brand profile with a monitor, replacing the one saved before. The server sets saved_at to now and keeps its own regenerations count, ignoring the value sent. Prompts the monitor already tracks are not changed.

Request body:

  • profile — the brand profile to save, as POST /aiwatcher/brand-profile/build returned it with the user's edits. The server replaces a non-null built_for with the monitor's current domain and brand, so saving confirms the profile for the monitor as it is now and clears stale without rebuilding it; a built_for of null (a profile written by hand) stays null.

The response has the same shape as GET /aiwatcher/monitor/{id}/brand-profile.

PUT
/aiwatcher/monitor/{id}/brand-profile

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

Path Parameters

id*string

Monitor ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://api.mangools.com/v3/aiwatcher/monitor/string/brand-profile" \  -H "Content-Type: application/json" \  -d '{    "profile": {}  }'
{
  "profile": {
    "about": "string",
    "about_origin": "site",
    "products": [
      {
        "key": "string",
        "name": "string",
        "description": "string",
        "origin": "site"
      }
    ],
    "audiences": [
      {
        "key": "string",
        "name": "string",
        "origin": "site"
      }
    ],
    "business_type": "string",
    "business_type_origin": "site",
    "removed_keys": [
      "string"
    ],
    "source": "homepage",
    "fallback_reason": "timeout",
    "built_for": {
      "domain": "string",
      "brand": "string"
    },
    "homepage_read_at": "2019-08-24T14:15:22Z",
    "saved_at": "2019-08-24T14:15:22Z",
    "regenerations": 0
  },
  "stale": {
    "field": "domain",
    "from": "string",
    "to": "string"
  },
  "monitor": {
    "domain": "string",
    "brand": "string"
  },
  "regenerations_left": 0
}
{
  "error": {
    "type": "AuthError",
    "message": "Invalid API Key"
  }
}
{
  "error": {
    "type": "ValidationError",
    "message": "Your request is invalid",
    "errors": [
      "Your request is invalid"
    ]
  }
}
{
  "error": {
    "type": "Error",
    "message": "Internal server error"
  }
}