---
title: "Upserts a user's profile"
method: PUT
path: "/"
tags: ["Profile"]
---

# Upserts a user's profile

`PUT /`

Updates the profile of the user making the request. If the user does not have a profile, one will be created.
The profile picture and avatar of a user can be unset using this endpoint.

The endpoint accepts a JSON object as body, which allows upserting various fields of the user's profile.
An image from the user's collection can be set a profile picture by sending its datasource and object definition IDs in the body.

The endpoint also accepts a file (image) in binary format as body, which will be uploaded and saved as the user's profile picture.
The Content-Type header has to be set to 'multipart/form-data' when sending a file.

## Headers

- `x-m2-organization-id` string, required

## Request body

- PutProfileRequestSchema — The request body for PUT /profile
  - `username` string — The username of a user. It might have restricted length and characters, based on the organization's settings.
  - `profilePicture` unknown
  - `profilePictureObjectDefinitionId` object, nullable — The datasource ID and object definition ID of the profile picture object. If null, the profile picture will be unset.
    - `datasourceId` string, required
    - `objectDefinitionId` string, required
  - `avatarObjectDefinitionId` object, nullable — The datasource ID and object definition ID of the avatar object. If null, the avatar will be unset.
    - `datasourceId` string, required
    - `objectDefinitionId` string, required

## Response `200`

The user's profile after upserting it.

- PutProfileReplySchema — The user's profile after upserting it.
  - `username` string
  - `profilePictureUrl` string
  - `avatarObjectDefinitionId` object
    - `datasourceId` string, required
    - `objectDefinitionId` string, required

---

[API](https://skmtc.net/otherside/apis/user-profile.md) · [All operations](https://skmtc.net/otherside/apis/user-profile/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/otherside/user-profile/revisions/a38c15dd49ef/schema)
