Tokens API v1 - POST a new token

We have a new version of this API—API authentication tokens API. Check it out!

Creates a new Dynatrace API authentication token. The response contains the newly created token.

The new token is owned by the same user who owns the token used to authenticate the call.

The request consumes an application/json payload.

The request produces one of the following payload types:

  • application/json
  • text/plain
  • text/csv

Use the Accept header to set the required response type.

  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/tokens
  • SaaS https://{your-environment-id}
  • Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/v1/tokens


To execute this request, you need the Token management (TenantTokenManagement) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.


Parameter Type Description In Required
body CreateToken

The JSON body of the request. Contains parameters of the new token.

body optional

Body format

The CreateToken object

Element Type Description Required
name string

The name of the token.

expiresIn Duration optional
scopes string[]

The list of scopes to be assigned to the token.

  • InstallerDownload: PaaS integration - Installer download.
  • DataExport: Access problem and event feed, metrics, and topology.
  • PluginUpload: Upload Extension.
  • SupportAlert: PaaS integration - Support alert.
  • DcrumIntegration: Dynatrace module integration - NAM.
  • AdvancedSyntheticIntegration: Dynatrace module integration - Synthetic Classic.
  • ExternalSyntheticIntegration: Create and read synthetic monitors, locations, and nodes.
  • AppMonIntegration: Dynatrace module integration - AppMon.
  • RumBrowserExtension: RUM Browser Extension.
  • LogExport: Read logs.
  • ReadConfig: Read configuration.
  • WriteConfig: Write configuration.
  • DTAQLAccess: User sessions.
  • UserSessionAnonymization: Anonymize user session data for data privacy reasons.
  • DataPrivacy: Change data privacy settings.
  • CaptureRequestData: Capture request data.
  • Davis: Dynatrace module integration - Davis.
  • DssFileManagement: Mobile symbolication file management.
  • RumJavaScriptTagManagement: Real user monitoring JavaScript tag management.
  • TenantTokenManagement: Token management.
  • ActiveGateCertManagement: ActiveGate certificate management.
  • RestRequestForwarding: Fetch data from a remote environment.
  • ReadSyntheticData: Read synthetic monitors, locations, and nodes.
  • DataImport: Data ingest, e.g.: metrics and events.
  • Read audit logs.
  • Read metrics.
  • metrics.write: Write metrics.
  • Read entities.
  • entities.write: Write entities.
  • Read problems.
  • problems.write: Write problems.
  • Read events.
  • events.ingest: Ingest events.
  • Read network zones.
  • networkZones.write: Write network zones.
  • Read ActiveGates.
  • activeGates.write: Write ActiveGates.
  • Read credential vault entries.
  • credentialVault.write: Write credential vault entries.
  • Read extensions.
  • extensions.write: Write extensions.
  • Read extension monitoring configurations.
  • extensionConfigurations.write: Write extension monitoring configurations.
  • Read extension environment configurations.
  • extensionEnvironment.write: Write extension environment configurations.
  • metrics.ingest: Ingest metrics.
  • Read security problems.
  • securityProblems.write: Write security problems.
  • Read synthetic locations.
  • syntheticLocations.write: Write synthetic locations.
  • Read settings.
  • settings.write: Write settings.
  • tenantTokenRotation.write: Tenant token rotation.
  • Read SLO.
  • slo.write: Write SLO.
  • Read releases.
  • Read API tokens.
  • apiTokens.write: Write API tokens.
  • openTelemetryTrace.ingest: Ingest OpenTelemetry traces.
  • Read logs.
  • logs.ingest: Ingest logs.

The Duration object

Defines a period of time.

Element Type Description Required
value integer

The amount of time.

unit string

The unit of time.

If not set, millisecond is used.


Request headers

Accept header value Description
application/json The response contains JSON payload with token.
text/plain The response contains token in plain text format.
accept: text/csv; header=present; charset=utf-8 The response contains token in CSV-format.
accept: text/csv; header=absent; charset=utf-8 The response contains token in CSV-format, preceded by the token heading.


Response codes

Code Description

Success. The token has been created. The response body contains the token itself.


Failed. The input is invalid. Response body provides details.

Response body

The Token object

Element Type Description
token string

Dynatrace API authentication token.


In this example, the request creates a new token named REST example. It is valid for 24 hours and has the following permissions:

  • Access problem and event feed, metrics, and topology
  • Read configuration
  • Write configuration

The Accept header sets the response content type as text/plain.

The response code of 201 indicates that the creation was successful. The response contains the new token as plain text.

The API token is passed in the Authorization header.

You can download or copy the example request body to try it out on your own.


curl -X POST \ \
  -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
  -H 'Content-Type: application/json' \
  -H 'Accept: text/plain'  
  -d '{
  "name": "REST example",
  "scopes": [
  "expiresIn": {
    "value": 24,
    "unit": "HOURS"

Request body

  "name": "REST example",
  "scopes": [
  "expiresIn": {
    "value": 24,
    "unit": "HOURS"

Response body


Response code



The new token looks like this in the Dynatrace interface:

Dynatrace API authentication token - new