> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifygtm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unify Analytics API

> Send website and product analytics data into the Unify platform.

## Overview

The Analytics API allows you to send both client-side and server-side events
into Unify. There are three types of events you can send:

* [Page events](/developers/api/analytics/page) capture page visits on your website or web application
* [Custom events](/developers/api/analytics/custom) capture actions or other custom activities that you define
* [Identify events](/developers/api/analytics/identify) capture visitor identity information (e.g., their email address)

These event types form the building blocks to track visitor behavior and actions
on your marketing website, web application, or other custom software.

## Usage

### Request format

The base URL of all API requests to the Analytics API is:

```shell theme={null}
https://api.unifyintent.com/analytics/v1
```

Note that the base URL uses a different domain than other Unify APIs.

### Authentication

<Danger>
  When sending requests to the Analytics API from client devices, you should use
  your **write key** rather than an API key. Write keys are safe to expose
  publicly whereas API keys are not.

  To prevent exposure of sensitive API keys, if you send a request to
  the Analytics API that contains an API key by accident, Unify will immediately
  expire the key as a precautionary measure.
</Danger>

Write keys are used to authenticate requests to the Analytics API. You can find
your write key in Unify by navigating to
[Settings → Web & product data → Settings](https://app.unifygtm.com/dashboard/settings/data/web-intent?webEventsTab=Settings).

To authenticate a request, include the following header in your request:

```http theme={null}
X-Write-Key: <token>
```

Replace `<token>` with your Unify write key.

### Request origin

Requests that use a write key must include an allowed `Origin` header. This
applies to requests sent from both browsers and from server-side code. For
server-side requests, set `Origin` to the website or application origin
associated with the event source.

### Rate limits

The Analytics API is rate-limited by default to 100,000 requests per five minute
window. We are able to provide higher limits upon request if needed.

### OpenAPI specification

The OpenAPI specification can be found [here](https://api.unifyintent.com/analytics/v1/openapi.json).
