---
title: "Import sessions"
url: https://docs.gleap.ai/en/reference/rest-api/import-session
method: POST
path: "/sessions/importer"
api: "API Reference"
tag: "Session"
operationId: "ImportSession"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Import sessions

`POST https://api.gleap.io/v3/sessions/importer`

Bulk-import sessions (contacts). The body must be `{ "sessions": [...] }`. Every entry is matched against an existing contact before anything is created — by `userId` when the row carries one, otherwise by `email` — so importing the same list twice updates those contacts instead of duplicating them. Returns the ids of the imported sessions.

At most `MAX_IMPORT_SESSIONS_PER_REQUEST` rows per call: a request has to finish well inside the edge's 60s window, and a larger list belongs in a sequence of these calls. Oversized bodies are rejected rather than truncated.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Headers

- `project` (string, required)

## Request body (`application/json`, required)

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/sessions/importer \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

## Responses

### 200 (`application/json`)

Ok

```json
[
  "string"
]
```
