> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Set Asset
> Upload an asset by name. Permissions required: `manage-assets`. Make sure that the workspace's file upload settings are configured as required. The allowed file size and type depend on the file upload settings.
### Changelog
| Version | Description |
| ---------------- | ------------|
|0.69.0 | Added |
## OpenAPI
````json POST /api/v1/assets.setAsset
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Content Management"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Assets"
},
{
"name": "Custom Emoji"
},
{
"name": "Custom Sounds"
},
{
"name": "Custom User Status"
}
],
"paths": {
"/api/v1/assets.setAsset": {
"post": {
"tags": [
"Assets"
],
"summary": "Set Asset",
"description": "Upload an asset by name. Permissions required: `manage-assets`. Make sure that the workspace's file upload settings are configured as required. The allowed file size and type depend on the file upload settings.\n\n### Changelog\n| Version | Description | \n| ---------------- | ------------|\n|0.69.0 | Added |",
"operationId": "post-api-v1-assets.setAsset",
"parameters": [
{
"$ref": "#/components/parameters/Auth-Token"
},
{
"$ref": "#/components/parameters/UserId"
}
],
"requestBody": {
"description": "",
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"asset",
"assetName"
],
"properties": {
"asset": {
"type": "string",
"description": "Upload the file as form-data."
},
"assetName": {
"type": "string",
"description": "Type of asset to upload. The value can be one of the following:\n* `logo`\n* `background`\n* `favicon_ico`\n* `favicon`\n* `favicon_16`\n* `favicon_32`\n* `favicon_192`\n* `favicon_512`\n* `touchicon_180`\n* `touchicon_180_pre`\n* `tile_70`\n* `tile_144`\n* `tile_150`\n* `tile_310_square`\n* `tile_310_wide`\n* `safari_pinned`",
"example": "logo"
},
"refreshAllClients": {
"type": "boolean",
"description": "Set to true if all clients must be refreshed to immediately apply the changes.",
"example": true
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/trueSuccess"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"No asset name": {
"value": {
"success": false,
"error": "Invalid asset"
}
},
"Example 1": {
"value": {
"success": false,
"error": "[No file uploaded]",
"errorType": "No file uploaded"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
}
}
}
}
},
"components": {
"parameters": {
"Auth-Token": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": true,
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
}
},
"responses": {
"trueSuccess": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success": {
"value": {
"success": true
}
}
}
}
}
},
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"success": false,
"error": "You must be logged in to do this."
}
}
}
}
}
}
}
}
}
````