Logo
OpenScaler

Update account profile picture

PATCH
/v1/account/profile

Set or clear the account picture URL. Pass a URL to set it. Pass null or an empty string to clear. Identity fields (email, name, username) are not editable here.

Authorization

bearer_auth
AuthorizationBearer <token>

Authentication

Create an API token on Profile, or with osctl auth login. Send it in the Authorization header:

Authorization: Bearer os1_...

Do not use the Keycloak web-session JWT as an API token. Keep the secret secure and do not share it.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Patch body for account profile. Only picture is supported.

Response Body

application/json

application/json

text/pain

application/json

application/json

curl -X PATCH "https://example.com/v1/account/profile" \  -H "Content-Type: application/json" \  -d '{    "picture": "https://example.com/avatar.png"  }'
{  "id": "0192f0a1-2b3c-7d8e-9f01-23456789abcd",  "username": "jane.doe",  "email": "jane@example.com",  "first_name": "Jane",  "last_name": "Doe",  "picture": "https://lh3.googleusercontent.com/a/example",  "trial": {    "level": 1,    "is_trial_exempt": false,    "voucher": {      "redeemed_at": "2024-04-15T14:54:31.486Z",      "redeem_by": "2024-04-25T14:54:31.486Z",      "duration_days": 30,      "trial_expires_at": "2024-05-15T14:54:31.486Z",      "days_remaining": 12,      "trial_expired": false    }  }}
{  "errors": [    {      "message": "'vcpus' field must be an integer",      "field": "resource_id"    }  ]}
"Access denied"
{  "errors": [    {      "message": "User not initialized. Send POST /v1/init, then retry the request."    }  ]}
{  "errors": [    {      "message": "VM with ID 23 not found"    }  ]}