> This page is for Developer.

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

# Generate Upload Signature

POST https://api.bigcommerce.com/stores/{store_hash}/v3/infrastructure/deployments/uploads
Content-Type: application/json

Generates a pre-signed upload URL for uploading deployment artifacts. Use the returned `upload_url` to upload your deployment package, then pass the `upload_uuid` when creating a deployment.

Send an empty JSON object (`{}`) as the request body. Omitting the body returns a `400 Bad Request` response.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/infrastructure-hosting/deployments/generate-upload-signature

## Authentication

- `X-Auth-Token` header (required) — ### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Infrastructure Deployments | read-only | `store_infrastructure_deployments_read_only` | | Infrastructure Deployments | create preview | `store_infrastructure_deployments_create_preview` | | Infrastructure Deployments | manage | `store_infrastructure_deployments_manage` | | Infrastructure Projects | read-only | `store_infrastructure_projects_read_only` | | Infrastructure Projects | manage | `store_infrastructure_projects_manage` | | Infrastructure Logs | read-only | `store_infrastructure_logs_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

## Request

### Path parameters

- `store_hash` (string, required) — Permanent ID of the BigCommerce store.

## Response

### 200

The upload signature was generated successfully.

- `data` (UploadSignatureResponse, optional)
- `meta` (EmptyMeta, optional) — Empty meta object.

## Types

### UploadSignatureResponse

- `upload_url` (string, optional) — The pre-signed URL to upload the deployment artifact to.
- `upload_uuid` (string, optional) — The UUID identifying this upload. Pass this value when creating a deployment.

### EmptyMeta

Empty meta object.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "upload_url": "https://storage.googleapis.com/bigcommerce-production-ignition-gcs-bucket-platform/0000000000/0194fd2b-2ac6-72de-b73f-d83f2d626a74/bundle.zip?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=example%40bigcommerce-production.iam.gserviceaccount.com%2F20240615%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20240615T103000Z&X-Goog-Expires=59&X-Goog-Signature=example-signature&X-Goog-SignedHeaders=content-type%3Bhost",
    "upload_uuid": "0194fd2b-2ac6-72de-b73f-d83f2d626a74"
  },
  "meta": {}
}
```

**SDK Code**

```python Generate an upload signature
import requests

url = "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads"

payload = {}
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Generate an upload signature
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go Generate an upload signature
package main

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

func main() {

	url := "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads"

	payload := strings.NewReader("{}")

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

	req.Header.Add("X-Auth-Token", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Generate an upload signature
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads")

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

request = Net::HTTP::Post.new(url)
request["X-Auth-Token"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

```java Generate an upload signature
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php Generate an upload signature
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Generate an upload signature
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Generate an upload signature
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/deployments/uploads")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```