curl --request POST \
  --url https://api.turnkey.com/public/v1/query/whoami \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header "X-Stamp: <string> (see Authorizations)" \
  --data '{
    "organizationId": "<string>"
}'
{
  "organizationId": "<string>",
  "organizationName": "<string>",
  "userId": "<string>",
  "username": "<string>"
}
POST
/
public
/
v1
/
query
/
whoami

Authorizations

X-Stamp
string
required
Cryptographically signed (stamped) request to be passed in as a header. For more info, see here.

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: <string> (see Authorizations)" \
  --data '{
    "organizationId": "<string>"
}'
{
  "organizationId": "<string>",
  "organizationName": "<string>",
  "userId": "<string>",
  "username": "<string>"
}