skopik

Users

The current caller can read their identity, update their profile, upload an avatar, leave the current workspace, and manage personal remote preferences.

Quick Links

Action Description
me() Read the current user profile.
http.patch('/users/me') Update the current user profile.
http.post('/users/me/avatar') Upload a profile avatar.
http.delete('/users/me') Delete the current user account.
http.delete('/users/me/membership') Leave the current workspace.
http.get('/users/me/remote-config') Read personal remote configuration.
http.put('/users/me/remote-config') Update personal remote configuration.

Reference

client.me() is the dedicated method for reading your identity. The other operations on this page use client.http — the SDK's escape hatch for endpoints without a dedicated method. It sends requests with the client's auth and base URL, converts camelCase body fields to snake_case on the wire, and converts response fields back to camelCase.

me()

Read the identity of the authenticated caller.

const { user } = await client.me()

Returns { user: User } — see User.

http.patch('/users/me')

Update the current user profile.

const { user } = await client.http.patch<{ user: User }>('/users/me', {
	body: { displayName: 'Jordan Lee' },
})

Parameters

Field Type Required Notes
displayName string No New display name.
firstName string No First name.
lastName string No Last name.
metadata object No Replacement metadata.

Returns { user: User } — see User.

http.post('/users/me/avatar')

Upload a profile avatar. Send the raw media as the request body — the SDK passes binary bodies (Uint8Array, Blob, ArrayBuffer) through as-is with the content-type header you provide. Supported content types are image/png, image/jpeg, image/webp, image/gif, and video/mp4. Maximum size is 1MB.

await client.http.post('/users/me/avatar', {
	body: pngBytes,
	headers: { 'content-type': 'image/png' },
})

Returns { user: User } — see User.

http.delete('/users/me')

Delete the current user account.

await client.http.delete('/users/me')

Returns nothing — resolves when the API confirms deletion (HTTP 204).

http.delete('/users/me/membership')

Leave the current workspace.

await client.http.delete('/users/me/membership')

Returns nothing — resolves when the API confirms removal (HTTP 204).

http.get('/users/me/remote-config')

Read personal remote preferences.

const { remoteConfig } = await client.http.get<{ remoteConfig: RemoteConfig | null }>(
	'/users/me/remote-config',
)

Returns { remoteConfig: RemoteConfig | null }null when no preferences have been saved. See RemoteConfig.

http.put('/users/me/remote-config')

Update personal remote preferences. Point defaultRuntimeId at a remote from remotes.list().

const { remoteConfig } = await client.http.put<{ remoteConfig: RemoteConfig }>(
	'/users/me/remote-config',
	{ body: { defaultRuntimeId: remote.remoteId } },
)

Parameters

Field Type Required Notes
defaultRuntimeId string No Preferred remote id.
enabledProviders string[] No Enabled provider ids.
defaultModelId string No Preferred model id.
settings object No Provider or remote settings.

Returns { remoteConfig: RemoteConfig } — see RemoteConfig.

Types

User

Field Type Notes
userId string User id.
orgId string Active workspace id, when available.
email string User email address.
displayName string Display name.
slug string URL-safe display slug.
firstName string Optional first name.
lastName string Optional last name.
avatarUrl string Optional avatar URL.
emailVerifiedAt string | null ISO timestamp when verified.
metadata object Customer metadata.
status string User status.
deletedAt string | null ISO timestamp when deleted.
createdAt string ISO timestamp.
updatedAt string ISO timestamp.

RemoteConfig

Field Type Notes
target string User or workspace target.
defaultRuntimeId string | null Preferred remote id.
enabledProviders string[] Enabled provider ids.
defaultModelId string | null Preferred model id.
settings object Provider or remote settings.
createdAt string ISO timestamp.
updatedAt string ISO timestamp.