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

# Create a Card User

POST https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers
Content-Type: application/json

Create one or more Card Users under an existing Buyer. A Card User will receive and spend on-demand Cards. This endpoint is optional and should be used when on-demand Virtual Cards are being created for individuals other than the Account owner.

Reference: https://developer.americanexpress.ferndocs.com/payment-services/card-on-demand/api-reference/create-card-user

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Exchange your API key and secret for a bearer token, then send it as `Authorization: Bearer <token>`.

## Servers

- `https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand` (Sandbox, default)
- `https://api.americanexpress.com/commercial/v1/card_on_demand` (Production)

## Request

### Body (application/json)

This endpoint expects an object.

- `buyerId` (string, required) — A unique Buyer ID that is created during the Buyer enrollment.
- `cardUsers` (list of CardusersPostRequestBodyContentApplicationJsonSchemaCardUsersItems, required) — An array of Card Users to be created under the existing Buyers.

## Response

### 200

Successful operation

- `cardUsers` (list of CardusersPostResponsesContentApplicationJsonSchemaCardUsersItems, required) — An array of Card User to be created under the existing Buyers.
- `buyerId` (string, optional) — A unique Buyer ID that is created during the Buyer enrollment.
- `status` (string, optional) — The status of the Card User.
- `statusDescription` (string, optional) — The description of the status.

### 202

Accepted (Multiple Card Users)

- `buyerId` (string, optional) — A unique Buyer ID that is created during the Buyer enrollment.
- `status` (string, optional) — The status of the Card User.
- `statusDescription` (string, optional) — The description of the status.
- `referenceId` (string, optional) — A unique identifier for each request to create Card Users in bulk (i.e., when the request has more than one Card User object). This ID is included in the API response for the POST request to help match the webhook notification with the API request.

## Errors

### 400 Bad Request Error

Bad Request

- `errors` (list of 400ErrorCardUsersItems, required)

### 401 Unauthorized Error

Unauthorized

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 403 Forbidden Error

Unauthenticated

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 404 Not Found Error

Resource not found

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 500 Internal Server Error

Service error

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

### 503 Service Unavailable Error

Service unavailable

- `errorCode` (string, required) — A machine-readable field indicating the type of error.
- `errorDescription` (string, optional) — Provides a short description of the error.

## Types

### CardusersPostRequestBodyContentApplicationJsonSchemaCardUsersItems

- `name` (name, required) — The name of the Card User.
- `dateOfBirth` (string, required) — The Date of Birth of the Card User in YYYY-MM-DD format.
- `email` (list of EmailItems, required) — The email of the Card User; currently supports only one email.
- `phone` (list of PhoneItems, required) — The phone details of the Card User; currently supports only one phone.
- `address` (list of AddressItems, required) — The residential address of the Card User; currently supports only one address with the type RESIDENCE. P.O. boxes or commercial mail-receiving agencies are prohibited. The address will be validated using the [USPS address validation API](https://www.usps.com/business/web-tools-apis/address-information-api.htm).
- `expressConsentObtained` (boolean, required) — The Card User's consent to send their PII to American Express for verification.
- `employeeId` (string, optional) — The unique ID assigned by the Buyer resource to the Card User being enrolled. Alphabetic characters, spaces and numbers are allowed.

### CardusersPostResponsesContentApplicationJsonSchemaCardUsersItems

- `cardUserId` (string, optional) — A unique ID that is created for the Card User.
- `status` (enum, optional) — The status of the Card User. A Card User may have any of the following statuses: - ACTIVATED indicates that the Card User has been successfully verified and can be assigned Virtual Cards. - VERIFICATION_PENDING indicates that the Card User is under review and additional information is required to complete the Card User's verification. - VERIFICATION_FAILED indicates that American Express was unable to successfully verify the Card User, and hence Virtual Cards cannot be assigned to the User. - DEACTIVATED indicates that the Card User was deactivated by the Buyer and cannot be assigned Virtual Cards. A Card User can be reactivated using the Update the status of a Card User endpoint.
  - Allowed values: `ACTIVATED`, `VERIFICATION_PENDING`, `VERIFICATION_FAILED`, `DEACTIVATED`
- `name` (CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsName, optional) — The name of the Card User.
- `dateOfBirth` (string, optional) — The Date of Birth of the Card User in YYYY-MM-DD format.
- `email` (list of CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsEmailItems, optional) — The email of the Card User; currently supports only one email.
- `phone` (list of CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsPhoneItems, optional) — The phone details of the Card User; currently supports only one phone.
- `address` (list of CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsAddressItems, optional) — The residential address of the Card User; currently supports only one address with the type RESIDENCE. P.O. boxes or commercial mail-receiving agencies are prohibited.
- `expressConsentObtained` (boolean, optional) — The Card User's consent to send their Personally Identifiable Information (PII) to American Express for verification.
- `employeeId` (string, optional) — The unique ID assigned by the Buyer resource to the Card User being enrolled. Alphabetic characters, spaces and numbers are allowed.

### 400ErrorCardUsersItems

- `code` (string, required) — A machine-readable field indicating the type of error.
- `message` (string, required) — Provides a short description of the error.
- `detail` (string, optional) — Provides a detailed description of the error.
- `link` (string, optional) — The link to documentation that explains the error.
- `cardUserErrors` (list of 400ErrorCardUsersItemsCardUserErrorsItems, optional) — An array of errors of each Card User with the email-address as its identifier.

### name

The name of the Card User.

- `first` (string, required) — The first name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `last` (string, required) — The last name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `middle` (string, optional) — The middle name or initial. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `suffix` (string, optional) — The suffix, e.g., Jr. Only alphabetic characters and periods are allowed.

### EmailItems

- `type` (enum, required) — The type of email; currently supports only PERSONAL.
  - Allowed values: `PERSONAL`, `WORK`, `ALTERNATE`
- `emailAddress` (string, required) — The email address.

### PhoneItems

- `countryCode` (string, required) — The country code must be three digits. Only numeric values accepted. Currently supports only the U.S. country code.
- `number` (string, required) — The phone number of the Card User.
- `type` (enum, required) — The allowed value is MOBILE.
  - Allowed values: `MOBILE`

### AddressItems

- `type` (enum, required) — The type of the Card User's address. The current version only supports the enum value as RESIDENCE. More enum values, such as WORK will be supported in the upcoming releases.
  - Allowed values: `RESIDENCE`
- `purpose` (enum, required) — The purpose for which the address will be used. The current version only supports PRIMARY, which includes the following purposes: KYC or identity verification, servicing communication, and default for delivering PLASTIC Cards. More enum values, such as PLASTIC_DELIVERY and STATEMENT_DELIVERY will be supported in the upcoming releases.
  - Allowed values: `PRIMARY`
- `line1` (string, required) — Address line one.
- `city` (string, required) — The city of the Card User's address.
- `state` (string, required) — The state of the Card User's address. Only alphabetic characters are allowed.
- `country` (string, required) — The two-letter country code of the Card User's address. Please find the full list in the [ISO Country Codes](iso-country-codes.pdf) list. The column to reference is Alpha 2 Code.
- `postalCode` (string, required) — The Postal Code of the Card User's address. Only numeric values and hyphens are allowed. For the most accurate address, please use the full nine-digit Postal Code. Some examples are 85260 or 85260-7706.
- `line2` (string, optional) — Address line two.

### CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsName

The name of the Card User.

- `first` (string, required) — The first name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `last` (string, required) — The last name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `middle` (string, optional) — The middle name or initial. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `suffix` (string, optional) — The suffix, e.g., Jr. Only alphabetic characters and periods are allowed.

### CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsEmailItems

- `type` (enum, required) — The type of email; currently supports only PERSONAL.
  - Allowed values: `PERSONAL`, `WORK`, `ALTERNATE`
- `emailAddress` (string, required) — The email address.

### CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsPhoneItems

- `countryCode` (string, required) — The country code must be three digits. Only numeric values are accepted. Currently supports only the U.S. country code.
- `number` (string, required) — The phone number of the Card User.
- `type` (enum, required) — The allowed value is MOBILE.
  - Allowed values: `MOBILE`

### CardusersPostResponsesContentApplicationJsonSchemaCardUsersItemsAddressItems

- `type` (enum, required) — The type of the Card User's address. The current version only supports the enum value as RESIDENCE. More enum values, such as WORK will be supported in the upcoming releases.
  - Allowed values: `RESIDENCE`
- `purpose` (enum, required) — The purpose for which the address will be used. The current version only supports PRIMARY, which includes the following purposes: KYC or identity verification, servicing communication, and default for delivering PLASTIC Cards. More enum values, such as PLASTIC_DELIVERY and STATEMENT_DELIVERY will be supported in the upcoming releases.
  - Allowed values: `PRIMARY`
- `line1` (string, required) — Address line one.
- `city` (string, required) — The city of the Card User's address.
- `state` (string, required) — The state of the Card User's address. Only alphabetic characters are allowed.
- `country` (string, required) — The two-letter country code of the Card User's address. Please find the full list in the [ISO Country Codes](iso-country-codes.pdf) list. The column to reference is Alpha 2 Code.
- `postalCode` (string, required) — The Postal Code of the Card User's address. Only numeric values and hyphens are allowed. For the most accurate address, please use the full nine-digit Postal Code. Some examples are 85260 or 85260-7706.
- `line2` (string, optional) — Address line two.

### 400ErrorCardUsersItemsCardUserErrorsItems

- `name` (name_optional, optional) — The name of the Card User.
- `emailAddress` (string, optional) — The email address.
- `errors` (list of 400ErrorOptionalWithoutLinkItems, optional)

### name_optional

The name of the Card User.

- `first` (string, optional) — The first name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `middle` (string, optional) — The middle name or initial. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `last` (string, optional) — The last name. The allowed characters are alphabets, spaces, hyphen (-) and apostrophe (').
- `suffix` (string, optional) — The suffix, e.g., Jr. Only alphabetic characters and periods are allowed.

### 400ErrorOptionalWithoutLinkItems

- `code` (string, required) — A machine-readable field indicating the type of error.
- `message` (string, required) — Provides a short description of the error.
- `detail` (string, optional) — Provides a detailed description of the error.

## Examples

### createCardUser_example

**Request**

```json
{
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    {
      "name": {
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      },
      "dateOfBirth": "1999-05-24",
      "email": [
        {
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        }
      ],
      "phone": [
        {
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        }
      ],
      "address": [
        {
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        }
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    }
  ]
}
```

**Response**

```json
{
  "cardUsers": [
    {
      "cardUserId": "123456",
      "status": "ACTIVATED",
      "name": {
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      },
      "dateOfBirth": "1999-05-24",
      "email": [
        {
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        }
      ],
      "phone": [
        {
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        }
      ],
      "address": [
        {
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        }
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    }
  ],
  "buyerId": "OBpB8D9X93VO03sm",
  "status": "3000",
  "statusDecription": "The Card User was created successfully."
}
```

**SDK Code**

```python createCardUser_example
import requests

url = "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers"

payload = {
    "buyerId": "OBpB8D9X93VO03sm",
    "cardUsers": [
        {
            "name": {
                "first": "John",
                "last": "Smith",
                "middle": "M",
                "suffix": "Jr."
            },
            "dateOfBirth": "1999-05-24",
            "email": [
                {
                    "type": "PERSONAL",
                    "emailAddress": "someone@example.com"
                }
            ],
            "phone": [
                {
                    "countryCode": "001",
                    "number": "5555551111",
                    "type": "MOBILE"
                }
            ],
            "address": [
                {
                    "type": "RESIDENCE",
                    "purpose": "PRIMARY",
                    "line1": "100 Elm Street",
                    "city": "Phoenix",
                    "state": "Arizona",
                    "country": "US",
                    "postalCode": "12345",
                    "line2": "Suite A"
                }
            ],
            "expressConsentObtained": True,
            "employeeId": "2322199833"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript createCardUser_example
const url = 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"buyerId":"OBpB8D9X93VO03sm","cardUsers":[{"name":{"first":"John","last":"Smith","middle":"M","suffix":"Jr."},"dateOfBirth":"1999-05-24","email":[{"type":"PERSONAL","emailAddress":"someone@example.com"}],"phone":[{"countryCode":"001","number":"5555551111","type":"MOBILE"}],"address":[{"type":"RESIDENCE","purpose":"PRIMARY","line1":"100 Elm Street","city":"Phoenix","state":"Arizona","country":"US","postalCode":"12345","line2":"Suite A"}],"expressConsentObtained":true,"employeeId":"2322199833"}]}'
};

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

```go createCardUser_example
package main

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

func main() {

	url := "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers"

	payload := strings.NewReader("{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 createCardUser_example
require 'uri'
require 'net/http'

url = URI("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers', [
  'body' => '{
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    {
      "name": {
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      },
      "dateOfBirth": "1999-05-24",
      "email": [
        {
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        }
      ],
      "phone": [
        {
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        }
      ],
      "address": [
        {
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        }
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp createCardUser_example
using RestSharp;

var client = new RestClient("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift createCardUser_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    [
      "name": [
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      ],
      "dateOfBirth": "1999-05-24",
      "email": [
        [
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        ]
      ],
      "phone": [
        [
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        ]
      ],
      "address": [
        [
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        ]
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")! 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()
```

### createCardUser_example

**Request**

```json
{
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    {
      "name": {
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      },
      "dateOfBirth": "1999-05-24",
      "email": [
        {
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        }
      ],
      "phone": [
        {
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        }
      ],
      "address": [
        {
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        }
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    }
  ]
}
```

**Response**

```json
{
  "buyerId": "OBpB8D9X93VO03sm",
  "status": "string",
  "statusDescription": "string",
  "referenceId": "string"
}
```

**SDK Code**

```python createCardUser_example
import requests

url = "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers"

payload = {
    "buyerId": "OBpB8D9X93VO03sm",
    "cardUsers": [
        {
            "name": {
                "first": "John",
                "last": "Smith",
                "middle": "M",
                "suffix": "Jr."
            },
            "dateOfBirth": "1999-05-24",
            "email": [
                {
                    "type": "PERSONAL",
                    "emailAddress": "someone@example.com"
                }
            ],
            "phone": [
                {
                    "countryCode": "001",
                    "number": "5555551111",
                    "type": "MOBILE"
                }
            ],
            "address": [
                {
                    "type": "RESIDENCE",
                    "purpose": "PRIMARY",
                    "line1": "100 Elm Street",
                    "city": "Phoenix",
                    "state": "Arizona",
                    "country": "US",
                    "postalCode": "12345",
                    "line2": "Suite A"
                }
            ],
            "expressConsentObtained": True,
            "employeeId": "2322199833"
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript createCardUser_example
const url = 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"buyerId":"OBpB8D9X93VO03sm","cardUsers":[{"name":{"first":"John","last":"Smith","middle":"M","suffix":"Jr."},"dateOfBirth":"1999-05-24","email":[{"type":"PERSONAL","emailAddress":"someone@example.com"}],"phone":[{"countryCode":"001","number":"5555551111","type":"MOBILE"}],"address":[{"type":"RESIDENCE","purpose":"PRIMARY","line1":"100 Elm Street","city":"Phoenix","state":"Arizona","country":"US","postalCode":"12345","line2":"Suite A"}],"expressConsentObtained":true,"employeeId":"2322199833"}]}'
};

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

```go createCardUser_example
package main

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

func main() {

	url := "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers"

	payload := strings.NewReader("{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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 createCardUser_example
require 'uri'
require 'net/http'

url = URI("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers', [
  'body' => '{
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    {
      "name": {
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      },
      "dateOfBirth": "1999-05-24",
      "email": [
        {
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        }
      ],
      "phone": [
        {
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        }
      ],
      "address": [
        {
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        }
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp createCardUser_example
using RestSharp;

var client = new RestClient("https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"buyerId\": \"OBpB8D9X93VO03sm\",\n  \"cardUsers\": [\n    {\n      \"name\": {\n        \"first\": \"John\",\n        \"last\": \"Smith\",\n        \"middle\": \"M\",\n        \"suffix\": \"Jr.\"\n      },\n      \"dateOfBirth\": \"1999-05-24\",\n      \"email\": [\n        {\n          \"type\": \"PERSONAL\",\n          \"emailAddress\": \"someone@example.com\"\n        }\n      ],\n      \"phone\": [\n        {\n          \"countryCode\": \"001\",\n          \"number\": \"5555551111\",\n          \"type\": \"MOBILE\"\n        }\n      ],\n      \"address\": [\n        {\n          \"type\": \"RESIDENCE\",\n          \"purpose\": \"PRIMARY\",\n          \"line1\": \"100 Elm Street\",\n          \"city\": \"Phoenix\",\n          \"state\": \"Arizona\",\n          \"country\": \"US\",\n          \"postalCode\": \"12345\",\n          \"line2\": \"Suite A\"\n        }\n      ],\n      \"expressConsentObtained\": true,\n      \"employeeId\": \"2322199833\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift createCardUser_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "buyerId": "OBpB8D9X93VO03sm",
  "cardUsers": [
    [
      "name": [
        "first": "John",
        "last": "Smith",
        "middle": "M",
        "suffix": "Jr."
      ],
      "dateOfBirth": "1999-05-24",
      "email": [
        [
          "type": "PERSONAL",
          "emailAddress": "someone@example.com"
        ]
      ],
      "phone": [
        [
          "countryCode": "001",
          "number": "5555551111",
          "type": "MOBILE"
        ]
      ],
      "address": [
        [
          "type": "RESIDENCE",
          "purpose": "PRIMARY",
          "line1": "100 Elm Street",
          "city": "Phoenix",
          "state": "Arizona",
          "country": "US",
          "postalCode": "12345",
          "line2": "Suite A"
        ]
      ],
      "expressConsentObtained": true,
      "employeeId": "2322199833"
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.qasb2s.americanexpress.com/commercial/v1/card_on_demand/cardusers")! 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()
```