Change your picture

.md

A new profile picture, sent as base64.

Scopesme:write
POST/v1/me/avatar

Replaces the picture on your profile, here and on the website. Like every upload in this API it is base64 inside JSON. It is cut to a square and stored as WebP, as the website does.

Request

curl -X POST https://api.proppertrading.com/v1/me/avatar \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 1f0e3c2a-7b9d-4e6f-8a1c-3d5b7f9e1a2c" \
  -d '{"data": "iVBORw0KGgoAAAANSUhEUgAA..."}'
FieldTypeDescription
datastringThe file, base64. A JPEG, PNG or WebP of at most 2 MB. The type is read from the bytes

Response

Your profile, with the new avatar_url.

Errors

StatusCodeMeaning
400invalid_avatarNot base64, empty, or not a JPEG, PNG or WebP
400avatar_too_largeOver 2 MB
403insufficient_scopeThis device does not hold me:write
429rate_limit_exceededTen a minute