> 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 Account with Set Password

POST https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password
Content-Type: application/json

This endpoint can set the password for `user_email` which, if set, eliminates the account validation email and the requirement to validate the store prior to users being able to log in to that storeʼs control panel.

Reference: https://docs.bigcommerce.com/developer/docs/beta/powered-by/api-reference/accounts/create-account-with-password

## Authentication

- `X-Auth-Client` header (required) — The client ID of the franchise API account.
- `X-Auth-Token` header (required) — An OAuth token generated from the franchise API account. To authenticate, generate an **OAuth Token** (if you donʼt have one or itʼs expired): ```http POST https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/oauth/token Accept: application/json X-Auth-Client: {client_id} X-Auth-Secret: {client_secret} { "duration": 900 } ``` Response: ```json { "access_token": "dlkJcn34...Lkd012", "expires_at": "2018-04-24T16:15:26.509045122Z” } ``` After you generate an **OAuth token**, use the `client_id` and `oauth_token` to authenticate all other API requests: ```http GET https://api.bigcommerce.com/franchises/{franchise_uuid}/v1/accounts/123 Accept: application/json X-Auth-Client: {client_id} X-Auth-Token: {oauth_token} ``` Response: ```json { "data": { "id": "12345678910", "name": "Test Company", ... }, "meta": {} } ```

## Request

### Headers

- `Accept` (string, required, default: application/json) — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

### Body (application/json)

This endpoint expects an object.

- `name` (string, required) — Company name for the account and the name displayed at login when a merchant has multiple stores. 40 character limit.
- `user_email` (string, required) — Email address of user who will be the store owner for the account. Must be unique within BigCommerce system.
- `primary_contact` (_primaryContact, required)
- `password` (string, optional) — Plaintext password
- `locale` (string, optional, default: en) — `locale` is used when sending email communications (such as account activation emails) to the accountʼs `user_email`.

## Response

### 200

OK

## Types

### _primaryContact

- `first_name` (string, required)
- `last_name` (string, required) — 255 Char limit
- `email` (string, required)
- `country` (string, required) — ISO 3166-1 alpha-2 code
- `district` (string, required) — State, province, etc.
- `address_line_1` (string, optional) — First line of address of primary contact.
- `city` (string, optional) — City for primary contact.
- `postal_code` (string, optional)
- `phone_number` (string, optional)

## Examples

**Request**

```json
{
  "name": "string",
  "user_email": "string",
  "primary_contact": {
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "country": "US",
    "district": "string"
  }
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password"

payload = {
    "name": "string",
    "user_email": "string",
    "primary_contact": {
        "first_name": "string",
        "last_name": "string",
        "email": "string",
        "country": "US",
        "district": "string"
    }
}
headers = {
    "Accept": "application/json",
    "X-Auth-Client": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'X-Auth-Client': '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"name":"string","user_email":"string","primary_contact":{"first_name":"string","last_name":"string","email":"string","country":"US","district":"string"}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password"

	payload := strings.NewReader("{\n  \"name\": \"string\",\n  \"user_email\": \"string\",\n  \"primary_contact\": {\n    \"first_name\": \"string\",\n    \"last_name\": \"string\",\n    \"email\": \"string\",\n    \"country\": \"US\",\n    \"district\": \"string\"\n  }\n}")

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

	req.Header.Add("Accept", "application/json")
	req.Header.Add("X-Auth-Client", "<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
require 'uri'
require 'net/http'

url = URI("https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password")

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

request = Net::HTTP::Post.new(url)
request["Accept"] = 'application/json'
request["X-Auth-Client"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"string\",\n  \"user_email\": \"string\",\n  \"primary_contact\": {\n    \"first_name\": \"string\",\n    \"last_name\": \"string\",\n    \"email\": \"string\",\n    \"country\": \"US\",\n    \"district\": \"string\"\n  }\n}"

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.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password")
  .header("Accept", "application/json")
  .header("X-Auth-Client", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"string\",\n  \"user_email\": \"string\",\n  \"primary_contact\": {\n    \"first_name\": \"string\",\n    \"last_name\": \"string\",\n    \"email\": \"string\",\n    \"country\": \"US\",\n    \"district\": \"string\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password', [
  'body' => '{
  "name": "string",
  "user_email": "string",
  "primary_contact": {
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "country": "US",
    "district": "string"
  }
}',
  'headers' => [
    'Accept' => 'application/json',
    'Content-Type' => 'application/json',
    'X-Auth-Client' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("X-Auth-Client", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"string\",\n  \"user_email\": \"string\",\n  \"primary_contact\": {\n    \"first_name\": \"string\",\n    \"last_name\": \"string\",\n    \"email\": \"string\",\n    \"country\": \"US\",\n    \"district\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "X-Auth-Client": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "string",
  "user_email": "string",
  "primary_contact": [
    "first_name": "string",
    "last_name": "string",
    "email": "string",
    "country": "US",
    "district": "string"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.bigcommerce.com/franchises/franchise_uuid/v1/accounts/with-password")! 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()
```