Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sam-shervin/space7/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Uploads a new profile picture for the currently authenticated user. The request body must be sent as multipart/form-data with a field named avatar. The fetchWithAuth helper automatically omits the Content-Type header when the request body is a FormData instance, allowing the browser or native runtime to set the correct multipart/form-data boundary.

Endpoint

PUT /api/profile/picture
Requires authentication. Requests are made with a Bearer token via the Authorization header.

Request

Send the image as a multipart/form-data upload using a FormData field named avatar.

Body parameters

avatar
object
required
The image file to upload, appended to FormData as the avatar field.

Response

profile_picture
string
URL of the newly uploaded profile picture.

Example

TypeScript
import { updateProfilePicture } from "./api/Profile";

// Provide only the required `uri`; name and type default automatically.
const response = await updateProfilePicture({
  uri: "file:///path/to/photo.jpg",
});

console.log(response.profile_picture); // URL of the new profile picture

// Or supply all fields explicitly.
const response2 = await updateProfilePicture({
  uri: "file:///path/to/photo.png",
  name: "my-avatar.png",
  type: "image/png",
});

Build docs developers (and LLMs) love