Try it free

Create a credential entry

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026
  • Early Access

Create a credential entry in the Dynatrace Credential Vault for a username and password, certificate, or token, with its scopes and access settings.

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

Overview

You use this operation to store a new credential entry. The request body sets fields such as name, type, description, scopes, ownerAccessOnly, allowedEntities, and allowContextlessRequests, but never an ID, because Dynatrace assigns it. A 201 response returns the ID of the new entry.

Authentication

To execute this request, you need a platform token or OAuth access token with credential-vault:entries:write scope. To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
bodyCredentials

The JSON body of the request. Contains parameters of the new credential entry.

bodyRequired

Request body objects

The Credentials object

A set of credentials for synthetic monitors.

The actual set of fields depends on the type of credentials. Find the list of actual objects in the description of the type field or see Credential vault API - JSON models.

ElementTypeDescriptionRequired
allowContextlessRequestsboolean

Allow ad-hoc functions to access the credential details (requires the APP_ENGINE scope).

Optional
allowedEntitiesCredentialAccessData[]

The set of entities allowed to use the credential.

Optional
descriptionstring

A short description of the credentials set.

Optional
idstring

The ID of the credentials set.

Optional
namestring

The name of the credentials set.

Required
ownerAccessOnlyboolean

The credentials set is available to every user (false) or to owner only (true).

Optional
scopestring

DEPRECATED

The scope of the credentials set.

The element can hold these values
  • APP_ENGINE
  • EXTENSION
  • EXTENSION_AUTHENTICATION
  • SYNTHETIC
Optional
scopesstring[]

The set of scopes of the credentials set.

Limitations: CredentialsScope.APP_ENGINE is only available on the new Dynatrace SaaS platform - it's not available on managed or non-Grail SaaS environments.

The element can hold these values
  • APP_ENGINE
  • EXTENSION
  • EXTENSION_AUTHENTICATION
  • SYNTHETIC
Required
typestring

Defines the actual set of fields depending on the value. See one of the following objects:

  • CERTIFICATE -> CertificateCredentials
  • PUBLIC_CERTIFICATE -> PublicCertificateCredentials
  • USERNAME_PASSWORD -> UserPasswordCredentials
  • TOKEN -> TokenCredentials
  • SNMPV3 -> SNMPV3Credentials
  • AWS_MONITORING_KEY_BASED -> AWSKeyBasedCredentialsDto
  • AWS_MONITORING_ROLE_BASED -> AWSRoleBasedCredentials
The element can hold these values
  • AWS_MONITORING_KEY_BASED
  • AWS_MONITORING_ROLE_BASED
  • CERTIFICATE
  • PUBLIC_CERTIFICATE
  • SNMPV3
  • TOKEN
  • USERNAME_PASSWORD
Required

The CredentialAccessData object

The set of entities allowed to use the credential.

ElementTypeDescriptionRequired
idstring-Optional
typestring-
The element can hold these values
  • APPLICATION
  • UNKNOWN
  • 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.

{
"allowContextlessRequests": "false",
"allowedEntities": [
{
"id": "jane.doe@example.com",
"type": "USER"
},
{
"id": "john.smith@example.com",
"type": "USER"
},
{
"id": "my.with.credentials",
"type": "APPLICATION"
}
],
"description": "Sample set of credentials for API documentation",
"name": "Sample credentials",
"ownerAccessOnly": false,
"password": "1234abcd",
"scope": "SYNTHETIC",
"scopes": [
"SYNTHETIC",
"EXTENSION_AUTHENTICATION"
],
"type": "USERNAME_PASSWORD",
"user": "john.smith@example.com"
}

Response

Response codes

CodeTypeDescription
201CredentialsId

Success. The new credential entry has been created. The response contains the ID of the entry.

4XXErrorResponseEnvelope

Client side error.

5XXErrorResponseEnvelope

Server side error.

Response body objects

The CredentialsId object

A short representation of the credentials set.

ElementTypeDescription
idstring

The ID of the credentials set.

The ErrorResponseEnvelope object

Encloses the encountered error.

ElementTypeDescription
errorErrorResponse

Basic information of the encountered error.

The ErrorResponse object

Basic information of the encountered error.

ElementTypeDescription
codeinteger

The returned HTTP status code.

detailsErrorResponseDetails

Detailed information of the error.

messagestring

Description of the encountered error.

The ErrorResponseDetails object

Detailed information of the error.

ElementTypeDescription
typestring

Defines the actual set of fields depending on the value. See one of the following objects:

  • constraintViolation -> ConstraintViolationDetails
The element can hold these values
  • constraintViolation

Response body JSON models

{
"id": "CREDENTIALS_VAULT-C43F2C2E6395AD23"
}
{
"error": {
"code": 1,
"details": {
"type": "constraintViolation"
},
"message": "string"
}
}
Related tags
Platform APIDynatrace Platform