---
title: "Get a token for the visual editor on one engagement"
url: https://docs.gleap.ai/en/reference/rest-api/create-token
method: POST
path: "/engagement/editor/token"
api: "API Reference"
tag: "Engagement Editor"
operationId: "CreateToken"
updatedAt: "2026-11-13T16:00:00.993Z"
language: en
---

# Get a token for the visual editor on one engagement

`POST https://api.gleap.io/v3/engagement/editor/token`

A token for the visual editor bar, which runs on the customer's website and receives its token through that page. It acts as the caller on this one engagement of the project and only on the routes the editor bar calls, for at most eight hours and never longer than the caller's session.

## Authorization

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

## Headers

- `project` (string, required)

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

- `engagementId` (string, required)
- `kind` (enum<string>, required): The editor's engagement routes: `/v3/engagement/<kind>/<id>`. One of: `product-tours`, `cobrowse`, `tooltips`.

## Example request

```bash
curl --request POST \
  --url https://api.gleap.io/v3/engagement/editor/token \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>' \
  --header 'Content-Type: application/json' \
  --data '{
  "engagementId": "<engagementId>",
  "kind": "product-tours"
}'
```

## Responses

### 200 (`application/json`)

Ok

- `token` (string, required)
- `expiresAt` (number<double>, required): Unix seconds.

```json
{
  "token": "string",
  "expiresAt": 0
}
```
