--- title: "Update File Field" slug: "update-file-field" updated: 2025-08-29T22:55:48Z published: 2025-08-29T22:55:48Z canonical: "docs.team-tracks.com/update-file-field" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.team-tracks.com/llms.txt > Use this file to discover all available pages before exploring further. # Update File Field The 'update file field' API endpoint is used to update one file field on an object using a TeamTracks Edit view. This is a POST request where the object values are passed as form-data in the request body. The API returns '200 OK' when successful. ## Update File Field The following POST endpoint uploads a file to a file field on an object based on a specific edit view: ```plaintext https://api.team-tracks.com/object/{viewId}/{objectId}/upload?fieldId={fieldId} ``` This endpoint requires the id of an **edit view** in the system and the id of the object to be updated. Unlike updating an object, the file to be uploaded is passed as multipart/form-data. The call should include the below headers. ```plaintext Authorization: "Bearer " tenant: Ocp-Apim-Subscription-Key: ``` ### Arguments The following arguments are supported by the endpoint: | **Argument** | **Values** | Description | | --- | --- | --- | | **lookupObjectByName** | true/false | If set to true, you can use the Object Name for {objectId}. Object name is the field value corresponding to the ID Field of the object. Default is false. | | **lookupFieldByName** | true/false | If set to true, you can use the Field Name for {fieldId}. Field Name is the actual name of the field. Default is false. | #### Example URL when using arguments ```plaintext 'https://api.team-tracks.com/object/2a884c8c-cfc3-441f-b4a7-6748f073bdfa/RMA12345/upload?fieldId=RepairQuote&lookupObjectByName=true&lookupFieldByName=true' ``` #### Full curl ```plaintext curl --location 'https://api.team-tracks.com/object/{viewId}/RMA12345/upload?fieldId=RepairQuote&lookupObjectByName=true&lookupFieldByName=true' \ --header 'tenant: ' \ --header 'Ocp-Apim-Subscription-Key: ' \ --header 'Authorization: Bearer ' \ --form 'file=@"/pathto/file.pdf"' ```