How to use Form Data
Form Data is a feature used to send complex data and files in REST applications. It is mainly used when there is a need to send multiple types of data (such as text, numbers, and files) in a single request, making it easier to integrate with APIs that require data in specific formats.
To create a Form Data, follow these steps:
Create a module of type REST.
Click on "New Operation" and fill in the fields under "General Information" and "Parameters".
The configuration step in the "Request" tab is crucial for Form Data. Click on the "Header" tab.
You’ll notice that Skyone Studio automatically sets the value
application/json
for the "Content-Type" key. Change this value tomultipart/form-data
.
This change ensures that the request is correctly formatted for APIs expecting data in multipart/form-data
format.

Next, in the "Body" tab, the parameters must be sent as named fields with their respective values, which differs from the commonly used standard. This step is essential for Skyone Studio to correctly read and interpret the data.
The format to be used in the “Body” is:
key:value:type:filename
As such:
key: name of the Form Data key.
value: value in text or base64.
type (optional): value type (mime type). Read more in the suggested reading section at the end of the page.
filename (optional): file name, applicable when the value is in base64. APIs that receive this data use the filename to generate the corresponding file.
If you choose to use the filename, you must include the type.
Body example
In a scenario where we would normally send a JSON in the body of requests in Skyone Studio, we would have something like the example below:
{
"file": "base64",
"action": "save",
"user": "549875414515"
}
As I said before, the body in the data form works in a different way where following the steps of the assembly rule we would have something like this:
file: base64
action:save
user:549875414515

Skyone Studio does not process files directly. Any uploaded file must be sent as a Base64-encoded string. This string is then processed by Skyone Studio, making it easier to handle file uploads such as images and documents.
Finish the module creation steps.
Done! You can now use this module in your integration flow.
Suggested reading:
Last updated