Skip to main content
POST
Add a dimension to a product

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Path Parameters

product_id
string
required

Body

application/json
name
string
required
Required string length: 1 - 200
currency
boolean | null
hidden
boolean | null
key
string | null

Lower-case letters, digits and underscores; made from the name when not sent

Pattern: ^[a-z0-9][a-z0-9_]{0,99}$
order
integer | null
Required range: 0 <= x <= 10000
show_change
boolean | null
suffix
string | null
Maximum string length: 40
type
enum<string>
Available options:
number,
text,
boolean,
date,
percent,
ratio

Response

201 - application/json

Successful Response

id
string
required
key
string
required

What usage data is matched on; unique across the workspace, and fixed

name
string
required
product
string
required

The id of the product it measures

currency
boolean
default:false

Whether the app shows values as money

hidden
boolean
default:false

Whether the app hides the dimension

order
integer | null

Its place among the product's dimensions; null for last

show_change
boolean
default:false

Whether the app shows the change since the period before

suffix
string | null

Shown after a value, such as 'users'

type
enum<string> | null

number, text, boolean, date, percent (0 to 100) or ratio (0 to 1); null for a type the app stores that this API does not know

Available options:
number,
text,
boolean,
date,
percent,
ratio