> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.yunojuno.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.yunojuno.com/_mcp/server.

# Complete a file upload

POST https://api.yunojuno.com/file_uploads/{api_file_upload_id}/complete/

Confirm a previously requested file upload has completed.

Mark a previously requested file upload as complete once the object is present in S3. This validates the uploaded file exists and makes it available for downstream processing (e.g. bulk project upsert).

Reference: https://docs.yunojuno.com/client-api/file-uploads/complete-create

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `api_file_upload_id` (string, required)

## Response

### 200

- `data` (APIFileUpload, required) — The API file upload object. This object represents a file that has been uploaded via the Public API. Files can be used for various purposes such as bulk data imports.

## Types

### APIFileUpload

The API file upload object. This object represents a file that has been uploaded via the Public API. Files can be used for various purposes such as bulk data imports.

- `api_file_upload_id` (string, required)
- `purpose` (string, required)
- `filename` (string, required)
- `mime_type` (string, required)
- `state` (string, required)
- `upload_url` (string, required, nullable) — Return the pre-signed S3 upload URL for the file. If the object is awaiting upload, it will generate a presigned S3 URL with short expiry allowing the client to start the upload within that time period. If the object is not awaiting upload, it will return nothing as the upload has occurred already.

## Examples

**Response**

```json
{
  "data": {
    "api_file_upload_id": "string",
    "purpose": "string",
    "filename": "string",
    "mime_type": "string",
    "state": "string",
    "upload_url": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.yunojuno.com/file_uploads/api_file_upload_id/complete/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```