> For the complete documentation index, see [llms.txt](https://documentation.astera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.astera.com/astera-data-stack-v10/api-flow/api-consumption/consume/making-multipart-form-data-api-calls.md).

# Making Multipart/Form-Data API Calls

The multipart format is a way of structuring data in an API request or response that allows files and different content data types to be transmitted together as a single unit.

In Astera API management for the consumption of APIs, the multipart format can be used to simplify the process of uploading or downloading files, or when sending a single request that contains both file data and metadata.

Now, you can consume APIs using an *API Client* that supports multipart content.

### Use Case

For our use case, we will be configuring an *API Connection* object and an *API Client* object. Within the *API Client* object, we will set multipart as the *Input Content-Type*, so that we can upload a file and text field to the server.

1. For our use case, we will be working with a pre-configured *API Connection* object.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F99gK4Q0umSSXzW8S2PIT%2F0.png?alt=media)

The endpoint we intend to hit is the POST HTTP method which is going to allow us to upload files and text fields to the server. Our resource is going to be ‘files’ and we are going to keep our input content-type as Multipart.

It requires us to add a file path of the file we intend to upload and the text string of the text that is going to be uploaded.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F28PzZfdm8vg9X39yvCw3%2F1.png?alt=media)

2. Next, drag and drop an *API Client* object onto the same flow.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FDukXnROIBJXbiSpN9qxL%2F2.png?alt=media)

3. Configure the *API Client* object with the *API Connection.*

The *HTTP Method* will be Post, the *Resource* will be “files” as seen from the API endpoint above.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FkpIcp1ozYb4B4yGSPWNn%2F3.png?alt=media)

4. Select the *Input Content Type* as *multipart/form-data.*

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fvd69JT3gI3iP4Oynf6TM%2F4.png?alt=media)

5. Click *Next* until you reach the *Input Layout* screen.

Here, we will be adding a file that we wish to upload as well as a text string.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FND8IU2MSjBgsPTf75Aju%2F5.png?alt=media)

{% hint style="info" %}
**Note:** This path can be parametrized and mapped from outside as well.
{% endhint %}

6. Click *OK* and run the dataflow.

As you can see in the Job Progress window, our file has been uploaded as part of API request and the text string has also been added to the request payload.

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F3VPrIaYySelLrWuNCp9B%2F6.png?alt=media)

This concludes the document on making Multi-part (consumption) API calls.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://documentation.astera.com/astera-data-stack-v10/api-flow/api-consumption/consume/making-multipart-form-data-api-calls.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
