Skip to content

Read the signed-in user

GET
/v1/id/user-details
curl --request GET \
--url https://your-tenant-host/v1/id/user-details \
--header 'x-edgekit-site-id: site_example' \
--cookie ek.session_token=<ek.session_token>

The caller’s own record and the traits they wrote about themselves. userTraits carries stored values verbatim: an item the organization has since retired is still reported, and no default is substituted, so a client reconciles against GET /v1/id/traits rather than trusting every id to be labellable. The organization-written trait tier is never included.

x-edgekit-site-id
required

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

string
>= 1 characters <= 128 characters

Example

site_example

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

The signed-in user, with their own traits.

Media typeapplication/json
object
id
required
string format: uuid
email
required
string
emailVerified
required
boolean
name
required
string | null
firstName
required
string | null
lastName
required
string | null
image
required
string | null
userTraits
required
object
key
additional properties

Example

{
"id": "01926f3a-8b4c-7d2e-9f10-2a3b4c5d6e7f",
"email": "user@example.com",
"emailVerified": true,
"name": "Ada Lovelace",
"firstName": "Ada",
"lastName": "Lovelace",
"image": null,
"userTraits": {
"job_industry": "01926f3a-8b51-7e99-9aaa-8b9c0d1e2f3a",
"sectors": [
"01926f3a-8b52-7fbb-acc0-9c0d1e2f3a4b"
]
}
}

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Missing or invalid credential.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}