MeUpdate my profile

Update my profile

Partial update of your own profile: name, username, image (avatar), color, emoji. All fields are optional; null clears (except name). username is globally unique; if it's taken → 409.

curl -X PATCH "https://policy-engine-rest.ezig.workers.dev/api/v1/me/profile" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Doe",
  "username": "ilya",
  "image": "example_string",
  "color": "example_string",
  "emoji": "example_string"
}'
{
  "id": "example_string",
  "email": "user@example.com",
  "role": "example_string",
  "name": "John Doe",
  "username": "John Doe",
  "image": "example_string",
  "color": "#000",
  "emoji": "🦊",
  "createdAt": "2026-07-02T11:25:15.134000Z",
  "updatedAt": "2026-07-02T11:25:15.134000Z"
}
PATCH
/api/v1/me/profile
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Min length: 1
usernamestring

Globally unique; null clears it

imagestring

Link to the avatar; null clears it

colorstring

HEX color; null clears it

emojistring

Emoji icon; null clears it

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Body

application/json
usernamestring

Globally unique; null clears it

Example:
ilya
imagestring

Link to the avatar; null clears it

colorstring

HEX color; null clears it

emojistring

Emoji icon; null clears it

Responses

idstring
Required
emailstring
Required
rolestring
Required
namestring
Required
usernamestring
Required
imagestring
Required

Link to the avatar

colorstring
Required

HEX color

emojistring
Required

Emoji icon

createdAtstring
Required
updatedAtstring
Required