Prepare Ad
postly_prepare_adValidates a new ad campaign or a change to an existing one and saves it as a review that expires in 15 minutes. Nothing is published and no money is spent. Show the returned summary (action, budget, currency, countries, destination) to the user and get explicit confirmation before calling postly_apply_ad. Only workspace Owners and Admins can create or change ads with AI agents. Meta ad creation requires a connection with ads management access. Requires ads.write.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"provider": "<provider>",
"account_id": "<account_id>",
"kind": "<kind>",
"draft": "<draft>"
},
"name": "postly_prepare_ad"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | create for a new campaign, change for an existing campaign, ad group, or ad. | |
| draft | Yes | Create (Google Search): name, format search, url (public HTTPS), daily_budget and max_cpc in the account currency, headlines (3-15, up to 30 characters each), descriptions (2-4, up to 90 characters), keywords (1-30), countries as ISO codes, optional start_date and end_date as YYYY-MM-DD, launch_status PAUSED (default) or ACTIVE, and non_restricted true only after the user confirms the ad is not political, housing, employment, credit, or another restricted category. Display, Performance Max, and Demand Gen also need business_name, long_headline, and Postly media IDs in media_id, square_media_id, and logo_media_id. Change: entity campaign, group, or ad; campaign_id; resource_id for a group or ad; change status (with status ACTIVE or PAUSED), rename (new_name), budget (daily_budget), schedule (start, end), bid (max_cpc), creative, targeting, or delete. Validation errors explain any missing field. | |
| provider | Yes | Ads network from postly_list_ad_accounts, such as google or meta. | |
| account_id | Yes | Native ad account ID from postly_list_ad_accounts. | |
| workspace_id | Yes | Postly workspace ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| data | No | ||
| message | No |