---
title: "Index user"
method: POST
path: "/api/index/v1/indexuser"
tags: ["Permissions"]
---

# Index user

`POST /api/index/v1/indexuser`

Adds a datasource user or updates an existing user.

## Request body

- IndexUserRequest — Describes the request body of the /indexuser API call
  - `version` integer — Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done.
  - `datasource` string, required — The datasource for which the user is added
  - `user` DatasourceUserDefinition, required — describes a user in the datasource
    - `email` string, required
    - `userId` string — To be supplied if the user id in the datasource is not the email
    - `name` string, required
    - `isActive` boolean — set to false if the user is a former employee or a bot

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `409` — Conflict

---

[API](https://skmtc.dev/gleanwork/apis/glean-indexing-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-indexing-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-indexing-api/revisions/b47bf641faba/schema)
