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()
user = client.me().user
curl "$SKOPIK_API_BASE/users/me" \
-H "Authorization: Bearer $SKOPIK_API_KEY"
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' },
})
user = client.http.patch("/users/me", body={"display_name": "Jordan Lee"}).user
curl "$SKOPIK_API_BASE/users/me" \
-X PATCH \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "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' },
})
with open("avatar.png", "rb") as f:
client.http.post(
"/users/me/avatar",
body=f.read(),
headers={"content-type": "image/png"},
)
curl "$SKOPIK_API_BASE/users/me/avatar" \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "Content-Type: image/png" \
--data-binary @avatar.png
Returns { user: User } — see User.
http.delete('/users/me')
Delete the current user account.
await client.http.delete('/users/me')
client.http.delete("/users/me")
curl "$SKOPIK_API_BASE/users/me" \
-X DELETE \
-H "Authorization: Bearer $SKOPIK_API_KEY"
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')
client.http.delete("/users/me/membership")
curl "$SKOPIK_API_BASE/users/me/membership" \
-X DELETE \
-H "Authorization: Bearer $SKOPIK_API_KEY"
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',
)
remote_config = client.http.get("/users/me/remote-config").remote_config
curl "$SKOPIK_API_BASE/users/me/remote-config" \
-H "Authorization: Bearer $SKOPIK_API_KEY"
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 } },
)
remote_config = client.http.put(
"/users/me/remote-config",
body={"default_runtime_id": remote.remote_id},
).remote_config
curl "$SKOPIK_API_BASE/users/me/remote-config" \
-X PUT \
-H "Authorization: Bearer $SKOPIK_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"default_runtime_id\": \"$REMOTE_ID\"
}"
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. |