UiPath Documentation
data-service
latest
false
  • OpenAPI

Data Service API guide

Last updated May 7, 2026

Upload file to record field

Uploads a file to the specified field of an existing entity record.

API endpoint

POST BaseURL/Attachment/<Entity>/{recordId}/{fieldName}

  • Depending on the cloud platform you are using, use the associated Base URL.

Request headers

HeaderValue
AuthorizationBearer <access_token>
Content-Typemultipart/form-data
Note:

Replace all the values between the angle brackets <...> with their corresponding use-case values.

The <access_token> is the one you received when you authorized the external application. It is available for 1 hour, then you need to generate a new one, or request a refresh token.

Path variables

Path variableData typeDescriptionDefault value
recordId (required)stringThe ID of the Data Fabric / Data Service entity's record you want to upload the file to.NA
fieldName (required)stringThe name of the File type field where the record you want to upload to is found. The name must correspond to a valid field, and it is case-sensitive.NA

Query parameters

Query parameterData typeDescriptionDefault value
expansionLevel (optional)int32Specifies the depth of the related records to be retrieved. The value of this parameter can be 1, 2, or 3.2

Request body (required)

The file (binary).

Responses

200 OK

401 Unauthorized

You are not authenticated to access Data Fabric / Data Service. Make sure your Assistant or Robot is connected to a modern folder in your account.

403 Forbidden

You don't have permission to access the entity, field or record or you are using an unsupported robot type. Please contact your administrator for necessary permissions.

  • API endpoint
  • Request headers
  • Path variables
  • Query parameters
  • Request body (required)
  • Responses
  • 200 OK
  • 401 Unauthorized
  • 403 Forbidden

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated