Pocketm8
  1. Avatars
Pocketm8
  • Auth
    • User
      • Sign In
      • Reset Password
      • Send SMS Code
      • Verify Code
      • Verify Token
      • Verify Challenge
  • Profile
    • Get Profile
      GET
    • Update Profile
      PATCH
    • Update Email
      PUT
    • Update Phone
      PUT
    • Resend Code
      POST
    • Update Avatar
      POST
    • Verify Code
      POST
  • Users
    • Get Users
      GET
  • Contacts
    • Get Contact
      GET
    • Get Contacts
      GET
  • Tasks
    • Create Task
      POST
    • Delete Task
      DELETE
    • Update Task
      PUT
    • Update Task Status
      POST
    • Get Task
      GET
    • Get Tasks
      GET
  • Relations
    • Task Edit
      GET
    • File Edit
      GET
  • Files
    • Get File
      GET
    • Get Files
      GET
    • Upload File
      POST
    • Delete File
      DELETE
    • Update File
      PATCH
  • Avatars
    • Upload Avatar file
      POST
  • Integrations
    • Matrix
      • Files
        • Link File
        • Unlink File
  1. Avatars

Upload Avatar file

Developing
POST
/avatars
Uploads a new avatar image for the authenticated user. Accepts: 'image/png', 'image/jpeg', 'image/jpg' mime types via multipart/form-data.

Request

Body Params multipart/form-data

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://admin.letschat.ch/api/avatars' \
--form 'userId="03ff4569-0c45-4e28-ab13-4fe8dfebb62f"' \
--form 'file=@""'

Responses

🟢200Success
application/json
Body

Example
{
    "message": "AVATAR_HAS_BEEN_UPLOADED",
    "path": "tmp/tp54tF97KhBKeNFX3SMvdo.jpg",
    "url": "https://s3-zurich.cyberlink.cloud/pocketm8-dev/tmp/tp54tF97KhBKeNFX3SMvdo.jpg"
}
Modified at 2025-05-22 11:26:08
Previous
Update File
Next
Link File
Built with