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

POST https://api-b2b.bigcommerce.com/api/v3/io/companies
Content-Type: application/json

Creates a new Company account. This endpoint also creates a Company user account for the administrator of the business.

If you have configured required information fields in your store’s Extra Fields settings for Company accounts or Company users, you must include the field’s name and value in the `extraFields` array of the request body. For more information on extra fields, see [B2B Edition Settings](https://support.bigcommerce.com/s/article/B2B-Edition-Settings) in the Help Center.

After you have created a new Company account, you can configure all of its features and settings by using the [Update a Company](#update-a-company) endpoint.

### Independent vs Dependent Companies Behavior

When [Independent Company behavior](https://support.bigcommerce.com/s/article/Companies-and-Customer-Groups) is enabled on your store, the system will not automatically create a dedicated customer group for each new Company account. Instead, you can assign a customer group to a Company account as needed using the `customerGroupId` field. If the `customerGroupId` field is not included in the request body, the Company account will be assigned to your configured default customer group.

If you have not configured a default customer group or set the value of `customerGroupId` to `0`, the Company account will not be associated with any customer group, and its users will use your storefront’s default catalog visibility and pricing.

If your store is using legacy Dependent Company behavior, a new customer group will be automatically created and associated with each new Company account. In this case, you will not use the `customerGroupId` field.

Reference: https://docs.bigcommerce.com/developer/api-reference/rest/b2b/management/company/companies/post-companies

## Authentication

- `X-Auth-Token` header (required) — | 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). | 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).
- `X-Store-Hash` header (required) — | Header | Argument | Description | |:-------|:---------|:------------| | `X-Store-Hash` | `store_hash` | The unique store hash associated with a BigCommerce store that has B2B Edition enabled. |

## Request

### Body (application/json)

This endpoint expects an object.

- `companyName` (string, required) — The name of the business associated with the Company account.
- `companyEmail` (string, required) — The primary email address for the Company account.
- `companyPhone` (string, required) — The primary phone number for the Company account.
- `country` (string, required) — The country of the primary address for the Company account. This must be either the full name or the ISO2 country code.
- `adminFirstName` (string, required) — The first name of the Company account administrator.
- `adminLastName` (string, required) — The last name of the Company account administrator.
- `adminEmail` (string, required) — The email address of the Company account administrator. If an existing BigCommerce customer account uses this email address, it is automatically linked to the administrator’s Company user account.
- `extraFields` (list of CompaniesPostRequestBodyContentApplicationJsonSchemaExtraFieldsItems, optional)
- `userExtraFields` (list of CompaniesPostRequestBodyContentApplicationJsonSchemaUserExtraFieldsItems, optional)
- `customerGroupId` (integer, optional) — The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior) for more information.
- `addressLine1` (string, optional) — The first line of the primary address for the Company account.
- `addressLine2` (string, optional) — The second line of the primary address for the Company account.
- `city` (string, optional) — The city of the primary address for the Company account.
- `state` (string, optional) — The state of the primary address for the Company account, if applicable. This must be the full name and not an abbreviation.
- `zipCode` (string, optional) — The postal code of the primary address for the Company account.
- `adminPhoneNumber` (string, optional) — The phone number of the Company account administrator.
- `originChannelId` (integer, optional) — The storefront channel ID designated as the origin for the Company administrator. Use `1` for your store’s default storefront channel.
- `channelIds` (list of integer, optional) — The storefront channel IDs in which buyers can access their Company’s Buyer Portal. Use `1` for your store’s default storefront channel.
- `catalogId` (integer, optional) — The ID of the price list assigned to the Company account. This field is read-only for stores using [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior). If your store uses legacy Dependent Companies behavior **and** it does not have Multi-Storefront enabled, this field is **required** for creating new Company accounts. If your store has Multi-Storefront enabled, use the `priceListAssign` array instead.
- `acceptCreationEmail` (boolean, optional, default: false) — Indicates whether or not the administrator receives a welcome email when the Company account is created. `true`: Sends the welcome email to the admin user `false`: Does not send the email

## Response

### 200

Created

- `code` (integer, optional)
- `data` (CompaniesPostResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesPostResponsesContentApplicationJsonSchemaMeta, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `code` (double, optional)
- `data` (CompaniesPostResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesPostResponsesContentApplicationJsonSchemaMeta, optional)

### 422 Unprocessable Entity Error

Company was not valid. This is the result of missing required fields, or of invalid data. See the response for more details.

- `code` (integer, optional)
- `data` (CompaniesPostResponsesContentApplicationJsonSchemaData, optional)
- `meta` (CompaniesPostResponsesContentApplicationJsonSchemaMeta, optional)

## Types

### CompaniesPostRequestBodyContentApplicationJsonSchemaExtraFieldsItems

- `fieldName` (string, required) — Field name that config in you store
- `fieldValue` (string, required) — Value of the extra field.

### CompaniesPostRequestBodyContentApplicationJsonSchemaUserExtraFieldsItems

- `fieldName` (string, required) — Field name that config in you store
- `fieldValue` (string, required) — Value of the extra field.

### CompaniesPostResponsesContentApplicationJsonSchemaData

- `companyId` (integer, optional) — Unique numeric ID of the Company account. This is a **read-only** field; do not set or modify its value in a `POST` or `PUT` request.
- `customerId` (integer, optional)
- `customerGroupId` (integer, optional) — The ID of the BigCommerce customer group assigned to the Company account. This field can be static or configurable depending on whether or not your store uses Independent Companies behavior. See [Independent Companies Behavior](/developer/api-reference/rest/b2b/management/company/companies#independent-vs-dependent-companies-behavior) for more information.

### CompaniesPostResponsesContentApplicationJsonSchemaMeta

- `message` (string, optional)

## Examples

**Request**

```json
{
  "companyName": "string",
  "companyEmail": "user@example.com",
  "companyPhone": "string",
  "country": "string",
  "adminFirstName": "string",
  "adminLastName": "string",
  "adminEmail": "user@example.com",
  "extraFields": [
    {
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "adminPhoneNumber": "string",
  "originChannelId": 1,
  "channelIds": [
    1,
    2
  ],
  "catalogId": 0,
  "acceptCreationEmail": false,
  "uuid": "string"
}
```

**Response**

```json
{
  "code": 200,
  "data": {
    "companyId": 1,
    "customerId": 1,
    "customerGroupId": 1
  },
  "meta": {
    "message": "SUCCESS"
  }
}
```

**SDK Code**

```python Create a company
import requests

url = "https://api-b2b.bigcommerce.com/api/v3/io/companies"

payload = {
    "companyName": "string",
    "companyEmail": "user@example.com",
    "companyPhone": "string",
    "country": "string",
    "adminFirstName": "string",
    "adminLastName": "string",
    "adminEmail": "user@example.com",
    "extraFields": [
        {
            "fieldName": "string",
            "fieldValue": "string"
        }
    ],
    "addressLine1": "string",
    "addressLine2": "string",
    "city": "string",
    "state": "string",
    "zipCode": "string",
    "adminPhoneNumber": "string",
    "originChannelId": 1,
    "channelIds": [1, 2],
    "catalogId": 0,
    "acceptCreationEmail": False,
    "uuid": "string"
}
headers = {
    "X-Auth-Token": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Create a company
const url = 'https://api-b2b.bigcommerce.com/api/v3/io/companies';
const options = {
  method: 'POST',
  headers: {'X-Auth-Token': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"companyName":"string","companyEmail":"user@example.com","companyPhone":"string","country":"string","adminFirstName":"string","adminLastName":"string","adminEmail":"user@example.com","extraFields":[{"fieldName":"string","fieldValue":"string"}],"addressLine1":"string","addressLine2":"string","city":"string","state":"string","zipCode":"string","adminPhoneNumber":"string","originChannelId":1,"channelIds":[1,2],"catalogId":0,"acceptCreationEmail":false,"uuid":"string"}'
};

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

```go Create a company
package main

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

func main() {

	url := "https://api-b2b.bigcommerce.com/api/v3/io/companies"

	payload := strings.NewReader("{\n  \"companyName\": \"string\",\n  \"companyEmail\": \"user@example.com\",\n  \"companyPhone\": \"string\",\n  \"country\": \"string\",\n  \"adminFirstName\": \"string\",\n  \"adminLastName\": \"string\",\n  \"adminEmail\": \"user@example.com\",\n  \"extraFields\": [\n    {\n      \"fieldName\": \"string\",\n      \"fieldValue\": \"string\"\n    }\n  ],\n  \"addressLine1\": \"string\",\n  \"addressLine2\": \"string\",\n  \"city\": \"string\",\n  \"state\": \"string\",\n  \"zipCode\": \"string\",\n  \"adminPhoneNumber\": \"string\",\n  \"originChannelId\": 1,\n  \"channelIds\": [\n    1,\n    2\n  ],\n  \"catalogId\": 0,\n  \"acceptCreationEmail\": false,\n  \"uuid\": \"string\"\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 company
require 'uri'
require 'net/http'

url = URI("https://api-b2b.bigcommerce.com/api/v3/io/companies")

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  \"companyName\": \"string\",\n  \"companyEmail\": \"user@example.com\",\n  \"companyPhone\": \"string\",\n  \"country\": \"string\",\n  \"adminFirstName\": \"string\",\n  \"adminLastName\": \"string\",\n  \"adminEmail\": \"user@example.com\",\n  \"extraFields\": [\n    {\n      \"fieldName\": \"string\",\n      \"fieldValue\": \"string\"\n    }\n  ],\n  \"addressLine1\": \"string\",\n  \"addressLine2\": \"string\",\n  \"city\": \"string\",\n  \"state\": \"string\",\n  \"zipCode\": \"string\",\n  \"adminPhoneNumber\": \"string\",\n  \"originChannelId\": 1,\n  \"channelIds\": [\n    1,\n    2\n  ],\n  \"catalogId\": 0,\n  \"acceptCreationEmail\": false,\n  \"uuid\": \"string\"\n}"

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

```java Create a company
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api-b2b.bigcommerce.com/api/v3/io/companies")
  .header("X-Auth-Token", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"companyName\": \"string\",\n  \"companyEmail\": \"user@example.com\",\n  \"companyPhone\": \"string\",\n  \"country\": \"string\",\n  \"adminFirstName\": \"string\",\n  \"adminLastName\": \"string\",\n  \"adminEmail\": \"user@example.com\",\n  \"extraFields\": [\n    {\n      \"fieldName\": \"string\",\n      \"fieldValue\": \"string\"\n    }\n  ],\n  \"addressLine1\": \"string\",\n  \"addressLine2\": \"string\",\n  \"city\": \"string\",\n  \"state\": \"string\",\n  \"zipCode\": \"string\",\n  \"adminPhoneNumber\": \"string\",\n  \"originChannelId\": 1,\n  \"channelIds\": [\n    1,\n    2\n  ],\n  \"catalogId\": 0,\n  \"acceptCreationEmail\": false,\n  \"uuid\": \"string\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api-b2b.bigcommerce.com/api/v3/io/companies', [
  'body' => '{
  "companyName": "string",
  "companyEmail": "user@example.com",
  "companyPhone": "string",
  "country": "string",
  "adminFirstName": "string",
  "adminLastName": "string",
  "adminEmail": "user@example.com",
  "extraFields": [
    {
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "adminPhoneNumber": "string",
  "originChannelId": 1,
  "channelIds": [
    1,
    2
  ],
  "catalogId": 0,
  "acceptCreationEmail": false,
  "uuid": "string"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Auth-Token' => '<apiKey>',
  ],
]);

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

```csharp Create a company
using RestSharp;

var client = new RestClient("https://api-b2b.bigcommerce.com/api/v3/io/companies");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Auth-Token", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"companyName\": \"string\",\n  \"companyEmail\": \"user@example.com\",\n  \"companyPhone\": \"string\",\n  \"country\": \"string\",\n  \"adminFirstName\": \"string\",\n  \"adminLastName\": \"string\",\n  \"adminEmail\": \"user@example.com\",\n  \"extraFields\": [\n    {\n      \"fieldName\": \"string\",\n      \"fieldValue\": \"string\"\n    }\n  ],\n  \"addressLine1\": \"string\",\n  \"addressLine2\": \"string\",\n  \"city\": \"string\",\n  \"state\": \"string\",\n  \"zipCode\": \"string\",\n  \"adminPhoneNumber\": \"string\",\n  \"originChannelId\": 1,\n  \"channelIds\": [\n    1,\n    2\n  ],\n  \"catalogId\": 0,\n  \"acceptCreationEmail\": false,\n  \"uuid\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create a company
import Foundation

let headers = [
  "X-Auth-Token": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "companyName": "string",
  "companyEmail": "user@example.com",
  "companyPhone": "string",
  "country": "string",
  "adminFirstName": "string",
  "adminLastName": "string",
  "adminEmail": "user@example.com",
  "extraFields": [
    [
      "fieldName": "string",
      "fieldValue": "string"
    ]
  ],
  "addressLine1": "string",
  "addressLine2": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "adminPhoneNumber": "string",
  "originChannelId": 1,
  "channelIds": [1, 2],
  "catalogId": 0,
  "acceptCreationEmail": false,
  "uuid": "string"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-b2b.bigcommerce.com/api/v3/io/companies")! 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()
```