curl --request POST \
  --url https://api.turnkey.com/public/v1/query/whoami \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <YOUR_API_KEY.YOUR_API_SECRET>" \
  --data '{
    "organizationId": "<string>"
}'
{
  "activity": {
    "id": "<activity-id>",
    "status": "ACTIVITY_STATUS_COMPLETED",
    "type": "ACTIVITY_TYPE_UNKNOWN_V1",
    "organizationId": "<organization-id>",
    "timestampMs": "<timestamp> (e.g., 1745474677464)",
    "result": {
      "organizationId": "<string>",
      "organizationName": "<string>",
      "userId": "<string>",
      "username": "<string>"
    }
  }
}
POST
/
public
/
v1
/
query
/
whoami

Authorizations

X-Stamp
string
header
required

Body

organizationId
string
required

Unique identifier for a given Organization. If the request is being made by a WebAuthN user and their Sub-Organization ID is unknown, this can be the Parent Organization ID; using the Sub-Organization ID when possible is preferred due to performance reasons.

Response

A successful response returns the following fields:

organizationId
string
required
Unique identifier for a given Organization.
organizationName
string
required
Human-readable name for an Organization.
userId
string
required
Unique identifier for a given User.
username
string
required
Human-readable name for a User.
curl --request POST \
  --url https://api.turnkey.com/public/v1/query/whoami \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <YOUR_API_KEY.YOUR_API_SECRET>" \
  --data '{
    "organizationId": "<string>"
}'
{
  "activity": {
    "id": "<activity-id>",
    "status": "ACTIVITY_STATUS_COMPLETED",
    "type": "ACTIVITY_TYPE_UNKNOWN_V1",
    "organizationId": "<organization-id>",
    "timestampMs": "<timestamp> (e.g., 1745474677464)",
    "result": {
      "organizationId": "<string>",
      "organizationName": "<string>",
      "userId": "<string>",
      "username": "<string>"
    }
  }
}