Skip to main content
POST
Performance compare

Authorizations

Authorization
string
header
required

A personal API key (adside_pat_…) or a token from adside login. Either carries the permissions of the person it belongs to.

Path Parameters

workspaceId
string
required
Minimum string length: 1

Body

application/json
account_id
string

X ads account id (e.g. 18ce55xcrlv). Omit it: it defaults to the ads account this workspace is connected to, and any other account is refused.

entity
enum<string>
default:ACCOUNT
Available options:
ACCOUNT,
CAMPAIGN,
LINE_ITEM,
PROMOTED_TWEET
entity_ids
string[]

Compare these objects side by side in one window (≤20). Without ids: this window vs the previous period.

Maximum array length: 20
Minimum string length: 1
metrics
string[]

Friendly metric names: spend, impressions, engagements, clicks, url_clicks, likes, follows, video_total_views, conversion_purchases, … plus derived ones (cpm, cpe, cplc, ctr, engagement_rate, cpv, cpa, roas) computed here. Default: the ENGAGEMENT + BILLING groups. See adside x metrics list.

placement
enum<string>
default:ALL_ON_TWITTER

One placement per stats request (X accepts a single value). Default ALL_ON_TWITTER; other placements are separate calls.

Available options:
ALL_ON_TWITTER,
PUBLISHER_NETWORK,
SPOTLIGHT,
TREND
preset
enum<string>

Shortcut for a date range. Default last_7d when no start_date/end_date given.

Available options:
today,
yesterday,
last_7d,
last_14d,
last_30d,
this_month,
last_month
start_date
string

First day, YYYY-MM-DD, in the account's time zone.

Pattern: ^\d{4}-\d{2}-\d{2}$
end_date
string

Last day (inclusive), YYYY-MM-DD, in the account's time zone. The exclusive end X wants is computed for you.

Pattern: ^\d{4}-\d{2}-\d{2}$
compare_to
enum<string>
default:previous_period
Available options:
previous_period,
none

Response

200 - application/json

Success