generateLogoUploadUrl
Requires at least one of the permissions settings:appearance:update or settings:tenant:update.
Returns a short-lived URL to upload a logo or favicon image straight to storage, plus the public URL it will have. Only image files are accepted. It saves nothing: set the public URL with updateAppearanceSettings afterwards. Needs settings:appearance:update, or settings:tenant:update.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation GenerateLogoUploadUrl($fileName: String!, $fileType: String!, $logoType: String!) {
generateLogoUploadUrl(
fileName: $fileName
fileType: $fileType
logoType: $logoType
) {
key
publicUrl
uploadUrl
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation GenerateLogoUploadUrl($fileName: String!, $fileType: String!, $logoType: String!) {\n generateLogoUploadUrl(\n fileName: $fileName\n fileType: $fileType\n logoType: $logoType\n ) {\n key\n publicUrl\n uploadUrl\n }\n}",
"variables": {
"fileName": "string",
"fileType": "string",
"logoType": "string"
}
}
EOF
Variables:
{
"fileName": "string",
"fileType": "string",
"logoType": "string"
}
Response:
{
"data": {
"generateLogoUploadUrl": {
"key": "string",
"publicUrl": "string",
"uploadUrl": "string"
}
}
}
generateLogoUploadUrl(
fileName: String!
fileType: String!
logoType: String!
): LogoUploadResponse!
Arguments
generateLogoUploadUrl.fileName ● String! non-null scalar
The image's file name.
generateLogoUploadUrl.fileType ● String! non-null scalar
The image's MIME type: JPEG, PNG, WebP, GIF or SVG.
generateLogoUploadUrl.logoType ● String! non-null scalar
Whether the image is the logo or the favicon.
Type
LogoUploadResponse object
Where to upload a logo.