• Home
  • Dynatrace API
  • Account management
  • User management
  • POST a new user

User management API - POST a new user

Creates a new user in your Dynatrace account.

The request consumes an application/json payload.

POST

https://api.dynatrace.com/iam/v1/accounts/{accountUuid}/users

Authentication

To execute this request, you need the Allow write access for identity resources (users and groups) (account-idm-write) scope assigned to your token. To learn how to obtain and use it, see Authentication.

Parameters

ParameterTypeDescriptionInRequired
accountUuidstring

The ID of the required account.

You can find the UUID on the Account > Account management API page, during creation of an OAuth client.

pathrequired
bodyUserEmailDto

The JSON body of the request. Contains the email address of the new user.

bodyrequired

Request body objects

The UserEmailDto object

ElementTypeDescriptionRequired
emailstring

The email address of the user.

required

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

json
{ "email": "string" }

Response

Response codes

CodeDescription
201

Success. The new user has been created. Response doesn't have a body.

Example

In this example, the request creates an account for a user with james.johnson@company.com email address. The response code of 201 indicates that the creation has been successful.

Curl

bash
curl --request POST \ --url 'https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/users' \ --header 'Authorization: Bearer abcdefjhij1234567890' \ --header 'Content-Type: application/json' \ --data '{ "email": "james.johnson@company.com" }'

Request URL

http
https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/users

Request body

json
"email": "james.johnson@company.com"

Response code

201