Bellaso Agent API

Tools backed by the organic module


Organic social

POST
https://dtrgbxembnbwlmpvhhms.supabase.co/functions/v1/cortex-mcp
/api/v1/tools/get_organic
Bearer (ck_ endpoint token)

Organic (unpaid) social analytics from the organic_social_daily and organic_social_posts marts — Facebook Pages and Instagram Business accounts today. Pick the mode: summary (followers, follower_change, reach, views, engagements, likes/comments/shares/saves, link_clicks, posts_published and engagement_rate, with prior-period deltas), daily (per-day series), accounts (per-account rollup with the latest follower count, ordered by reach), posts (the per-post table — sortable with sort_by/sort_dir, searchable with search over the caption, filterable by media_type, paged with limit/offset), or filter_options (all-time platforms, accounts, media types and the available date range). followers is the LATEST per-account count inside the window, never a sum — do not add it across days or accounts. These are unpaid metrics only: paid social lives in the ads tools, and get_channels is what compares the two. Filters: platform (facebook | instagram), account_id (exact). Omit both dates for the default window: the last 30 complete days ending yesterday.

Organic social › Request Body

mode
​string · enum · required

Which organic-social cut to return — see the tool description for each.

Enum values:
summary
daily
accounts
posts
filter_options
start_date
​string · pattern: ^\d{4}-\d{2}-\d{2}$

Window start, YYYY-MM-DD (inclusive). Omit both dates for the default window: the last 30 complete days ending yesterday.

end_date
​string · pattern: ^\d{4}-\d{2}-\d{2}$

Window end, YYYY-MM-DD (inclusive).

platform
​string · enum

Filter to one platform.

Enum values:
facebook
instagram
account_id
​string · minLength: 1 · maxLength: 200 · pattern: ^[^'\\]+$

Filter to one social account id (exact; get ids from mode=accounts or mode=filter_options).

sort_by
​string · minLength: 1 · maxLength: 64

posts mode: sort column — published_at | reach | views | likes | comments | shares | saves | engagements | engagement_rate (default published_at). An invalid value returns the allowed list.

sort_dir
​string · enum

Sort direction for the table mode (default desc).

Enum values:
asc
desc
limit
​integer · min: 1 · max: 500

Table mode: rows to return, 1-500 (default 25).

offset
​integer · min: 0 · max: 100000

Table mode: rows to skip, for paging (default 0).

search
​string · minLength: 1 · maxLength: 200

posts mode: case-insensitive match on the post caption.

media_type
​string · minLength: 1 · maxLength: 200 · pattern: ^[^'\\]+$

posts mode: filter to one media type (e.g. IMAGE, VIDEO, CAROUSEL_ALBUM, REEL, STORY).

Organic social › Responses

The tool ran

ok
​boolean · const · required
Const value:
tool
​string · required
data
​required

The tool's payload — byte-identical to what the same tool returns over MCP.