# 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:

1. Create a module of type **REST**.
2. Click on **"New Operation"** and fill in the fields under **"General Information"** and **"Parameters"**.
3. The configuration step in the **"Request"** tab is crucial for Form Data. Click on the **"Header"** tab.
4. You’ll notice that Skyone Studio automatically sets the value `application/json` for the **"Content-Type"** key. Change this value to `multipart/form-data`.

This change ensures that the request is correctly formatted for APIs expecting data in `multipart/form-data` format.

<figure><img src="/files/ACkQlR7xyXfLPixVHrBl" alt=""><figcaption></figcaption></figure>

5. 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.

{% hint style="warning" %}
If you choose to use the **filename**, you must include the **type**.&#x20;
{% endhint %}

{% hint style="info" %}
You need to add a line break between each key.
{% endhint %}

#### Body example&#x20;

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:

```json
{
  "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
```

{% hint style="info" %}
Skyone Studio does not support JSON in form-data.
{% endhint %}

<figure><img src="/files/fEKpuhESGU65GPsWrTbh" alt=""><figcaption><p>Example of inserting fields in the Body</p></figcaption></figure>

{% hint style="warning" %}
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.
{% endhint %}

6. Finish the module creation steps.
7. Done! You can now use this module in your integration flow.

#### **Suggested reading:**

{% embed url="<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type>" %}

{% embed url="<https://developer.mozilla.org/en-US/docs/Glossary/MIME_type>" %}

{% embed url="<https://www.iana.org/assignments/media-types/media-types.xhtml>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.skyone.cloud/english/skyone-studio/how-to/how-to-use-form-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
