Avatar

Avatars are user-given profile pictures that are included for Users and Collaborators.

Attributes

large

The large size avatar, sized at 100 by 100 pixels.

  • Type: string
  • Default: ""
"https://helixteamhub.cloud/api/attachments/e9090251-17c6-4b1b-b846-ee7693041330?version=large"

medium

The medium size avatar, sized at 60 by 60 pixels.

  • Type: string
  • Default: ""
"https://helixteamhub.cloud/api/attachments/e9090251-17c6-4b1b-b846-ee7693041330?version=medium"

small

The small size avatar, sized at 30 by 30 pixels.

  • Type: string
  • Default: ""
"https://helixteamhub.cloud/api/attachments/e9090251-17c6-4b1b-b846-ee7693041330?version=small"

Request Parameters

content

The content of the image.

  • Type: multipart/form-data or Base64 encoded image
  • Required: true
  • Allowed file formats: png, jpg, gif

name

The image filename.

  • Type: string
  • Required: true with Base64 encoded image, false with multipart/form-data

encoding

The encoding of content.

  • Type: string
  • Required: true with Base64 encoded image, false with multipart/form-data
  • Allowed values: "base64"

Operations

PUT /account/avatar

Updates the avatar. Returns the updated avatar.

Example Request with multipart/form-data

curl -X PUT \
  -H "Accept: application/vnd.hth.v1" \
  -H "Authorization: company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  -F "content=@foo.jpg" \
  https://helixteamhub.cloud/api/account/avatar

Example Request with Base64 encoded image

curl -X PUT \
  -H "Accept: application/vnd.hth.v1" \
  -H "Content-Type: application/json" \
  -H "Authorization: company_key='$COMPANY_KEY',account_key='$ACCOUNT_KEY'" \
  -d '{ "encoding": "base64", "content": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAgA...", "name": "foo.jpg" }' \
  https://helixteamhub.cloud/api/account/avatar

Example Response

{
   "api_status": 200,
   "api_timestamp": "2019-03-08T12:28:08Z",
   "id": "fbd1761a-765a-439c-b2bd-5951540b3761",
   "created_at": "2019-03-08T12:28:08Z",
   "updated_at": "2019-03-08T12:28:08Z",
   "large": "https://helixteamhub.cloud/api/attachments/fbd1761a-765a-439c-b2bd-5951540b3761?version=large",
   "medium": "https://helixteamhub.cloud/api/attachments/fbd1761a-765a-439c-b2bd-5951540b3761?version=medium",
   "small": "https://helixteamhub.cloud/api/attachments/fbd1761a-765a-439c-b2bd-5951540b3761?version=small"
}