Skip to main content
PATCH
/
api
/
v1
/
market-analysis
/
analyses
/
{analysis_id}
Update a market analysis
curl --request PATCH \
  --url http://localhost:8000/api/v1/market-analysis/analyses/{analysis_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "summary": "<string>",
  "do_include_assistant_knowledge_item": false,
  "config": {
    "services": [
      "<string>"
    ],
    "location_ids": [
      123
    ],
    "language_id": 123,
    "website_url": "<string>"
  }
}
'
{
  "title": "<string>",
  "google_ads_customer_id": 123,
  "id": 123,
  "status": "draft",
  "date_added": "2023-11-07T05:31:56Z",
  "date_updated": "2023-11-07T05:31:56Z",
  "summary": "<string>",
  "do_include_assistant_knowledge_item": false,
  "config": {
    "services": [
      "<string>"
    ],
    "location_ids": [
      123
    ],
    "language_id": 1000,
    "website_url": "<string>"
  },
  "created_campaign_id": 123,
  "keywords": [
    {
      "id": 123,
      "keyword_text": "<string>",
      "is_selected": true,
      "avg_monthly_searches": 123,
      "competition": "<string>",
      "competition_index": 123,
      "low_bid": "<string>",
      "high_bid": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

analysis_id
integer
required

Query Parameters

include_keywords
boolean
default:false
include_unselected_keywords
boolean
default:false

Body

application/json

Schema for updating a market analysis.

title
string | null

Analysis title

summary
string | null

Summary/description of the market analysis

do_include_assistant_knowledge_item
boolean
default:false

Whether to include assistant knowledge items for this analysis

config
MarketAnalysisConfigUpdateSchema · object

Analysis configuration (partial updates supported)

Response

Successful Response

Schema for a market analysis.

title
string
required

Analysis title

google_ads_customer_id
integer
required

Google Ads customer ID

id
integer
required

Analysis ID

status
enum<string>
required

Analysis status (draft, completed, campaign_created)

Available options:
draft,
completed,
campaign_created
date_added
string<date-time>
required

Creation timestamp

date_updated
string<date-time>
required

Last update timestamp

summary
string | null

Summary/description of the market analysis

do_include_assistant_knowledge_item
boolean
default:false

Whether to include assistant knowledge items for this analysis

config
MarketAnalysisConfigSchema · object

Analysis configuration (can be empty on Market Analysis creation)

created_campaign_id
integer | null

ID of created campaign if any

keywords
MarketAnalysisKeywordSchema · object[]

Associated keywords