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

# Create a Project

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

Creates a new infrastructure hosting project. A store can hold a limited number of projects; creating one past that limit returns a `422`.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/admin/management/infrastructure-hosting/projects/create-project

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

### Body (application/json)

This endpoint expects a CreateProjectRequest.

- `name` (string, required) — The name for the new project.

## Response

### 201

The project was created successfully.

- `data` (Project, optional) — An infrastructure hosting project.
- `meta` (EmptyMeta, optional) — Empty meta object.

## Errors

### 409 Conflict Error

A project with this name already exists.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

### 422 Unprocessable Entity Error

The project could not be created because the store has reached the maximum number of projects it is allowed. Delete an unused project before creating a new one. The `title` states the limit.

- `status` (integer, optional) — The HTTP status code.
- `title` (string, optional) — A description of the error.
- `type` (string, optional) — A URL identifying the error type.
- `errors` (ErrorResponseErrors, optional) — Additional error details.
- `meta` (map from string to any, optional) — Additional structured context for the error, such as the ownership-verification TXT record to publish, the conflicting `project_uuid`, or the domain `limit` and `current` count.

## Types

### Project

An infrastructure hosting project.

- `uuid` (string, optional) — The unique identifier for the project.
- `name` (string, optional) — The name of the project.
- `deployment_hostnames` (list of string, optional) — The hostnames the project's deployments are served from. Populated asynchronously after provisioning: this is empty or omitted immediately after a project is created and until its first deployment completes.
- `date_created` (datetime, optional) — The date the project was created, in RFC 3339 format.
- `date_modified` (datetime, optional) — The date the project was last modified, in RFC 3339 format.

### EmptyMeta

Empty meta object.

### ErrorResponseErrors

Additional error details.

## Examples

**Request**

```json
{
  "name": "my-storefront"
}
```

**Response**

```json
{
  "data": {
    "uuid": "019500e2-933d-7057-8e81-090dd7240795",
    "name": "my-storefront",
    "date_created": "2024-06-15T10:30:00Z",
    "date_modified": "2024-06-15T10:30:00Z"
  },
  "meta": {}
}
```

**SDK Code**

```python Create a project
import requests

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

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

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

print(response.json())
```

```javascript Create a project
const url = 'https://api.bigcommerce.com/stores/store_hash/v3/infrastructure/projects';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"name":"my-storefront"}'
};

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

```go Create a project
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"my-storefront\"\n}")

	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 Create a project
require 'uri'
require 'net/http'

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

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 = "{\n  \"name\": \"my-storefront\"\n}"

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

```java Create a project
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/projects")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"my-storefront\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Create a project
using RestSharp;

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

```swift Create a project
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["name": "my-storefront"] 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/projects")! 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()
```