{
  "info": {
    "_postman_id": "84266efc-2609-4417-ac8d-36ba97e0ca39",
    "name": "Swetrix Admin Annotations Custom Events API",
    "description": "The Swetrix Admin API manages analytics projects, funnels, annotations, project views (segments), and organisations. Supports full CRUD operations for all Swetrix account resources. All requests require authentication via the X-Api-Key header. Rate limit is 600 requests/hour.\n\nContact Support:\n Name: Swetrix Support",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "createdAt": "2026-07-28T03:06:34.000Z",
    "updatedAt": "2026-07-28T03:06:34.000Z",
    "lastUpdatedBy": "35240",
    "uid": "35240-84266efc-2609-4417-ac8d-36ba97e0ca39"
  },
  "item": [
    {
      "name": "v1",
      "item": [
        {
          "name": "log",
          "item": [
            {
              "name": "custom-events",
              "item": [
                {
                  "name": "Get Custom Events Data",
                  "id": "22124701-6daf-4e2d-b755-e4be2a9bec2d",
                  "protocolProfileBehavior": {
                    "disableBodyPruning": true
                  },
                  "request": {
                    "method": "GET",
                    "header": [
                      {
                        "key": "Accept",
                        "value": "application/json"
                      }
                    ],
                    "url": {
                      "raw": "{{baseUrl}}/v1/log/custom-events?pid=<string>&timeBucket=month&period=4w&from=<date>&to=<date>&timezone=Etc/GMT&customEvents=<string>",
                      "host": [
                        "{{baseUrl}}"
                      ],
                      "path": [
                        "v1",
                        "log",
                        "custom-events"
                      ],
                      "query": [
                        {
                          "description": "(Required) Project ID",
                          "key": "pid",
                          "value": "<string>"
                        },
                        {
                          "description": "(Required) Time bucket for data aggregation",
                          "key": "timeBucket",
                          "value": "month"
                        },
                        {
                          "description": "(Required) Time period for the query",
                          "key": "period",
                          "value": "4w"
                        },
                        {
                          "description": "Custom range start date (YYYY-MM-DD)",
                          "key": "from",
                          "value": "<date>"
                        },
                        {
                          "description": "Custom range end date (YYYY-MM-DD)",
                          "key": "to",
                          "value": "<date>"
                        },
                        {
                          "description": "IANA timezone name (default Etc/GMT)",
                          "key": "timezone",
                          "value": "Etc/GMT"
                        },
                        {
                          "description": "(Required) JSON array of custom event names to query",
                          "key": "customEvents",
                          "value": "<string>"
                        }
                      ]
                    },
                    "description": "Returns custom event analytics grouped by time bucket for specified event names. Returns counts and trends for each custom event."
                  },
                  "response": [
                    {
                      "id": "40902a9d-4e9d-49b0-b269-7eaf0c3ec358",
                      "name": "Custom events data grouped by time bucket",
                      "originalRequest": {
                        "method": "GET",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          },
                          {
                            "description": "Added as a part of security scheme: apikey",
                            "key": "X-Api-Key",
                            "value": "<API Key>"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/v1/log/custom-events?pid=<string>&timeBucket=month&period=4w&from=<date>&to=<date>&timezone=Etc/GMT&customEvents=<string>",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "log",
                            "custom-events"
                          ],
                          "query": [
                            {
                              "description": "(Required) Project ID",
                              "key": "pid",
                              "value": "<string>"
                            },
                            {
                              "description": "(Required) Time bucket for data aggregation",
                              "key": "timeBucket",
                              "value": "month"
                            },
                            {
                              "description": "(Required) Time period for the query",
                              "key": "period",
                              "value": "4w"
                            },
                            {
                              "description": "Custom range start date (YYYY-MM-DD)",
                              "key": "from",
                              "value": "<date>"
                            },
                            {
                              "description": "Custom range end date (YYYY-MM-DD)",
                              "key": "to",
                              "value": "<date>"
                            },
                            {
                              "description": "IANA timezone name (default Etc/GMT)",
                              "key": "timezone",
                              "value": "Etc/GMT"
                            },
                            {
                              "description": "(Required) JSON array of custom event names to query",
                              "key": "customEvents",
                              "value": "<string>"
                            }
                          ]
                        }
                      },
                      "status": "OK",
                      "code": 200,
                      "_postman_previewlanguage": "json",
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "cookie": [],
                      "responseTime": null,
                      "body": "{}",
                      "createdAt": "2026-07-28T03:06:34.000Z",
                      "updatedAt": "2026-07-28T03:06:34.000Z",
                      "uid": "35240-40902a9d-4e9d-49b0-b269-7eaf0c3ec358"
                    },
                    {
                      "id": "baa2e396-27d2-4aff-b23f-209734abf148",
                      "name": "Unauthorized - missing or invalid API key",
                      "originalRequest": {
                        "method": "GET",
                        "header": [
                          {
                            "key": "Accept",
                            "value": "application/json"
                          },
                          {
                            "description": "Added as a part of security scheme: apikey",
                            "key": "X-Api-Key",
                            "value": "<API Key>"
                          }
                        ],
                        "url": {
                          "raw": "{{baseUrl}}/v1/log/custom-events?pid=<string>&timeBucket=month&period=4w&from=<date>&to=<date>&timezone=Etc/GMT&customEvents=<string>",
                          "host": [
                            "{{baseUrl}}"
                          ],
                          "path": [
                            "v1",
                            "log",
                            "custom-events"
                          ],
                          "query": [
                            {
                              "description": "(Required) Project ID",
                              "key": "pid",
                              "value": "<string>"
                            },
                            {
                              "description": "(Required) Time bucket for data aggregation",
                              "key": "timeBucket",
                              "value": "month"
                            },
                            {
                              "description": "(Required) Time period for the query",
                              "key": "period",
                              "value": "4w"
                            },
                            {
                              "description": "Custom range start date (YYYY-MM-DD)",
                              "key": "from",
                              "value": "<date>"
                            },
                            {
                              "description": "Custom range end date (YYYY-MM-DD)",
                              "key": "to",
                              "value": "<date>"
                            },
                            {
                              "description": "IANA timezone name (default Etc/GMT)",
                              "key": "timezone",
                              "value": "Etc/GMT"
                            },
                            {
                              "description": "(Required) JSON array of custom event names to query",
                              "key": "customEvents",
                              "value": "<string>"
                            }
                          ]
                        }
                      },
                      "status": "Unauthorized",
                      "code": 401,
                      "_postman_previewlanguage": "json",
                      "header": [
                        {
                          "key": "Content-Type",
                          "value": "application/json"
                        }
                      ],
                      "cookie": [],
                      "responseTime": null,
                      "body": "{\n  \"message\": \"<string>\"\n}",
                      "createdAt": "2026-07-28T03:06:34.000Z",
                      "updatedAt": "2026-07-28T03:06:34.000Z",
                      "uid": "35240-baa2e396-27d2-4aff-b23f-209734abf148"
                    }
                  ],
                  "createdAt": "2026-07-28T03:06:34.000Z",
                  "updatedAt": "2026-07-28T03:06:34.000Z",
                  "uid": "35240-22124701-6daf-4e2d-b755-e4be2a9bec2d"
                }
              ],
              "id": "74df8c3d-544d-4b6b-9843-8ffdcae6e846",
              "createdAt": "2026-07-28T03:06:34.000Z",
              "updatedAt": "2026-07-28T03:06:34.000Z",
              "uid": "35240-74df8c3d-544d-4b6b-9843-8ffdcae6e846"
            }
          ],
          "id": "917c86c5-8978-4e55-b3be-709e1a7f741f",
          "createdAt": "2026-07-28T03:06:34.000Z",
          "updatedAt": "2026-07-28T03:06:34.000Z",
          "uid": "35240-917c86c5-8978-4e55-b3be-709e1a7f741f"
        }
      ],
      "id": "dcb2786a-00b0-4b8e-a60b-c424729b4b7d",
      "createdAt": "2026-07-28T03:06:34.000Z",
      "updatedAt": "2026-07-28T03:06:34.000Z",
      "uid": "35240-dcb2786a-00b0-4b8e-a60b-c424729b4b7d"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-Api-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.swetrix.com"
    }
  ]
}