---
title: "Send server-side events"
method: POST
path: "/api/v2/prodlytics"
tags: ["Product Analytics"]
---

# Send server-side events

`POST /api/v2/prodlytics`

## Request

- Base URL: `https://browser-intake-datadoghq.com`
- URL: `https://browser-intake-datadoghq.com/api/v2/prodlytics`
- Auth: API key in header `DD-API-KEY`

Send server-side events to Product Analytics. Server-side events are retained for 15 months.

Server-Side events in Product Analytics are helpful for tracking events that occur on the server,
as opposed to client-side events, which are captured by Real User Monitoring (RUM) SDKs.
This allows for a more comprehensive view of the user journey by including actions that happen on the server.
Typical examples could be `checkout.completed` or `payment.processed`.

Ingested server-side events are integrated into Product Analytics to allow users to select and filter
these events in the event picker, similar to how views or actions are handled.

**Requirements:**
- At least one of `usr`, `account`, or `session` must be provided with a valid ID.
- The `application.id` must reference a Product Analytics-enabled application.

**Custom Attributes:**
Any additional fields in the payload are flattened and searchable as facets.
For example, a payload with `{"customer": {"tier": "premium"}}` is searchable with
the syntax `@customer.tier:premium` in Datadog.

The status codes answered by the HTTP API are:
- 202: Accepted: The request has been accepted for processing
- 400: Bad request (likely an issue in the payload formatting)
- 401: Unauthorized (likely a missing API Key)
- 403: Permission issue (likely using an invalid API Key)
- 408: Request Timeout, request should be retried after some time
- 413: Payload too large (batch is above 5MB uncompressed)
- 429: Too Many Requests, request should be retried after some time
- 500: Internal Server Error, the server encountered an unexpected condition that prevented it from fulfilling the request, request should be retried after some time
- 503: Service Unavailable, the server is not ready to handle the request probably because it is overloaded, request should be retried after some time

## Request body

- ProductAnalyticsServerSideEventItem: A Product Analytics server-side event.
  - `account` ProductAnalyticsServerSideEventItemAccount: The account linked to your event.
    - `id` string, required: The account ID used in Datadog.
  - `application` ProductAnalyticsServerSideEventItemApplication, required: The application in which you want to send your events.
    - `id` string, required: The application ID of your application. It can be found in your [application management page](https://app.datadoghq.com/rum/list).
  - `event` ProductAnalyticsServerSideEventItemEvent, required: Fields used for the event.
    - `name` string, required: The name of your event, which is used for search in the same way as view or action names.
  - `session` ProductAnalyticsServerSideEventItemSession: The session linked to your event.
    - `id` string, required: The session ID captured by the SDK.
  - `type` 'server', required: The type of Product Analytics event. Must be `server` for server-side events.
  - `usr` ProductAnalyticsServerSideEventItemUsr: The user linked to your event.
    - `id` string, required: The user ID used in Datadog.

## Response `202`

Request accepted for processing (always 202 empty JSON).

- object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `408`: Request Timeout
- `413`: Payload Too Large
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
