Skip to content

Docs

POST /get_results

https://heyeveryone.ai/api/v1/get_results

Operation

{
  "post": {
    "description": "How published posts did, over an optional publishedAt range (from/to) and channel/platform filter. `groupBy`: `post` (default; each post, by `pieceId` too, up to `limit`): its latest metrics (impressions, views, likes, comments, shares, saves, clicks as the platform reports them), `fetchedAt` and every fetch; metricsAvailable: false where the platform reports none (`note` says why, not a stuck fetch); `entered`: a person typed them in. Roll-ups, also by `campaign` label: `campaign` (per label; content with several counts in each, none is `campaign: null`, `overall` counts each post once), `format` (per format within each channel account, `bestFormat` per channel), `posting_time` (by hour 0–23, day 0 = Monday … 6 = Sunday, and day × hour, in the workspace's time zone or `timeZone`, IANA; `bestHour`/`bestDay`), `content` (a row per content item over its channels, top 40 by `metric` total, `more` counts the rest; `source: entered`: a person typed them in). `metric` (default `engagements`: likes + comments + shares + saves as each platform reports them) drives the ranking. Totals and averages count only posts that reported the metric (`reportedBy`), never all posts; `unavailable` posts' platform reports nothing, `notFetched` ones aren't checked yet (1 hour, 24 hours and 7 days after going live). A best pick needs two groups with data and no tie; on a small sample it is a hint. Reads at most 5,000 posts (`scope.truncated`). Or `account`: each channel account's own growth over the last `days` (7, 30 or 90; default 30; not from/to/campaign): followers, following and posts with their `change`, the platform's daily reach and views with `totals`, and a daily `series` (a day without a read is missing, not zero); `support: none`: no account read there (`note` says why), `latest: null`: none yet; read once a day.",
    "operationId": "get_results",
    "requestBody": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "workspaceId": {
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                "type": "string"
              },
              "from": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              "to": {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              "channelAccountId": {
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                "type": "string"
              },
              "platform": {
                "enum": [
                  "x",
                  "linkedin",
                  "threads",
                  "bluesky",
                  "instagram",
                  "facebook",
                  "tiktok",
                  "youtube",
                  "sandbox"
                ],
                "type": "string"
              },
              "campaign": {
                "maxLength": 60,
                "minLength": 1,
                "type": "string"
              },
              "groupBy": {
                "default": "post",
                "enum": [
                  "post",
                  "campaign",
                  "format",
                  "posting_time",
                  "account",
                  "content"
                ],
                "type": "string"
              },
              "pieceId": {
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                "type": "string"
              },
              "limit": {
                "maximum": 200,
                "minimum": 1,
                "type": "integer"
              },
              "metric": {
                "default": "engagements",
                "enum": [
                  "impressions",
                  "views",
                  "likes",
                  "comments",
                  "shares",
                  "saves",
                  "clicks",
                  "engagements"
                ],
                "type": "string"
              },
              "timeZone": {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              "days": {
                "anyOf": [
                  {
                    "const": 7,
                    "type": "number"
                  },
                  {
                    "const": 30,
                    "type": "number"
                  },
                  {
                    "const": 90,
                    "type": "number"
                  }
                ]
              }
            },
            "required": [
              "workspaceId"
            ],
            "type": "object"
          }
        }
      },
      "required": true
    },
    "responses": {
      "200": {
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "posts": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "postId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "pieceId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "pieceTitle": {
                            "type": "string"
                          },
                          "channelAccountId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "platform": {
                            "enum": [
                              "x",
                              "linkedin",
                              "threads",
                              "bluesky",
                              "instagram",
                              "facebook",
                              "tiktok",
                              "youtube",
                              "sandbox"
                            ],
                            "type": "string"
                          },
                          "handle": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "publishedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "permalink": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metricsAvailable": {
                            "type": "boolean"
                          },
                          "note": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "entered": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                    "type": "string"
                                  },
                                  "metrics": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "impressions": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "views": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "likes": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "comments": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "shares": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "saves": {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      "clicks": {
                                        "minimum": 0,
                                        "type": "number"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "enteredAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                    "type": "string"
                                  },
                                  "enteredBy": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "accountId": {
                                        "anyOf": [
                                          {
                                            "format": "uuid",
                                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                            "type": "string"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "accountId",
                                      "name"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "required": [
                                  "id",
                                  "metrics",
                                  "enteredAt",
                                  "enteredBy"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "metrics": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "impressions": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "views": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "likes": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "comments": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "shares": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "saves": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "clicks": {
                                    "minimum": 0,
                                    "type": "number"
                                  }
                                },
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "fetchedAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "snapshots": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "fetchedAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                  "type": "string"
                                },
                                "metrics": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "impressions": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "views": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "likes": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "comments": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "shares": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "saves": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "clicks": {
                                      "minimum": 0,
                                      "type": "number"
                                    }
                                  },
                                  "type": "object"
                                }
                              },
                              "required": [
                                "fetchedAt",
                                "metrics"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "postId",
                          "pieceId",
                          "pieceTitle",
                          "channelAccountId",
                          "platform",
                          "handle",
                          "publishedAt",
                          "permalink",
                          "metricsAvailable",
                          "note",
                          "entered",
                          "metrics",
                          "fetchedAt",
                          "snapshots"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "groupBy": {
                      "const": "post",
                      "type": "string"
                    }
                  },
                  "required": [
                    "posts",
                    "groupBy"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "metric": {
                      "enum": [
                        "impressions",
                        "views",
                        "likes",
                        "comments",
                        "shares",
                        "saves",
                        "clicks",
                        "engagements"
                      ],
                      "type": "string"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "anyOf": [
                            {
                              "enum": [
                                "x",
                                "linkedin",
                                "threads",
                                "bluesky",
                                "instagram",
                                "facebook",
                                "tiktok",
                                "youtube",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "newestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oldestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "channelAccountId",
                        "platform",
                        "campaign",
                        "truncated",
                        "newestFetchAt",
                        "oldestFetchAt"
                      ],
                      "type": "object"
                    },
                    "overall": {
                      "additionalProperties": false,
                      "properties": {
                        "posts": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "unavailable": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "notFetched": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "metric": {
                          "additionalProperties": false,
                          "properties": {
                            "metric": {
                              "enum": [
                                "impressions",
                                "views",
                                "likes",
                                "comments",
                                "shares",
                                "saves",
                                "clicks",
                                "engagements"
                              ],
                              "type": "string"
                            },
                            "total": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "reportedBy": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "average": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "metric",
                            "total",
                            "reportedBy",
                            "average"
                          ],
                          "type": "object"
                        },
                        "totals": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "metric": {
                                "enum": [
                                  "impressions",
                                  "views",
                                  "likes",
                                  "comments",
                                  "shares",
                                  "saves",
                                  "clicks",
                                  "engagements"
                                ],
                                "type": "string"
                              },
                              "total": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "reportedBy": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "average": {
                                "anyOf": [
                                  {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "metric",
                              "total",
                              "reportedBy",
                              "average"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "posts",
                        "unavailable",
                        "notFetched",
                        "metric",
                        "totals"
                      ],
                      "type": "object"
                    },
                    "campaigns": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "campaign": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pieces": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "results": {
                            "additionalProperties": false,
                            "properties": {
                              "posts": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "unavailable": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notFetched": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "metric": {
                                "additionalProperties": false,
                                "properties": {
                                  "metric": {
                                    "enum": [
                                      "impressions",
                                      "views",
                                      "likes",
                                      "comments",
                                      "shares",
                                      "saves",
                                      "clicks",
                                      "engagements"
                                    ],
                                    "type": "string"
                                  },
                                  "total": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "reportedBy": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "average": {
                                    "anyOf": [
                                      {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "metric",
                                  "total",
                                  "reportedBy",
                                  "average"
                                ],
                                "type": "object"
                              },
                              "totals": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "metric": {
                                      "enum": [
                                        "impressions",
                                        "views",
                                        "likes",
                                        "comments",
                                        "shares",
                                        "saves",
                                        "clicks",
                                        "engagements"
                                      ],
                                      "type": "string"
                                    },
                                    "total": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "reportedBy": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "average": {
                                      "anyOf": [
                                        {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "metric",
                                    "total",
                                    "reportedBy",
                                    "average"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "posts",
                              "unavailable",
                              "notFetched",
                              "metric",
                              "totals"
                            ],
                            "type": "object"
                          },
                          "best": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "campaign",
                          "pieces",
                          "results",
                          "best"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "groupBy": {
                      "const": "campaign",
                      "type": "string"
                    }
                  },
                  "required": [
                    "metric",
                    "scope",
                    "overall",
                    "campaigns",
                    "groupBy"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "metric": {
                      "enum": [
                        "impressions",
                        "views",
                        "likes",
                        "comments",
                        "shares",
                        "saves",
                        "clicks",
                        "engagements"
                      ],
                      "type": "string"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "anyOf": [
                            {
                              "enum": [
                                "x",
                                "linkedin",
                                "threads",
                                "bluesky",
                                "instagram",
                                "facebook",
                                "tiktok",
                                "youtube",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "newestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oldestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "channelAccountId",
                        "platform",
                        "campaign",
                        "truncated",
                        "newestFetchAt",
                        "oldestFetchAt"
                      ],
                      "type": "object"
                    },
                    "channels": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "channelAccountId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "platform": {
                            "enum": [
                              "x",
                              "linkedin",
                              "threads",
                              "bluesky",
                              "instagram",
                              "facebook",
                              "tiktok",
                              "youtube",
                              "sandbox"
                            ],
                            "type": "string"
                          },
                          "channelLabel": {
                            "type": "string"
                          },
                          "handle": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "bestFormat": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "formats": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "format": {
                                  "type": "string"
                                },
                                "formatLabel": {
                                  "type": "string"
                                },
                                "results": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "posts": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "unavailable": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "notFetched": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "metric": {
                                      "additionalProperties": false,
                                      "properties": {
                                        "metric": {
                                          "enum": [
                                            "impressions",
                                            "views",
                                            "likes",
                                            "comments",
                                            "shares",
                                            "saves",
                                            "clicks",
                                            "engagements"
                                          ],
                                          "type": "string"
                                        },
                                        "total": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "reportedBy": {
                                          "maximum": 9007199254740991,
                                          "minimum": 0,
                                          "type": "integer"
                                        },
                                        "average": {
                                          "anyOf": [
                                            {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        }
                                      },
                                      "required": [
                                        "metric",
                                        "total",
                                        "reportedBy",
                                        "average"
                                      ],
                                      "type": "object"
                                    },
                                    "totals": {
                                      "items": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "metric": {
                                            "enum": [
                                              "impressions",
                                              "views",
                                              "likes",
                                              "comments",
                                              "shares",
                                              "saves",
                                              "clicks",
                                              "engagements"
                                            ],
                                            "type": "string"
                                          },
                                          "total": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "reportedBy": {
                                            "maximum": 9007199254740991,
                                            "minimum": 0,
                                            "type": "integer"
                                          },
                                          "average": {
                                            "anyOf": [
                                              {
                                                "minimum": 0,
                                                "type": "number"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "metric",
                                          "total",
                                          "reportedBy",
                                          "average"
                                        ],
                                        "type": "object"
                                      },
                                      "type": "array"
                                    }
                                  },
                                  "required": [
                                    "posts",
                                    "unavailable",
                                    "notFetched",
                                    "metric",
                                    "totals"
                                  ],
                                  "type": "object"
                                },
                                "best": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "format",
                                "formatLabel",
                                "results",
                                "best"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "channelAccountId",
                          "platform",
                          "channelLabel",
                          "handle",
                          "bestFormat",
                          "formats"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "groupBy": {
                      "const": "format",
                      "type": "string"
                    }
                  },
                  "required": [
                    "metric",
                    "scope",
                    "channels",
                    "groupBy"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "metric": {
                      "enum": [
                        "impressions",
                        "views",
                        "likes",
                        "comments",
                        "shares",
                        "saves",
                        "clicks",
                        "engagements"
                      ],
                      "type": "string"
                    },
                    "timeZone": {
                      "type": "string"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "anyOf": [
                            {
                              "enum": [
                                "x",
                                "linkedin",
                                "threads",
                                "bluesky",
                                "instagram",
                                "facebook",
                                "tiktok",
                                "youtube",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "newestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oldestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "channelAccountId",
                        "platform",
                        "campaign",
                        "truncated",
                        "newestFetchAt",
                        "oldestFetchAt"
                      ],
                      "type": "object"
                    },
                    "overall": {
                      "additionalProperties": false,
                      "properties": {
                        "posts": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "unavailable": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "notFetched": {
                          "maximum": 9007199254740991,
                          "minimum": 0,
                          "type": "integer"
                        },
                        "metric": {
                          "additionalProperties": false,
                          "properties": {
                            "metric": {
                              "enum": [
                                "impressions",
                                "views",
                                "likes",
                                "comments",
                                "shares",
                                "saves",
                                "clicks",
                                "engagements"
                              ],
                              "type": "string"
                            },
                            "total": {
                              "minimum": 0,
                              "type": "number"
                            },
                            "reportedBy": {
                              "maximum": 9007199254740991,
                              "minimum": 0,
                              "type": "integer"
                            },
                            "average": {
                              "anyOf": [
                                {
                                  "minimum": 0,
                                  "type": "number"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "metric",
                            "total",
                            "reportedBy",
                            "average"
                          ],
                          "type": "object"
                        },
                        "totals": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "metric": {
                                "enum": [
                                  "impressions",
                                  "views",
                                  "likes",
                                  "comments",
                                  "shares",
                                  "saves",
                                  "clicks",
                                  "engagements"
                                ],
                                "type": "string"
                              },
                              "total": {
                                "minimum": 0,
                                "type": "number"
                              },
                              "reportedBy": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "average": {
                                "anyOf": [
                                  {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "metric",
                              "total",
                              "reportedBy",
                              "average"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "posts",
                        "unavailable",
                        "notFetched",
                        "metric",
                        "totals"
                      ],
                      "type": "object"
                    },
                    "byHour": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "posts": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "reportedBy": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "total": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "average": {
                            "anyOf": [
                              {
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hour": {
                            "maximum": 23,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "posts",
                          "reportedBy",
                          "total",
                          "average",
                          "hour"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "byDay": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "posts": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "reportedBy": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "total": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "average": {
                            "anyOf": [
                              {
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dayOfWeek": {
                            "maximum": 6,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "posts",
                          "reportedBy",
                          "total",
                          "average",
                          "dayOfWeek"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "cells": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "posts": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "reportedBy": {
                            "maximum": 9007199254740991,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "total": {
                            "minimum": 0,
                            "type": "number"
                          },
                          "average": {
                            "anyOf": [
                              {
                                "minimum": 0,
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dayOfWeek": {
                            "maximum": 6,
                            "minimum": 0,
                            "type": "integer"
                          },
                          "hour": {
                            "maximum": 23,
                            "minimum": 0,
                            "type": "integer"
                          }
                        },
                        "required": [
                          "posts",
                          "reportedBy",
                          "total",
                          "average",
                          "dayOfWeek",
                          "hour"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "bestHour": {
                      "anyOf": [
                        {
                          "maximum": 23,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bestDay": {
                      "anyOf": [
                        {
                          "maximum": 6,
                          "minimum": 0,
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "groupBy": {
                      "const": "posting_time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "metric",
                    "timeZone",
                    "scope",
                    "overall",
                    "byHour",
                    "byDay",
                    "cells",
                    "bestHour",
                    "bestDay",
                    "groupBy"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "days": {
                          "anyOf": [
                            {
                              "const": 7,
                              "type": "number"
                            },
                            {
                              "const": 30,
                              "type": "number"
                            },
                            {
                              "const": 90,
                              "type": "number"
                            }
                          ]
                        },
                        "from": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "to": {
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                          "type": "string"
                        },
                        "channelAccountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "anyOf": [
                            {
                              "enum": [
                                "x",
                                "linkedin",
                                "threads",
                                "bluesky",
                                "instagram",
                                "facebook",
                                "tiktok",
                                "youtube",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "days",
                        "from",
                        "to",
                        "channelAccountId",
                        "platform"
                      ],
                      "type": "object"
                    },
                    "accounts": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "channelAccountId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "platform": {
                            "enum": [
                              "x",
                              "linkedin",
                              "threads",
                              "bluesky",
                              "instagram",
                              "facebook",
                              "tiktok",
                              "youtube",
                              "sandbox"
                            ],
                            "type": "string"
                          },
                          "handle": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "enum": [
                              "active",
                              "reconnect_required",
                              "disconnected"
                            ],
                            "type": "string"
                          },
                          "support": {
                            "enum": [
                              "read",
                              "none"
                            ],
                            "type": "string"
                          },
                          "reported": {
                            "items": {
                              "enum": [
                                "followers",
                                "following",
                                "posts",
                                "reach",
                                "views"
                              ],
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "note": {
                            "type": "string"
                          },
                          "latest": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "followers": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "following": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "posts": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "reach": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "views": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "day": {
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "type": "string"
                                  },
                                  "fetchedAt": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "day",
                                  "fetchedAt"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "change": {
                            "additionalProperties": false,
                            "properties": {
                              "followers": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              "following": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              "posts": {
                                "maximum": 9007199254740991,
                                "minimum": -9007199254740991,
                                "type": "integer"
                              },
                              "since": {
                                "anyOf": [
                                  {
                                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "since"
                            ],
                            "type": "object"
                          },
                          "totals": {
                            "additionalProperties": false,
                            "properties": {
                              "reach": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "views": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "series": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "followers": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "following": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "posts": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "reach": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "views": {
                                  "maximum": 9007199254740991,
                                  "minimum": 0,
                                  "type": "integer"
                                },
                                "day": {
                                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "day"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "notices": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "code": {
                                  "type": "string"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "code",
                                "message"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "lastError": {
                            "anyOf": [
                              {
                                "additionalProperties": false,
                                "properties": {
                                  "code": {
                                    "type": "string"
                                  },
                                  "message": {
                                    "type": "string"
                                  },
                                  "at": {
                                    "format": "date-time",
                                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "code",
                                  "message",
                                  "at"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "channelAccountId",
                          "platform",
                          "handle",
                          "displayName",
                          "status",
                          "support",
                          "reported",
                          "note",
                          "latest",
                          "change",
                          "totals",
                          "series",
                          "notices",
                          "lastError"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "groupBy": {
                      "const": "account",
                      "type": "string"
                    }
                  },
                  "required": [
                    "scope",
                    "accounts",
                    "groupBy"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "metric": {
                      "enum": [
                        "impressions",
                        "views",
                        "likes",
                        "comments",
                        "shares",
                        "saves",
                        "clicks",
                        "engagements"
                      ],
                      "type": "string"
                    },
                    "scope": {
                      "additionalProperties": false,
                      "properties": {
                        "from": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "to": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelAccountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "platform": {
                          "anyOf": [
                            {
                              "enum": [
                                "x",
                                "linkedin",
                                "threads",
                                "bluesky",
                                "instagram",
                                "facebook",
                                "tiktok",
                                "youtube",
                                "sandbox"
                              ],
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "campaign": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "truncated": {
                          "type": "boolean"
                        },
                        "newestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "oldestFetchAt": {
                          "anyOf": [
                            {
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "from",
                        "to",
                        "channelAccountId",
                        "platform",
                        "campaign",
                        "truncated",
                        "newestFetchAt",
                        "oldestFetchAt"
                      ],
                      "type": "object"
                    },
                    "contents": {
                      "items": {
                        "additionalProperties": false,
                        "properties": {
                          "pieceId": {
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                            "type": "string"
                          },
                          "pieceTitle": {
                            "type": "string"
                          },
                          "campaignLabels": {
                            "items": {
                              "maxLength": 60,
                              "minLength": 1,
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "firstPublishedAt": {
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                            "type": "string"
                          },
                          "lastReadAt": {
                            "anyOf": [
                              {
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "results": {
                            "additionalProperties": false,
                            "properties": {
                              "posts": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "unavailable": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "notFetched": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "entered": {
                                "maximum": 9007199254740991,
                                "minimum": 0,
                                "type": "integer"
                              },
                              "metric": {
                                "additionalProperties": false,
                                "properties": {
                                  "metric": {
                                    "enum": [
                                      "impressions",
                                      "views",
                                      "likes",
                                      "comments",
                                      "shares",
                                      "saves",
                                      "clicks",
                                      "engagements"
                                    ],
                                    "type": "string"
                                  },
                                  "total": {
                                    "minimum": 0,
                                    "type": "number"
                                  },
                                  "reportedBy": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  },
                                  "average": {
                                    "anyOf": [
                                      {
                                        "minimum": 0,
                                        "type": "number"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "entered": {
                                    "maximum": 9007199254740991,
                                    "minimum": 0,
                                    "type": "integer"
                                  }
                                },
                                "required": [
                                  "metric",
                                  "total",
                                  "reportedBy",
                                  "average",
                                  "entered"
                                ],
                                "type": "object"
                              },
                              "totals": {
                                "items": {
                                  "additionalProperties": false,
                                  "properties": {
                                    "metric": {
                                      "enum": [
                                        "impressions",
                                        "views",
                                        "likes",
                                        "comments",
                                        "shares",
                                        "saves",
                                        "clicks",
                                        "engagements"
                                      ],
                                      "type": "string"
                                    },
                                    "total": {
                                      "minimum": 0,
                                      "type": "number"
                                    },
                                    "reportedBy": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    },
                                    "average": {
                                      "anyOf": [
                                        {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "entered": {
                                      "maximum": 9007199254740991,
                                      "minimum": 0,
                                      "type": "integer"
                                    }
                                  },
                                  "required": [
                                    "metric",
                                    "total",
                                    "reportedBy",
                                    "average",
                                    "entered"
                                  ],
                                  "type": "object"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "posts",
                              "unavailable",
                              "notFetched",
                              "entered",
                              "metric",
                              "totals"
                            ],
                            "type": "object"
                          },
                          "channels": {
                            "items": {
                              "additionalProperties": false,
                              "properties": {
                                "postId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                  "type": "string"
                                },
                                "channelAccountId": {
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                  "type": "string"
                                },
                                "platform": {
                                  "enum": [
                                    "x",
                                    "linkedin",
                                    "threads",
                                    "bluesky",
                                    "instagram",
                                    "facebook",
                                    "tiktok",
                                    "youtube",
                                    "sandbox"
                                  ],
                                  "type": "string"
                                },
                                "source": {
                                  "anyOf": [
                                    {
                                      "enum": [
                                        "api",
                                        "entered"
                                      ],
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "metrics": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "impressions": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "views": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "likes": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "comments": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "shares": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "saves": {
                                          "minimum": 0,
                                          "type": "number"
                                        },
                                        "clicks": {
                                          "minimum": 0,
                                          "type": "number"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "channelLabel": {
                                  "type": "string"
                                },
                                "handle": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "format": {
                                  "type": "string"
                                },
                                "formatLabel": {
                                  "type": "string"
                                },
                                "publishedAt": {
                                  "format": "date-time",
                                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                  "type": "string"
                                },
                                "permalink": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "metricsAvailable": {
                                  "type": "boolean"
                                },
                                "note": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "fetchedAt": {
                                  "anyOf": [
                                    {
                                      "format": "date-time",
                                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "entered": {
                                  "anyOf": [
                                    {
                                      "additionalProperties": false,
                                      "properties": {
                                        "id": {
                                          "format": "uuid",
                                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                          "type": "string"
                                        },
                                        "metrics": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "impressions": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "views": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "likes": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "comments": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "shares": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "saves": {
                                              "minimum": 0,
                                              "type": "number"
                                            },
                                            "clicks": {
                                              "minimum": 0,
                                              "type": "number"
                                            }
                                          },
                                          "type": "object"
                                        },
                                        "enteredAt": {
                                          "format": "date-time",
                                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                          "type": "string"
                                        },
                                        "enteredBy": {
                                          "additionalProperties": false,
                                          "properties": {
                                            "accountId": {
                                              "anyOf": [
                                                {
                                                  "format": "uuid",
                                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                                  "type": "string"
                                                },
                                                {
                                                  "type": "null"
                                                }
                                              ]
                                            },
                                            "name": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "accountId",
                                            "name"
                                          ],
                                          "type": "object"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "metrics",
                                        "enteredAt",
                                        "enteredBy"
                                      ],
                                      "type": "object"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "manualFields": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "metric": {
                                        "enum": [
                                          "impressions",
                                          "views",
                                          "likes",
                                          "comments",
                                          "shares",
                                          "saves",
                                          "clicks"
                                        ],
                                        "type": "string"
                                      },
                                      "label": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "metric",
                                      "label"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "history": {
                                  "items": {
                                    "additionalProperties": false,
                                    "properties": {
                                      "at": {
                                        "format": "date-time",
                                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                                        "type": "string"
                                      },
                                      "source": {
                                        "enum": [
                                          "api",
                                          "entered"
                                        ],
                                        "type": "string"
                                      },
                                      "metrics": {
                                        "additionalProperties": false,
                                        "properties": {
                                          "impressions": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "views": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "likes": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "comments": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "shares": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "saves": {
                                            "minimum": 0,
                                            "type": "number"
                                          },
                                          "clicks": {
                                            "minimum": 0,
                                            "type": "number"
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "enteredBy": {
                                        "anyOf": [
                                          {
                                            "additionalProperties": false,
                                            "properties": {
                                              "accountId": {
                                                "anyOf": [
                                                  {
                                                    "format": "uuid",
                                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
                                                    "type": "string"
                                                  },
                                                  {
                                                    "type": "null"
                                                  }
                                                ]
                                              },
                                              "name": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "accountId",
                                              "name"
                                            ],
                                            "type": "object"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "at",
                                      "source",
                                      "metrics",
                                      "enteredBy"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "postId",
                                "channelAccountId",
                                "platform",
                                "source",
                                "metrics"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "required": [
                          "pieceId",
                          "pieceTitle",
                          "campaignLabels",
                          "firstPublishedAt",
                          "lastReadAt",
                          "results",
                          "channels"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "more": {
                      "maximum": 9007199254740991,
                      "minimum": 0,
                      "type": "integer"
                    },
                    "groupBy": {
                      "const": "content",
                      "type": "string"
                    }
                  },
                  "required": [
                    "metric",
                    "scope",
                    "contents",
                    "more",
                    "groupBy"
                  ],
                  "type": "object"
                }
              ]
            }
          }
        },
        "description": "Success"
      },
      "400": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "invalid_input: the body does not match the schema"
      },
      "401": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "unauthenticated: missing, invalid, expired or revoked token"
      },
      "403": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "forbidden: the agent may not do this (for example, another workspace)"
      },
      "404": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "not_found"
      },
      "409": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "conflict"
      },
      "429": {
        "$ref": "#/components/responses/RateLimited"
      },
      "500": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "internal_error"
      }
    },
    "summary": "Get results",
    "tags": [
      "workspace"
    ],
    "x-heyeveryone-kind": "query"
  }
}

Referenced definitions

{
  "schemas": {
    "Error": {
      "properties": {
        "error": {
          "description": "A stable error code, for example forbidden.",
          "type": "string"
        },
        "message": {
          "description": "What went wrong, in plain words.",
          "type": "string"
        }
      },
      "required": [
        "error",
        "message"
      ],
      "type": "object"
    }
  },
  "responses": {
    "RateLimited": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "description": "rate_limited: too many requests from this agent, account or address (docs/setup/agents.md, Rate limits); wait the Retry-After seconds, then retry",
      "headers": {
        "Retry-After": {
          "description": "Seconds to wait before retrying.",
          "schema": {
            "minimum": 1,
            "type": "integer"
          }
        }
      }
    }
  }
}

Authentication

{
  "bearer": {
    "description": "Personal access token (hey_pat_...)",
    "scheme": "bearer",
    "type": "http"
  },
  "oauth": {
    "flows": {
      "authorizationCode": {
        "authorizationUrl": "https://heyeveryone.ai/oauth/authorize",
        "refreshUrl": "https://heyeveryone.ai/oauth/token",
        "scopes": {
          "agent": "Act as your agent in the workspaces you choose"
        },
        "tokenUrl": "https://heyeveryone.ai/oauth/token"
      }
    },
    "type": "oauth2"
  }
}

Security requirements

[
  {
    "bearer": []
  },
  {
    "oauth": [
      "agent"
    ]
  }
]