> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload settlement file to secure URL

> Send a file to the secure upload URL received previously

To send your CSV settlement file to Mangopay, use the `UploadUrl` value dynamically returned by [POST Create a Settlement and generate upload URL](/api-reference/settlements/create-settlement) endpoint.

<Warning>
  **Caution – Use settlement file example as template**

  You must follow the [specifications provided here](/api-reference/settlements/settlement-file).

  Use this **Example\_Mangopay\_Settlement\_File.csv** ([click here to download](https://docs.mangopay.com/api-reference/settlements/Example_Mangopay_Settlement_File.csv)), which contains the correct column and row labels and example data for 3 transactions. Remove the example data lines before generating your own file.
</Warning>

You need to send one file per currency, as soon as it becomes available. Read more about [providing settlement files to Mangopay](/guides/echo#send-settlement-files-to-mangopay).

When calling the pre-signed `UploadUrl`:

* Ensure you integrate the full URL (host, path, queries) dynamically as it is unique to each file upload attempt
* Don't include the Authorization header, as the URL is already authenticated in the query strings
* Set the `Content-Type` header to `text/csv` and send the file as a raw binary stream using `data-binary`

Note that the `FileName` used by Mangopay is the one you sent on the [POST Create a Settlement and generate upload URL](/api-reference/settlements/create-settlement) endpoint (with a timestamp automatically appended); the name of the file on your system is only relevant for the `data-binary` stream in this call.

### Path parameters

<ParamField path="UploadUrl" type="string" required>
  The unique URL returned by the [POST Create a Settlement and secure URL](/api-reference/settlements/create-settlement) endpoint.

  **Note:** Use the full dynamic URL including the host, path, and all query parameters. The URL is already authenticated, so this call does not require an Authorization header.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200 - OK" defaultOpen>
    No response body. A 200 response indicates that the file was uploaded successfully.
  </Accordion>
</AccordionGroup>

***

<RequestExample>
  ```bash theme={null}
  curl --request PUT '{UploadUrl}' \
  --header 'Content-Type: text/csv' \
  --data-binary '@/path/to/your-file.csv'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - OK theme={null}
  // No response body
  ```
</ResponseExample>
