Skip to main content
POST
/
v1
/
users
/
me
/
update
curl -X POST https://portal-api.7331.org/v1/users/me/update \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"username": "newname", "avatar_source": "discord"}'
{
  "user": {
    "id": 42,
    "username": "newname",
    "avatar_url": "https://cdn.discordapp.com/avatars/123/abc.png",
    "subscription_tier": 0,
    "state": 0,
    "permission_level": 0,
    "subscription_expires_at": null,
    "subscription_granted_by": null,
    "last_activity_at": "2026-03-19T12:00:00Z",
    "permission_since": null,
    "avatar_source": "discord",
    "linked_platforms": [
      {
        "platform": "discord",
        "platform_user_id": "1185865881356615713",
        "platform_username": "niels",
        "platform_avatar_url": "https://cdn.discordapp.com/avatars/123/abc.png",
        "linked_at": "2026-01-01T00:00:00Z",
        "last_authenticated_at": "2026-03-19T10:00:00Z"
      }
    ],
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-03-19T12:00:00Z"
  },
  "errors": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.7331.org/llms.txt

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

Requires an active session cookie. Fields are independent — partial success is possible. If one field fails validation, the other may still succeed.
username
string
New username (3-32 chars: alphanumeric, dots, underscores, hyphens).
avatar_source
string
Avatar source: a platform name (discord, telegram) or a default key (discord_0 through discord_5). Set to empty string "" to clear and fall back to the earliest linked platform.

Response

user
object
required
Updated user profile (same shape as Get Current User response).
errors
object
Per-field errors. null if all fields succeeded. Keys are field names, values are error messages.
curl -X POST https://portal-api.7331.org/v1/users/me/update \
  -H "Content-Type: application/json" \
  -b "psession=YOUR_SESSION" \
  -d '{"username": "newname", "avatar_source": "discord"}'
{
  "user": {
    "id": 42,
    "username": "newname",
    "avatar_url": "https://cdn.discordapp.com/avatars/123/abc.png",
    "subscription_tier": 0,
    "state": 0,
    "permission_level": 0,
    "subscription_expires_at": null,
    "subscription_granted_by": null,
    "last_activity_at": "2026-03-19T12:00:00Z",
    "permission_since": null,
    "avatar_source": "discord",
    "linked_platforms": [
      {
        "platform": "discord",
        "platform_user_id": "1185865881356615713",
        "platform_username": "niels",
        "platform_avatar_url": "https://cdn.discordapp.com/avatars/123/abc.png",
        "linked_at": "2026-01-01T00:00:00Z",
        "last_authenticated_at": "2026-03-19T10:00:00Z"
      }
    ],
    "created_at": "2026-01-01T00:00:00Z",
    "updated_at": "2026-03-19T12:00:00Z"
  },
  "errors": null
}