---
title: "Calling the Events API"
slug: "calling-the-events-api"
abstract: "Describes how to call the Sitecore Search Events API."
---
# Calling the Events API

Sitecore Search supports the HTTPS protocol for the Events API. The API accepts requests in the form of JSON objects.

<details>
<summary><h2>API URL and methods</h2></summary>

You can find your personalized Events API URL in Search in the **Developer Resources** section, on the **API Access** tab.

The URL is created using the following structure: `https://discover.sitecorecloud.io/event/<ckey>/v4/publish`. The `ckey` is your customer key, a combination of your Account ID and your Domain ID in the following format: `<accountID>-<domainID>`.

The Events API supports only the POST method.

</details>

<details>
<summary><h2>Authentication</h2></summary>

You must pass an [API key](https://doc.sitecore.com/search/en/developers/search-developer-guide/integrating-using-rest-apis/api-authentication-and-authorization.html "API authentication and authorization") along with your request.

</details>

<details>
<summary><h2>Required keys</h2></summary>

The following table lists the required key for the Events API:

| Key | Type | Description |
| --- | --- | --- |
| `data` | JSON string | JSON representing [the event object](urn:resource:component:958992). |

</details>

<details>
<summary><h2>Examples</h2></summary>

The following is an example of a POST request to the Events API:

```shell
POST /event/{ckey}/v4/publish
{
 "data": "{<event object>}"
}
```

The following is an example of a [page view event](https://doc.sitecore.com/search/en/developers/search-developer-guide/integrating-using-rest-apis/using-the-events-api-to-track-events/funnel-events/creating-an-entity-page-view-event.html "Creating an entity page view event") request to the Events API:

```shell
curl --location --request POST 'https://discover.sitecorecloud.io/event/17595242-159871555/v4/publish' \
--header 'Content-Type: text/plain' \
--header 'Authorization: 01-847028a3-e6593de0a4fd3183cec60650f855982ca00c2720' \
--data-raw '{
    "name": "entity_page",
    "action": "view",
    "client_time_ms": 1660088972963,
    "user_id": "j4y9f17bqqlrqtl36uqfadfadfadf",
    "value": {
      "context": {
        "geo": {
          "ip": "18.233.241.14"
        },
        "browser": {
          "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
        },
        "page": {
          "uri": "https://www.sitecore.com/products/content-cloud"
        }
      },
      "entities": [
        {
          "id": "https___www_sitecore_com_products_content-cloud",
          "uri": "https://www.sitecore.com/products/content-cloud",
          "entity_type": "content"
        }
      ]
    }
}'
```

</details>