Skip to content

Tools reference

An app only sees the tools its permissions allow. All dates are ISO 8601, for example 2026-07-01 or 2026-07-01T09:00:00Z. Results include a link that opens the item in Kasbly.

Tool What it does Permission
get_workspace Workspace, your role and this connection’s permissions Any
list_social_accounts Connected social accounts See social accounts
list_posts Find posts with filters Read posts
get_post One post with full caption, media and status Read posts
create_draft_post Save a new draft for review Create draft posts
get_haraj_options Valid Haraj regions, cities, brands and models Create draft posts
list_campaigns Always-on campaigns Read campaigns
get_campaign One campaign with its settings Read campaigns
get_posting_summary Post counts by status for a period Read results
get_account_insights What works for one account over 90 days Read results

Call this first. Returns the workspace name, your role, the permissions of this connection and the tools available. No inputs.

Input Type Notes
platform string, optional e.g. INSTAGRAM, FACEBOOK, TIKTOK
limit number, optional 1 to 100, default 50

Use an account id from here as accountId in create_draft_post.

Input Type Notes
status string, optional DRAFT, SCHEDULED, PUBLISHING, PUBLISHED, FAILED
approvalStatus string, optional PENDING, IN_REVIEW, APPROVED, REJECTED, CHANGES_REQUESTED
platform string, optional Social platform
accountId string, optional One social account
campaignId string, optional One campaign
search string, optional Text in the title or caption
from, to date, optional Scheduled (go-live) date range; unscheduled drafts are left out
page, pageSize number, optional pageSize up to 50, default 20
limit number, optional Same as pageSize
includeContent boolean, optional false leaves out captions for a smaller response
Input Type Notes
postId string From list_posts

Saves a draft and returns it with a link. Nothing is scheduled or published; a person reviews it on the Marketing board.

Input Type Notes
accountId string From list_social_accounts
content string, optional The caption
title string, optional Internal title
platformCaptions object, optional A different caption per platform
targetPlatforms list, optional Platforms to post to; defaults to the account’s
mediaUrls list, optional Up to 10 image or video URLs
haraj object, optional Haraj car fields, see below
dokanMazadCarUrl string, optional Haraj only: a DokanMazad car link or car id

Provide content or at least one media URL. Platforms that cannot publish without a file (Instagram, TikTok, YouTube, Pinterest, Snapchat) still save a caption-only draft, marked as needing media. Attach the image on the Marketing board before scheduling or publishing.

A Haraj ad needs at least one image and these haraj fields: province, city, brand, year, mileage (thousands of km, 1 to 300) and a title of at most 60 characters. It also needs model when the brand has models, and price (SAR, digits) unless setPrice is false. Optional fields: condition (new, used, damaged), gearType (manual, automatic), fuelType (gasoline, diesel, hybrid), is4WD, showMobile and mobileNumber. Get valid province, city, brand and model values from get_haraj_options. Image URLs may be external.

The quickest way is dokanMazadCarUrl. It fills the title, text, photos, price and car fields the same way From links does in the dashboard, so you only add haraj.province and haraj.city. Anything else you pass replaces the filled value.

When a draft is rejected, the error lists every missing requirement.

Input Type Notes
field string province, city, brand or model
parentValue string, optional The province for city, the brand for model

Returns value and label pairs. Pass the value to create_draft_post.

list_campaigns has no inputs. get_campaign takes campaignId.

Input Type Notes
from, to date, optional Scheduled date range
accountId string, optional One social account

Returns post counts per status and how many posts are awaiting review.

Input Type Notes
accountId string From list_social_accounts

Returns which hooks, formats and sources beat the account’s median engagement over the last 90 days, and which lag.