Skip to content

Get current API key

GET
/v2/whoami

Identify the API key making the request and the organization it belongs to. Requires no particular scope.

Successful operation

object
data
required
object
actorType
required

Always apiKey when the request is authenticated with an API key.

string
Example
apiKey
actor
required
object
id
required
string
Example
dnkey-DXALSPQONG7H45QZAVTPRDMAPU
organizationID
required
string
Example
org-F63A24JGCLJV3ZEUTLCBISGETA
createdByUserID

Always an empty string. API keys don’t record who created them.

string
name
required
string
Example
Terraform
createdAt
required
string format: date-time
organization
required
object
id
required
string
Example
org-F63A24JGCLJV3ZEUTLCBISGETA
name
required
string
Example
Example Corp
plan
required

The organization’s plan. Known values are free and pro. New values may be added, so clients should accept values not listed here.

string
createdAt
required
string format: date-time
Example
{
"data": {
"actorType": "apiKey",
"actor": {
"id": "dnkey-DXALSPQONG7H45QZAVTPRDMAPU",
"organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"createdByUserID": "",
"name": "Terraform",
"createdAt": "2025-01-25T18:15:27Z"
},
"organization": {
"id": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"name": "Example Corp",
"plan": "pro",
"createdAt": "2023-02-14T20:34:59Z"
}
}
}

The API key is missing, invalid or expired.

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Example
{
"errors": [
{
"code": "ERR_UNAUTHORIZED",
"message": "unauthorized"
}
]
}

The organization has exceeded its API request rate limit. Retry the request after a short delay.

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Example
{
"errors": [
{
"code": "ERR_TOO_MANY_REQUESTS",
"message": "too many requests"
}
]
}