⚠️ This documentation pertains to a preview endpoint. This feature is not yet ready for API consumption and may change.
For inquiries or feedback, please contact us at Glean.

Upload images

post/uploadimage

Upload images for various types (profile pic, background, UGC thumnail/content, etc) with additional metadata.

SecurityBearerAuth
Request
query Parameters
cid
string

Content id to differentitate multiple images that can have the same type and datasource e.g. thumnail or image from content of UGC. It can also be empty.

ds
string

A specific datasource for which an image is requested for. The ds may have different meaning for each type and can also be empty for some. For USER, it is empty or datasource the icon is asked for. For UGC, it is the UGC datasource. For ICON, it is datasource instance the icon is asked for.

id
string

ID, if a specific entity/type is requested. The id may have different meaning for each type. For USER, it is user id For UGC, it is the id of the content For ICON, the doctype.

type
string (ImageType)

The type of image requested. Supported values are listed in ImageMetadata.type enum.

Enum: "BACKGROUND" "FEEDBACK" "HEADER" "ICON" "LOGO" "UGC" "USER"
header Parameters
X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

X-Scio-Actas
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

Request Body schema: image/*
required

Content and metadata for the image. Content is in the POST body, metadata is in the URL.

string <binary>
Responses
200

OK

Response Schema: application/json
url
required
string

URL of the uploaded image.

object (ImageMetadata)
400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
Response samples
application/json
{
  • "url": "string",
  • "metadata": {
    • "type": "BACKGROUND",
    • "id": "string",
    • "ds": "string",
    • "cid": "string",
    • "ext": "string"
    }
}