Try it free

Create an ActiveGate token

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Create an ActiveGate token in Dynatrace with the Fleet Management API with a name, expiration date, and seed token option; the response contains its secret.

POSTSaaShttps://{your-environment-id}.apps.dynatrace.com/v1/activegate/tokens

Overview

You use this operation to create an ActiveGate token. The request body sets its name, expirationDate, and seedToken fields, and the new token is owned by the user who calls the API. A 201 response contains the token secret, which you can't retrieve again later, so store it securely right away.

Authentication

To execute this request, you need a platform token or OAuth access token with one of the following scopes:

  • fleet-management:activegate.tokens:create
  • fleet-management:activegate.tokens:write

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyActiveGateTokenCreate

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

bodyRequired

Request body objects

The ActiveGateTokenCreate object

Parameters of a new ActiveGate token.

ElementTypeDescriptionRequired
expirationDatestring

The expiration date of the token.

You can use one of the following formats:

  • Timestamp in UTC milliseconds.
  • Human-readable format of 2021-01-25T05:57:01.123+01:00. If no time zone is specified, UTC is used. You can use a space character instead of the T. Seconds and fractions of a second are optional.
  • Relative timeframe, back from now. The format is now-NU/A, where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU. Supported time units for the relative timeframe are:
    • m: minutes
    • h: hours
    • d: days
    • w: weeks
    • M: months
    • y: years

If not set, the token never expires.

Ensure that it's not set in the past and doesn't exceed 2 years from the moment of creation.

Optional
namestring

The name of the token.

Required
seedTokenboolean

The token is a seed token (true) or an individual token (false).

We recommend the individual token option (false).

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.

{
"expirationDate": "now+6M",
"name": "myToken",
"seedToken": false
}

Response

Response codes

CodeTypeDescription
201ActiveGateTokenCreated

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

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The ActiveGateTokenCreated object

The newly created ActiveGate token.

ElementTypeDescription
expirationDatestring

The token expiration date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').

idstring

The ActiveGate token identifier, consisting of the prefix and public parts of the token.

seedTokenboolean

The token is a seed token (true) or an individual token (false).

tokenstring

The secret of the token. Make sure to copy it-—-you won't be able to retrieve it again.

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"expirationDate": "2020-11-24T08:15:30.144Z",
"id": "dt0g02.4KWZO5EF",
"seedToken": false,
"token": "dt0g02.4KWZO5EF.XT47R5DRADJIZUFOX4UDNOKTSUSABGLN7XSMJG7UXHRXKNY4WLORH4OF4T75MG7E"
}
{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}
Related tags
Platform APIDynatrace Platform