---
title: "Create a new user or update existing one"
method: PUT
path: "/instanceAdmin/agents/{agentid}"
tags: ["instance admin"]
---

# Create a new user or update existing one

`PUT /instanceAdmin/agents/{agentid}`

This operation is only usable in Private Instances and requires the instance admin role permission. See the
[Get API Tokens](https://developer.data.world/docs/api-getting-started#/step-2-get-the-tokens) documentation
for more information.

## Path parameters

- `agentid` string, required

## Request body

- CreateOrUpdateUserRequest
  - `assignments` UserAssignment[] — Organizations with groups that user should be assigned to. The requester needs to be an admin of the requested organizations.
    - `groups` string[] — Groups in the organization that user should be assigned to
    - `orgAgentId` string, required — Organization that user should be assigned to
  - `credentials` string, required — credentials
  - `displayName` string, required — Human-readable organization or agent name
  - `email` string, required — email

## Response `200`

default response

- SuccessMessageDto
  - `message` string

---

[API](https://skmtc.dev/data/apis/data-world-public-api.md) · [All operations](https://skmtc.dev/data/apis/data-world-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/data/data-world-public-api/revisions/0a0cb1f94dad/schema)
