Replace your pinned periods
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.
Request
Path parameters
websitestringrequiredWebsite id or domain, e.g. example.com
1–253 characters
Headers
AuthorizationstringrequiredBearer followed by an account token or an OAuth access token with the account:write scope.
Content-TypestringrequiredSend the body as JSON.
One of: application/json
Body fields
pinsstring[]required1–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
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.pins | object[] | |
| data.pins[].id | string | |
| data.pins[].position | integer | |
| data.pins[].period | string | |
| data.pins[].from | string | null | null | |
| data.pins[].to | string | null | null | |
| data.pins[].label | string | |
| data.saved | boolean |