Users
Get Current User
/api/users/@meReturns the authenticated user.
Returns: Current User object (the User object plus birthdate and phone).
Update Current User
/api/users/@meUpdate the authenticated user's profile.
JSON Body
| Field | Type | Description |
|---|---|---|
username ? | string | New username (must be unique) |
alias ? | string? | New display name (null to remove) |
avatar ? | string? | null or an empty string removes the avatar, and its current ID keeps it. A new one is uploaded (multipart body): any other value is a 400 |
banner ? | string? | Same as avatar, for the banner |
Multipart Body
Supports file uploads for avatar and banner, along with username and alias as form fields:
| Field | Type | Description |
|---|---|---|
avatar ? | file | Avatar image file (max 10MB) |
banner ? | file | Banner image file (max 10MB) |
remove_avatar ? | string | Set to "true" to remove the avatar |
remove_banner ? | string | Set to "true" to remove the banner |
A new image is uploaded before the profile is saved, and the one it replaces is deleted once it is: if the update fails, the profile keeps its old images.
Returns: Current User object (the User object plus birthdate and phone).
Errors: 400 when a JSON avatar or banner sets an image; 409 with that username is taken when another account has the username; 413 for an image over 10 MB or over your upload limit; 500 when the storage fails.
Storage Buckets
Your own S3-compatible buckets for personal uploads. They work like a space’s buckets: a new bucket starts inactive, and at most one is active, the one new uploads go to. All of these endpoints are human-only, since they handle third-party S3 credentials. Each one except List and Create answers 404 when the bucket doesn’t exist and 403 with not your bucket when it belongs to someone else.
List My Buckets
Create My Bucket
/api/users/@me/bucketsAdd an S3-compatible storage bucket. The API checks that it can reach the bucket with these settings first.
JSON Body
| Field | Type | Description |
|---|---|---|
name | string | Display name for the bucket |
endpoint | string | S3-compatible endpoint URL |
region ? | string | Bucket region (default auto) |
bucket_name | string | Actual bucket name on the provider |
access_key_id | string | S3 access key ID |
secret_access_key | string | S3 secret access key |
use_path_style ? | boolean | Use path-style addressing instead of virtual-hosted |
max_bytes ? | integer? | Maximum total storage in bytes |
upload_limit_bytes ? | integer? | Per-upload size limit in bytes |
Returns: 201 Created with a StorageBucket object.
Errors: 400 with invalid storage configuration: ... when the bucket can't be reached with these settings, or when max_bytes or upload_limit_bytes isn't a positive number.
Update My Bucket
/api/users/@me/buckets/{bucketId}Replace a storage bucket's configuration. Like Create, it checks the bucket can be reached first.
JSON Body
| Field | Type | Description |
|---|---|---|
name | string | Display name |
endpoint | string | S3-compatible endpoint URL |
region ? | string | Bucket region (default auto) |
bucket_name | string | Actual bucket name |
access_key_id | string | S3 access key ID |
secret_access_key ? | string | S3 secret access key (omit to keep the current one) |
use_path_style ? | boolean | Use path-style addressing |
max_bytes ? | integer? | Maximum total storage in bytes |
upload_limit_bytes ? | integer? | Per-upload size limit in bytes |
Returns: StorageBucket object.
Errors: 400 with invalid storage configuration: ... when the bucket can't be reached with these settings, or when max_bytes or upload_limit_bytes isn't a positive number.
Delete My Bucket
/api/users/@me/buckets/{bucketId}Delete one of your storage buckets.
Returns: 204 No Content
Activate My Bucket
/api/users/@me/buckets/{bucketId}/activateMake this bucket the one new uploads go to. Your other buckets are deactivated.
Returns: 204 No Content
Deactivate My Bucket
/api/users/@me/buckets/{bucketId}/deactivateDeactivate a storage bucket. Existing files stay reachable, but new uploads don't use it.
Returns: 204 No Content
Update User Flags & Badges (Staff Only)
/api/internal/users/{userId}/flags-badgesUpdate a user's flags and badges. Requires FlagStaff permission.
| Field | Type | Description |
|---|---|---|
flags ? | integer | New flags bitfield value |
badges ? | integer | New badges bitfield value |
Returns: User object.