---
updatedAt: 2026-05-29T17:03:39.000Z
---

# Update a file on a mural

Update a file widget on a mural.

**Authorization scope**: `murals:write`


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "MURAL Public API",
    "description": "MURAL's Public API\n",
    "termsOfService": "https://start.mural.co/developer-beta/terms",
    "contact": {
      "name": "MURAL",
      "email": "m4d@mural.co"
    },
    "version": "1.0.0",
    "x-logo": {
      "url": "https://app.mural.co/static/images/new-logo.svg",
      "href": "https://mural.co"
    }
  },
  "servers": [
    {
      "url": "https://app.mural.co/api/public/{version}",
      "description": "MURAL Public API",
      "variables": {
        "version": {
          "default": "v1",
          "enum": [
            "v1"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Mural Contents"
    }
  ],
  "paths": {
    "/murals/{muralId}/widgets/file/{widgetId}": {
      "patch": {
        "security": [
          {
            "oauth2": [
              "murals:write"
            ]
          }
        ],
        "tags": [
          "Mural Contents"
        ],
        "summary": "Update a file on a mural",
        "description": "Update a file widget on a mural.\n\n**Authorization scope**: `murals:write`\n",
        "operationId": "updateFile",
        "parameters": [
          {
            "$ref": "#/components/parameters/muralId"
          },
          {
            "$ref": "#/components/parameters/widgetId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBodyUpdateFileWidget"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "$ref": "#/components/schemas/FileWidget"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BodyBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/DataResidencyForbidden"
          },
          "404": {
            "description": "The resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/MuralNotFound"
                    },
                    {
                      "$ref": "#/components/schemas/WidgetNotFound"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "code",
                    "mapping": {
                      "MURAL_NOT_FOUND": "#/components/schemas/MuralNotFound",
                      "WIDGET_NOT_FOUND": "#/components/schemas/WidgetNotFound"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.mural.co/api/public/v1/authorization/oauth2",
            "tokenUrl": "https://app.mural.co/api/public/v1/authorization/oauth2/token",
            "refreshUrl": "https://app.mural.co/api/public/v1/authorization/oauth2/token",
            "scopes": {
              "rooms:read": "Read information about rooms (for room members and owners).",
              "rooms:write": "Write information about rooms (for room owners).",
              "users:read": "Read information about users (guests, members, and visitors).",
              "workspaces:write": "Write information about workspaces (for workspace owners)",
              "workspaces:read": "Read information about workspaces (for workspace members and owners).",
              "murals:read": "Read information about murals (for mural members and owners).",
              "murals:write": "Write information about murals (for mural members and owners).",
              "meeting-consents:read": "Read who was asked for consent to record a meeting, and how each of them answered (for attendees of that meeting).",
              "meeting-consents:write": "Register meetings for recording, ask their attendees for consent, and answer on the authenticated user's own behalf.",
              "identity:read": "Read information about currently authenticated user.",
              "templates:read": "Read information about templates.",
              "templates:write": "Write information about templates (for templates owners)"
            }
          }
        }
      }
    },
    "schemas": {
      "Timestamp": {
        "type": "number",
        "description": "Timestamp in milliseconds.",
        "example": 1608060691000
      },
      "UserId": {
        "type": "string",
        "description": "ID of a user.",
        "minLength": 25,
        "maxLength": 27,
        "example": "u1651c4ac9145e4b8497d5982"
      },
      "BaseError": {
        "description": "Thorough details regarding an error response from the API.",
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "description": "Error code",
            "example": "ERROR",
            "type": "string",
            "maxLength": 36
          },
          "message": {
            "description": "Short, human readable, description of the error.",
            "example": "Unknown server error",
            "type": "string"
          }
        }
      },
      "DetailedError": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseError"
          },
          {
            "type": "object",
            "properties": {
              "details": {
                "description": "Error details.",
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "code",
                    "message"
                  ],
                  "properties": {
                    "code": {
                      "description": "Error code",
                      "example": "SUB_ERROR",
                      "type": "string",
                      "maxLength": 36
                    },
                    "message": {
                      "description": "Short, human readable, description of the error.",
                      "example": "Unknown server error",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "BodyBadRequest": {
        "description": "The request body was malformed or had invalid parameters.",
        "allOf": [
          {
            "$ref": "#/components/schemas/DetailedError"
          },
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Request body has invalid parameters.",
                "example": "BODY",
                "enum": [
                  "BODY"
                ]
              }
            }
          }
        ]
      },
      "MuralNotFound": {
        "description": "The requested mural was not found.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseError"
          },
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "MURAL_NOT_FOUND",
                "enum": [
                  "MURAL_NOT_FOUND"
                ]
              },
              "message": {
                "example": "The mural was not found or does not exist."
              }
            }
          }
        ]
      },
      "WidgetId": {
        "type": "string",
        "description": "ID of a widget.",
        "example": "0-1619509853818",
        "readOnly": true,
        "maxLength": 36,
        "minLength": 1
      },
      "WidgetX": {
        "type": "number",
        "description": "The horizontal position of the widget in px. This is the distance from the left of the parent widget, such as an area. If the widget has no parent widget, this is the distance from the left of the mural.",
        "example": 20
      },
      "WidgetY": {
        "type": "number",
        "description": "The vertical position of the widget in px. This is the distance from the top of the parent widget, such as an area. If the widget has no parent widget, this is the distance from the top of the mural.",
        "example": 148
      },
      "WidgetMemberInfo": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/UserId"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the collaborator.",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the collaborator.",
            "example": "Smith"
          }
        }
      },
      "WidgetVisitorInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID of the one-time visitor.",
            "example": "a29e693f-8864-49e8-a4e4-2af582c2e1e2"
          },
          "alias": {
            "type": "string",
            "description": "Alias of the one-time visitor.",
            "example": "Racoon"
          }
        }
      },
      "WidgetHidden": {
        "type": "boolean",
        "description": "If true, the widget is hidden from non-facilitators. Applies only when the widget is in the outline.\n",
        "example": true
      },
      "WidgetHideEditor": {
        "type": "boolean",
        "description": "If true, the name of the collaborator who updated the widget is not recorded (because Private Mode is enabled).",
        "example": true
      },
      "WidgetHideOwner": {
        "type": "boolean",
        "description": "If true, the name of the collaborator who created the widget is not recorded (because Private Mode is enabled).",
        "example": true
      },
      "WidgetInstruction": {
        "type": "string",
        "description": "The instructions for a section of the outline. This text can only be added and modified by a facilitator.",
        "example": "<p>This is a <strong>test</strong> of the <u>instructions</u></p>"
      },
      "WidgetLocked": {
        "type": "boolean",
        "description": "If true, the widget is locked and cannot be updated by a non-facilitator. Any collaborator can unlock a locked widget.",
        "example": true
      },
      "WidgetLockedByFacilitator": {
        "type": "boolean",
        "description": "If true, the widget is locked by a facilitator. Only a facilitator can unlock it.",
        "example": true
      },
      "WidgetParentId": {
        "type": "string",
        "description": "The ID of the area widget that contains the widget.",
        "example": "0-1619509853818"
      },
      "WidgetPresentationIndex": {
        "type": "number",
        "description": "The list order of the widget in the outline.",
        "example": 1
      },
      "BaseWidget": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/WidgetId",
            "description": "The unique ID of the widget."
          },
          "height": {
            "type": "number",
            "description": "The height of the widget in px.",
            "example": 150
          },
          "width": {
            "type": "number",
            "description": "The width of the widget in px.",
            "example": 140
          },
          "x": {
            "$ref": "#/components/schemas/WidgetX"
          },
          "y": {
            "$ref": "#/components/schemas/WidgetY"
          },
          "invisible": {
            "type": "boolean",
            "description": "Indicates whether the widget is invisible, defaults to `false`.",
            "example": false
          },
          "contentEditedOn": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "contentEditedBy": {
            "description": "The collaborator who last edited content on the widget.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WidgetMemberInfo"
              },
              {
                "$ref": "#/components/schemas/WidgetVisitorInfo"
              }
            ]
          },
          "createdOn": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "createdBy": {
            "description": "The collaborator who created the widget.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WidgetMemberInfo"
              },
              {
                "$ref": "#/components/schemas/WidgetVisitorInfo"
              }
            ]
          },
          "updatedOn": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "updatedBy": {
            "description": "The collaborator who last updated the widget.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WidgetMemberInfo"
              },
              {
                "$ref": "#/components/schemas/WidgetVisitorInfo"
              }
            ]
          },
          "rotation": {
            "type": "number",
            "description": "The angle of widget rotation, in degrees.",
            "example": 283.3
          },
          "stackingOrder": {
            "type": "number",
            "description": "The z-index stacking order of the widget.",
            "example": 1
          },
          "hidden": {
            "$ref": "#/components/schemas/WidgetHidden"
          },
          "hideEditor": {
            "$ref": "#/components/schemas/WidgetHideEditor"
          },
          "hideOwner": {
            "$ref": "#/components/schemas/WidgetHideOwner"
          },
          "instruction": {
            "$ref": "#/components/schemas/WidgetInstruction"
          },
          "locked": {
            "$ref": "#/components/schemas/WidgetLocked"
          },
          "lockedByFacilitator": {
            "$ref": "#/components/schemas/WidgetLockedByFacilitator"
          },
          "parentId": {
            "$ref": "#/components/schemas/WidgetParentId"
          },
          "presentationIndex": {
            "$ref": "#/components/schemas/WidgetPresentationIndex"
          },
          "viewLink": {
            "type": "string",
            "format": "uri",
            "example": "https://app.mural.co/t/workspace1234/m/workspace1234/1767630964316?wid=widget1234",
            "description": "A link to open the mural to the widget."
          }
        },
        "required": [
          "id",
          "width",
          "x",
          "y",
          "createdOn",
          "createdBy",
          "rotation",
          "stackingOrder",
          "hidden",
          "hideEditor",
          "hideOwner",
          "locked",
          "lockedByFacilitator",
          "viewLink"
        ]
      },
      "WidgetTitle": {
        "type": "string",
        "description": "The title of the widget in the outline.",
        "example": "What is Lorem Ipsum?"
      },
      "Hyperlink": {
        "type": "string",
        "format": "uri",
        "example": "https://www.google.com",
        "minLength": 0,
        "maxLength": 1024
      },
      "FileWidget": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseWidget"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "file",
                "description": "The type of the widget (`file`).",
                "example": "file"
              },
              "expiresInMinutes": {
                "type": "number",
                "description": "The number of minutes after which the file URL expires.\nMay be null when download restriction is enabled.\n",
                "example": 20,
                "nullable": true
              },
              "link": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Hyperlink"
                  },
                  {
                    "description": "The link to the file widget on a mural."
                  },
                  {
                    "example": "https://mural.co/t/wp58/m/wp58/1627373619303/ceb94fd06c04f70f277ecdad2cec7a19d1fc36fa?wid=0-1628783946497"
                  }
                ]
              },
              "url": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Hyperlink"
                  },
                  {
                    "description": "The download URL of the file. This URL has expiration time.\nMay be null when download restriction is enabled.\n"
                  },
                  {
                    "example": "https://example.com/wPeDQtN0AxyutSERRUV0mLSWnfjeMYTBJ3574QJNxbU.pdf"
                  },
                  {
                    "nullable": true
                  }
                ]
              },
              "scanning": {
                "type": "boolean",
                "description": "Indicates that file was scanned by antivirus.",
                "example": true
              },
              "previewUrl": {
                "type": "string",
                "description": "The URL of the file preview.",
                "example": "https://example.com/image.png"
              },
              "title": {
                "$ref": "#/components/schemas/WidgetTitle"
              }
            },
            "required": [
              "type",
              "scanning",
              "title",
              "url"
            ]
          }
        ]
      },
      "WidgetNotFound": {
        "description": "The requested widget was not found or does not exist.",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseError"
          },
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WIDGET_NOT_FOUND",
                "enum": [
                  "WIDGET_NOT_FOUND"
                ]
              },
              "message": {
                "example": "The widget was not found or does not exist."
              }
            }
          }
        ]
      },
      "WidgetRotation": {
        "type": "number",
        "description": "The angle of widget rotation in degrees.",
        "minimum": 0,
        "exclusiveMaximum": 360,
        "example": 45
      },
      "WidgetFileHeight": {
        "type": "number",
        "description": "The height of the widget in px. This value will be overwritten if the file has a preview from which the final value will be extracted.",
        "example": 150
      },
      "WidgetFileTitle": {
        "type": "string",
        "description": "The title in the file widget and in the outline.",
        "example": "my-file.pdf"
      },
      "WidgetFileWidth": {
        "type": "number",
        "description": "The width of the widget in px. This value will be overwritten if the file has a preview from which the final value will be extracted.",
        "example": 140
      },
      "RequestBodyUpdateFileWidget": {
        "type": "object",
        "properties": {
          "height": {
            "$ref": "#/components/schemas/WidgetFileHeight"
          },
          "hidden": {
            "$ref": "#/components/schemas/WidgetHidden"
          },
          "instruction": {
            "$ref": "#/components/schemas/WidgetInstruction"
          },
          "parentId": {
            "$ref": "#/components/schemas/WidgetParentId"
          },
          "presentationIndex": {
            "$ref": "#/components/schemas/WidgetPresentationIndex"
          },
          "rotation": {
            "$ref": "#/components/schemas/WidgetRotation"
          },
          "title": {
            "$ref": "#/components/schemas/WidgetFileTitle"
          },
          "width": {
            "$ref": "#/components/schemas/WidgetFileWidth"
          },
          "x": {
            "$ref": "#/components/schemas/WidgetX"
          },
          "y": {
            "$ref": "#/components/schemas/WidgetY"
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "No authorization",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/BaseError"
                },
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "enum": [
                        "UNAUTHORIZED",
                        "TOKEN_EXPIRED"
                      ]
                    }
                  }
                }
              ]
            },
            "examples": {
              "authorization": {
                "summary": "No authorization",
                "value": {
                  "code": "UNAUTHORIZED",
                  "message": "You don't have the required permissions to access this endpoint."
                }
              },
              "expiredToken": {
                "summary": "Expired token",
                "value": {
                  "code": "TOKEN_EXPIRED",
                  "message": "Your token has expired. You need to refresh your OAuth token."
                }
              }
            }
          }
        }
      },
      "ServerError": {
        "description": "API error",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/DetailedError"
                },
                {
                  "type": "object",
                  "properties": {
                    "code": {
                      "enum": [
                        "INTERNAL_SERVER_ERROR"
                      ],
                      "example": "INTERNAL_SERVER_ERROR"
                    },
                    "message": {
                      "example": "An unexpected condition was encountered that prevented us from fulfilling the request. Try it again later, please."
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "DataResidencyForbidden": {
        "description": "Access denied",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BaseError"
            },
            "examples": {
              "invalid scope": {
                "$ref": "#/components/examples/invalidScope"
              },
              "unsupportedZone": {
                "$ref": "#/components/examples/unsupportedZone"
              }
            }
          }
        }
      },
      "BodyBadRequest": {
        "description": "Request invalid or malformed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BodyBadRequest"
            }
          }
        }
      }
    },
    "examples": {
      "invalidScope": {
        "summary": "Invalid scope",
        "value": {
          "code": "INVALID_SCOPE",
          "message": "Logged in user does not have the right scope(s) to access this resource."
        }
      },
      "unsupportedZone": {
        "summary": "Unsupported Zone",
        "value": {
          "code": "UNSUPPORTED_ZONE",
          "message": "Due to a data residency configuration made by your admin, this API endpoint is not supported in this workspace."
        }
      }
    },
    "parameters": {
      "muralId": {
        "in": "path",
        "name": "muralId",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "Unique identifier of a mural.\n",
        "example": "workspace1234.1606743986126"
      },
      "widgetId": {
        "in": "path",
        "name": "widgetId",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "Unique identifier of a widget.\n",
        "example": "05e43d68-0a0a-47a8-a958-c08afd57d7bc"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false
  }
}
```