Users
User lookup.
Methods on this page are called through client.users.
client.users.get
client.users.get(options?: UsersGetOptions, requestOptions?: RequestOptions): Promise<UserResponseShape>Retrieves a specific user by their UUID. This endpoint only accepts user IDs - for email-based lookup, use GET /v1/users/email/{email}. For getting your own profile, use GET /v1/users/me.
HTTP: GET /v1/users/{id}
Parameters
| Parameter | Type | Description |
|---|---|---|
options | UsersGetOptions optional | Exactly one of id or email. |
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<UserResponseShape>
Example
Example 1:
const userById = await client.users.get({ id: "your-user-id" });
console.log(userById.email);Example 2:
const userByEmail = await client.users.get({ email: "[email protected]" });
console.log(userByEmail.userId);client.users.me
client.users.me(requestOptions?: RequestOptions): Promise<UserResponseShape>Retrieves the authenticated user's profile information including email, display name, and creation time. This endpoint does not require any parameters as it automatically returns the caller's information.
HTTP: GET /v1/users/me
Parameters
| Parameter | Type | Description |
|---|---|---|
requestOptions | RequestOptions optional | Per-call signal, timeout, or headers. |
Returns: Promise<UserResponseShape>
Example
const me = await client.users.me();
console.log(me.email, me.userId);Data Models
Interfaces
UserResponse
User information response
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | yes | The UUID of the user |
email | string | yes | The user's email address |
displayName | string | yes | The user's display name |
username | string | null | no | The user's username (optional) |
createdAt | number | yes | Timestamp when the user was created (milliseconds since epoch) |
updatedAt | number | yes | Timestamp when the user was last updated (milliseconds since epoch) |
Response Shapes
Response shape types model values returned by the SDK after forward-compatible unknown enum strings are coerced to null.
UserResponseShape
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | yes | The UUID of the user |
email | string | yes | The user's email address |
displayName | string | yes | The user's display name |
username | string | null | no | The user's username (optional) |
createdAt | number | yes | Timestamp when the user was created (milliseconds since epoch) |
updatedAt | number | yes | Timestamp when the user was last updated (milliseconds since epoch) |