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

# Create Customer

POST https://connect.plex.com/mdm/v1/customers

Create a new customer record.

Reference: https://rockwell.ferndocs.com/api-reference/customers-api/create-customer

## Response

### 201

Success - Customer Created

- `id` (string, optional)
- `customerName` (string, optional)
- `customerCode` (string, optional)
- `status` (string, optional)
- `email` (string, optional)
- `phone` (string, optional)
- `paymentTerms` (string, optional)
- `creditLimit` (integer, optional)
- `currency` (string, optional)
- `createdAt` (datetime, optional)
- `updatedAt` (datetime, optional)
- `createdBy` (string, optional)
- `_links` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinks, optional)

## Errors

### 400 Bad Request Error

Bad Request - Missing Required Fields

- `error` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaError, optional)

### 401 Unauthorized Error

Unauthorized - Missing Token

- `error` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaError, optional)

### 409 Conflict Error

Conflict - Duplicate Customer Code

- `error` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaError, optional)

## Types

### MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinks

- `self` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinksSelf, optional)
- `addresses` (MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinksAddresses, optional)

### MdmV1CustomersPostResponsesContentApplicationJsonSchemaError

- `code` (string, optional)
- `message` (string, optional)
- `details` (list of MdmV1CustomersPostResponsesContentApplicationJsonSchemaErrorDetailsItems, optional)
- `timestamp` (datetime, optional)
- `path` (string, optional)
- `suggestion` (string, optional)

### MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinksSelf

- `href` (string, optional)

### MdmV1CustomersPostResponsesContentApplicationJsonSchemaLinksAddresses

- `href` (string, optional)

### MdmV1CustomersPostResponsesContentApplicationJsonSchemaErrorDetailsItems

- `field` (string, optional)
- `message` (string, optional)
- `code` (string, optional)
- `rejectedValue` (string, optional)
- `existingCustomerId` (string, optional)

## Examples

**Response**

```json
{
  "id": "cust_9f8e7d6c5b4a3210",
  "customerName": "Acme Manufacturing Corp",
  "customerCode": "ACME-001",
  "status": "Active",
  "email": "contact@acmemanufacturing.com",
  "phone": "+1-555-0123",
  "paymentTerms": "Net 30",
  "creditLimit": 50000,
  "currency": "USD",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z",
  "createdBy": "user@company.com",
  "_links": {
    "self": {
      "href": "/mdm/v1/customers/cust_9f8e7d6c5b4a3210"
    },
    "addresses": {
      "href": "/mdm/v1/customers/cust_9f8e7d6c5b4a3210/addresses"
    }
  }
}
```

**SDK Code**

```python createCustomer_example
import requests

url = "https://connect.plex.com/mdm/v1/customers"

response = requests.post(url)

print(response.json())
```

```javascript createCustomer_example
const url = 'https://connect.plex.com/mdm/v1/customers';
const options = {method: 'POST'};

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

```go createCustomer_example
package main

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

func main() {

	url := "https://connect.plex.com/mdm/v1/customers"

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

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

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

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

}
```

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

url = URI("https://connect.plex.com/mdm/v1/customers")

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

request = Net::HTTP::Post.new(url)

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

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

HttpResponse<String> response = Unirest.post("https://connect.plex.com/mdm/v1/customers")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://connect.plex.com/mdm/v1/customers');

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

```csharp createCustomer_example
using RestSharp;

var client = new RestClient("https://connect.plex.com/mdm/v1/customers");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift createCustomer_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://connect.plex.com/mdm/v1/customers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

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