Skip to content
Website API / Analytics

Replace your pinned periods

PUThttps://<your Reveata origin>/api/v1/websites/{website}/period-pins

Saves the periods pinned on this website, in order: presets (every period except custom) and up to 10 fixed ranges written YYYY-MM-DD..YYYY-MM-DD (website days, inclusive). At least one pin. The dashboard picker shows the same list.

Related: Overview totals and Time series in Analytics.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

Headers

Authorizationstringrequired

Bearer followed by an account token or an OAuth access token with the account:write scope.

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

pinsstring[]required

1–24 items

Response

Your pins.

{
  "status": "string",
  "data": {
    "pins": [
      {
        "id": "string",
        "position": 0,
        "period": "realtime",
        "from": "string",
        "to": "string",
        "label": "string"
      }
    ],
    "saved": true
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.pinsobject[]
data.pins[].idstring
data.pins[].positioninteger
data.pins[].periodstring
data.pins[].fromstring | null | null
data.pins[].tostring | null | null
data.pins[].labelstring
data.savedboolean