Service user management API - POST a new service user

  • Latest Dynatrace
  • Reference
  • Published Dec 04, 2025

Creates a new service user in your Dynatrace account.

The request consumes and produces an application/json payload.

POST

https://api.dynatrace.com/iam/v1/accounts/{accountUuid}/service-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 OAuth clients.

Parameters

ParameterTypeDescriptionInRequired
accountUuidstring

The ID of the required account.

You can find the UUID on the Account Management > Identity & access management > OAuth clients page, during creation of an OAuth client.

pathRequired
bodyServiceUserDto

The JSON body of the request. Contains the name of the new service user.

bodyRequired

Request body objects

The ServiceUserDto object

ElementTypeDescriptionRequired
namestring

The name of the new service user

Required
descriptionstring

The description of the new service user

Optional

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.

{
"name": "string",
"description": "string"
}

Response

Response codes

CodeTypeDescription
201ExternalServiceUserWithGroupUuidDto

Success. The new service user has been created. The response contains service user details.

Response body objects

The ExternalServiceUserWithGroupUuidDto object

ElementTypeDescription
uidstring

UUID of service user

emailstring

Email of service user

namestring

Name of service user

surnamestring

Surname of service user

descriptionstring

The description of the service user

createdAtstring

The date and time when the user was created in 2021-05-01T15:11:00Z format.

groupUuidstring

Uuid of the group which enables assigning policy to service user

Response body JSON models

{
"uid": "string",
"email": "string",
"name": "string",
"surname": "string",
"description": "string",
"createdAt": "string",
"groupUuid": "string"
}

Example

In this example, the request creates a new service user with the name new-service-user, in the account with accountUuid 2b794097-8ad2-4b32-b923-0131da2eeddf.

Curl

curl -X 'POST' \
'https://api.dynatrace.com/iam/v1/accounts/2b794097-8ad2-4b32-b923-0131da2eeddf/service-users' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eywedGciOiJFUzI1NiIsInR7cCI6IkpCDVIsImtpZCI6IjEifQ' \
-H 'Content-Type: application/json' \
-d '{
"name": "new-service-user",
"description": "New user desc"
}'

Request URL

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

Request body

{
"name": "new-service-user",
"description": "New user desc"
}

Response body

[
{
"uid": "e2dbb9d3-1a2b-4cde-9f01-23456789abcd",
"email": "e2dbb9d3-1a2b-4cde-9f01-23456789abcd@service.sso.dynatrace.com",
"name": "New user desc",
"surname": "SERVICE_IDENTITY",
"type": "SERVICE_EXTERNAL",
"userStatus": "ACTIVE",
"description": "",
"createdAt": "2024-10-10T07:44:38Z"
}
]

Response code

201