Zum Hauptinhalt springen

Request a new avatar image upload

POST/users/{userId}/avatar/
v2
POST
user-request-avatar-upload

Request

  • userIdstring
    required

    self or the id of a user.

Responses

application/json

Avatar upload request was successful.

  • refIdstring (uuid)
    required

    The refId to be used to upload your avatar to the /v2/files/:refId route.

  • rulesobject
    required

    Contstraints for the avatar image upload.

    • maxSizeInKBinteger
      required

      Maximum size in kilobytes of the avatar image.

    • mimeTypesarray of string
      required

      List of supported mime types.

      • Array[
      • *string
      • ]
  • propertiesobject
    • imageDimensionsobject

      Supported range of dimensions for the avatar image.

      • maxobject
        • heightinteger
        • widthinteger
      • minobject
        • heightinteger
        • widthinteger

Usage examples

$ curl \
--fail \
--location \
-X POST \
-d '{}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/users/string/avatar