Creates a new platform token for a user in your Dynatrace account.
The request consumes and produces an application/json payload.
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.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| accountUuid | string | 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. | path | Required |
| body | Generate | Platform token creation form | body | Required |
GeneratePlatformTokenForm object| Element | Type | Description | Required |
|---|---|---|---|
| name | string | - | Required |
| scope | string[] | - | Required |
| resource | string[] | - | Required |
| tags | string[] | - | Required |
| expirationDate | string | - | Required |
| userUuid | string | - | Required |
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","scope": ["string"],"resource": ["string"],"tags": ["string"],"expirationDate": "string","userUuid": "string"}
| Code | Type | Description |
|---|---|---|
| 200 | Platform | Platform token created successfully |
PlatformTokenSecret object| Element | Type | Description |
|---|---|---|
| name | string | - |
| tokenId | string | - |
| token | string | - |
{"name": "string","tokenId": "string","token": "string"}
In this example, the request creates a new platform token for the account with accountUuid lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89.
curl -X 'POST' \'https://api.dynatrace.com/iam/v1/accounts/lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89/platform-tokens' \-H 'accept: application/json' \-H 'Authorization: Bearer eywedGciOiJFUzI1NiIsInR7cCI6IkpCDVIsImtpZCI6IjEifQ' \-H 'Content-Type: application/json' \-d '{"name": "string","scope": ["scope_1"],"resource": ["resource_1"],"tags": ["tags"],"expirationDate": "2026-03-04T09:51:24.938Z","userUuid": "aactID_1"}'
https://api.dynatrace.com/iam/v1/accounts/lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89/platform-tokens
{"name": "PT_001","scope": ["settings:objects:read"],"resource": ["urn:dtaccount:lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89"],"tags": ["string"],"expirationDate": "2026-03-04T10:17:15.591Z","userUuid": "string"}
{"tokenId": "dt0s34.DEFO9UBH","accountUuid": "lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89","name": "PT_MCP","scope": ["settings:objects:read",],"resource": ["urn:dtaccount:lk4oo10f-0a5t-566f-gn4f-56hy08c4hh89"],"status": "ACTIVE","expirationDate": "2026-12-01T00:00:00Z","createdAt": "2025-06-23T11:10:21Z","updatedAt": "2025-12-23T11:10:21Z","createdBy": "test.abc@dynatrace.com","owner": "test.abc@dynatrace.com","metadata": {"lastUsedAt": null,"lastClientIp": null}},
200