---
title: GET /events
slug: content-marketing-platform/api/get-events
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "SnZcjosexwZzS26DP5Sh_",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.cmp.optimizely.com/v3/events",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/events",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "GET /events",
    "description": "<p>Experimental Get a list of events.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "start_date",
          "type": "string",
          "example": "2024-11-24T00:00:00.000Z",
          "description": "<p>ISO date string - filters events with end_date >= start_date</p>"
        },
        {
          "kind": "optional",
          "name": "end_date",
          "type": "string",
          "example": "2024-11-26T00:00:00.000Z",
          "description": "<p>ISO date string - filters events with start_date &#x3C;= end_date</p>"
        },
        {
          "kind": "optional",
          "name": "campaign_id",
          "type": "string",
          "example": "66d953340019d7b86833ac6d",
          "description": "<p>Single campaign ID - filters events by campaign</p>"
        },
        {
          "kind": "optional",
          "name": "offset",
          "type": "integer",
          "example": 5,
          "description": "<p>Starting index of results (zero indexed)</p>",
          "default": 0,
          "minimum": 0
        },
        {
          "kind": "optional",
          "name": "page_size",
          "type": "integer",
          "example": 15,
          "description": "Number of results to return per page",
          "default": 10,
          "minimum": 1,
          "maximum": 100
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "List of fetched events",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "required",
                "type": "array",
                "description": "List of events",
                "modelRef": "#/components/schemas/EventResponse",
                "customType": "EventResponse[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier of the event",
                    "example": "674ea40a7a9cac80ff78c95c"
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "description": "Title of the event",
                    "example": "The awesome event"
                  },
                  {
                    "name": "description",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "Description of the event",
                    "example": "The awesome event's description"
                  },
                  {
                    "name": "campaign_id",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "Unique identifier of the campaign associated with the event",
                    "example": "66d953340019d7b86833ac6dg"
                  },
                  {
                    "name": "start_date",
                    "kind": "required",
                    "type": "string",
                    "description": "Start date of the event in ISO 8601 UTC format",
                    "example": "2024-11-26T11:00:34Z"
                  },
                  {
                    "name": "end_date",
                    "kind": "required",
                    "type": "string",
                    "description": "End date of the event in ISO 8601 UTC format",
                    "example": "2024-11-26T11:30:34Z"
                  },
                  {
                    "name": "is_all_day",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Whether the event is a day long event or not",
                    "example": false
                  },
                  {
                    "name": "is_archived",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Whether the event is archived or not",
                    "example": false
                  },
                  {
                    "name": "created_by",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier of the user who created the event",
                    "example": "66d837c62373533177b59db3"
                  },
                  {
                    "name": "reference_id",
                    "kind": "required",
                    "type": "string",
                    "description": "Reference ID of the event",
                    "example": "EVT-3"
                  },
                  {
                    "name": "links",
                    "kind": "required",
                    "type": "object",
                    "description": "Meta links",
                    "example": "",
                    "schema": [
                      {
                        "name": "self",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the event",
                        "example": "https://api.cmp.optimizely.com/v3/events/674ea40a7a9cac80ff78c95c"
                      },
                      {
                        "name": "campaign",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "URL of the campaign associated with the event",
                        "example": "https://api.cmp.optimizely.com/v3/campaigns/66d953340019d7b86833ac6d"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "pagination",
                "kind": "required",
                "type": "object",
                "description": "",
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "Pagination",
                    "description": "",
                    "modelRef": "#/components/schemas/Pagination",
                    "schema": [
                      {
                        "name": "next",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "URL to the next page",
                        "example": "https://api.cmp.optimizely.com/<some-path-to-next-page>?offset=10&page_size=10"
                      },
                      {
                        "name": "previous",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "URL to the previous page",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "object",
                    "description": "",
                    "schema": [
                      {
                        "name": "next",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "",
                        "example": "https://api.cmp.optimizely.com/v3/events?offset=10&page_size=10"
                      }
                    ]
                  }
                ],
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "DiTlpaQTgSdRZsHVwFNb4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.cmp.optimizely.com/v3/events?offset=5&page_size=10' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "t6Sw56Ei_A-rGUJPzcUZY",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.cmp.optimizely.com/v3/events?offset=5&page_size=10\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5_teeDM2eFdqIUQNu-bU5",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/events?offset=5&page_size=10\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "CZhs5QKkC-PWaM1W2tXXA",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/events?offset=5&page_size=10\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DiTlpaQTgSdRZsHVwFNb4"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// List of fetched events\n{\n  \"data\": [\n    {\n      \"id\": \"674ea40a7a9cac80ff78c95c\",\n      \"title\": \"The awesome event\",\n      \"description\": \"The awesome event's description\",\n      \"campaign_id\": \"66d953340019d7b86833ac6dg\",\n      \"start_date\": \"2024-11-26T11:00:34Z\",\n      \"end_date\": \"2024-11-26T11:30:34Z\",\n      \"is_all_day\": false,\n      \"is_archived\": false,\n      \"created_by\": \"66d837c62373533177b59db3\",\n      \"reference_id\": \"EVT-3\",\n      \"links\": {\n        \"self\": \"https://api.cmp.optimizely.com/v3/events/674ea40a7a9cac80ff78c95c\",\n        \"campaign\": \"https://api.cmp.optimizely.com/v3/campaigns/66d953340019d7b86833ac6d\"\n      }\n    }\n  ],\n  \"pagination\": {}\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}