CLI commands

Ad Accounts commands

The 5 koast CLI commands for the Ad Accounts operations.

Every command is one API operation, named by its operationId. Global flags such as --output and --api-url work on all of them, see CLI commands.

get-account-naming-convention

Get account naming convention. GET /v1/brands/{brandId}/ad-accounts/{accountId}/naming-convention, API reference.

koast get-account-naming-convention --brand <brand> --account-id <account-id>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--account-idstringYesThe ad account id (act_… on Meta, biz_… on Whop).

Required scope: read.

Example:

koast get-account-naming-convention --brand 123 --account-id ACCOUNT_ID

get-account-overview

Get account overview. GET /v1/brands/{brandId}/ad-accounts/{accountId}/overview, API reference.

koast get-account-overview --brand <brand> --account-id <account-id> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--account-idstringYesThe ad account id (act_… on Meta, biz_… on Whop).
--date-presetstringNoReporting date preset. If omitted, defaults to today. Use last_7d / last_28d / last_30d / last_90d / this_month / last_month as needed. Every last_Nd preset ENDS YESTERDAY and does not include today, so a campaign that only started yesterday reads as zero under last_7d, use today or yesterday to see it, and say which window a number came from. For "lifetime" / "all time" / "since launch", use maximum, NOT "lifetime" (it is not an accepted value). Arbitrary start/end date ranges are not supported by the backend. One of today, yesterday, this_week_sun_today, last_7d, last_14d, last_28d, last_30d, last_90d, this_month, last_month, maximum.

Required scope: read.

Example:

koast get-account-overview --brand 123 --account-id ACCOUNT_ID

get-available-options

Get asset and targeting options. GET /v1/brands/{brandId}/ad-accounts/{accountId}/options, API reference.

koast get-available-options --brand <brand> --account-id <account-id> --option-type <option-type> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--account-idstringYesThe ad account id (act_… on Meta, biz_… on Whop).
--option-typestringYesType of option: pixels, facebookPages, instagramAccounts, audiences, interests, locations, conversionEvents
--querystringNoSearch query to filter results

Required scope: read.

Example:

koast get-available-options --brand 123 --account-id ACCOUNT_ID --option-type OPTION_TYPE

list-account-campaigns

List ad account campaigns. GET /v1/brands/{brandId}/ad-accounts/{accountId}/campaigns, API reference.

koast list-account-campaigns --brand <brand> --account-id <account-id> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--account-idstringYesThe ad account id (act_… on Meta, biz_… on Whop).
--status-filterstring, repeatableNoFilter by status: ACTIVE, PAUSED, ARCHIVED
--name-querystringNoCase-insensitive substring to match campaign names. ALWAYS pass this when the user named a specific campaign (e.g. "meta test campaign"), the account can hold hundreds of campaigns and this returns only the matches with their ids.
--cursorstringNoOpaque cursor from the previous page's nextCursor. Omit for the first page.
--limitintegerNoPage size. Default 50. Minimum 1, maximum 100.

Required scope: read. Paged. --all follows nextCursor to the end and prints one JSON line per item.

Example:

koast list-account-campaigns --brand 123 --account-id ACCOUNT_ID

list-lead-forms

List lead forms. GET /v1/brands/{brandId}/ad-accounts/{accountId}/lead-forms, API reference.

koast list-lead-forms --brand <brand> --account-id <account-id> --page-id <page-id> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--account-idstringYesThe ad account id (act_… on Meta, biz_… on Whop).
--page-idstringYesPage id that owns the lead forms (from assets.facebookPage.id or getAvailableOptions).
--cursorstringNoOpaque cursor from the previous page's nextCursor. Omit for the first page.
--limitintegerNoPage size. Default 50. Minimum 1, maximum 100.

Required scope: read. Paged. --all follows nextCursor to the end and prints one JSON line per item.

Example:

koast list-lead-forms --brand 123 --account-id ACCOUNT_ID --page-id PAGE_ID

On this page