---
updatedAt: 2026-05-13T09:05:06.000Z
---

# createCustomer

Create a new customer

# Details

## Responses and Response Schema

<details><summary><em>201 (Customer Created)</em></summary><br>

Customer created successfully.

[block:parameters]
{
  "data": {
    "h-0": "Field Name",
    "h-1": "Type",
    "h-2": "Description",
    "0-0": "id\\*",
    "0-1": "string",
    "0-2": "",
    "1-0": "url\\*",
    "1-1": "string  \n  \n**Format**: uri",
    "1-2": "The URI the agent can click on to see the customer.",
    "2-0": "customNonSearchableCustomerFieldOne",
    "2-1": "string",
    "2-2": "",
    "3-0": "customNonSearchableCustomerFieldTwo",
    "3-1": "string",
    "3-2": "",
    "4-0": "customSearchableCustomerFieldOne",
    "4-1": "string",
    "4-2": "",
    "5-0": "customSearchableCustomerFieldTwo",
    "5-1": "string",
    "5-2": ""
  },
  "cols": 3,
  "rows": 6,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

</details>

<details><summary><em>400 (Invalid Field in Payload)</em></summary><br>

Invalid field in payload. Generic errors.

| Field Name | Type    | Description                    |
| :--------- | :------ | :----------------------------- |
| fields     | obeject |                                |
| error\*    | string  | The name of the error or code. |
| message\*  | string  | Message passable to the user.  |

<details><summary><em>fields object</em></summary><br>

| Field Name     | Type   |
| :------------- | :----- |
| name\*         | string |
| errorMessage\* | string |

</details></details>

<details><summary><em>401 (API Key is Invalid)</em></summary><br>

API key is invalid or has become de-authenticated.

</details>

<details><summary><em>422 (Field Validation Error)</em></summary><br>

A field validation error has occurred.

| Field Name | Type           | Description                   |
| :--------- | :------------- | :---------------------------- |
| fields     | array\[object] |                               |
| error\*    | string         | Name of error or code.        |
| message\*  | string         | Message passable to the user. |

<details><summary><em>fields object</em></summary><br>

| Field Name     | Type   | Description                   |
| :------------- | :----- | :---------------------------- |
| name\*         | string |                               |
| errorMessage\* | string | Message passable to the user. |

</details></details>

<details><summary><em>500 (Unexpected Error)</em></summary><br>

Unexpected error.

| Field Name | Type   | Description                   |
| :--------- | :----- | :---------------------------- |
| error\*    | string | Name of the error or code.    |
| message\*  | string | Message passable to the user. |

</details>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-specifications",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://{your-domain}.com",
      "variables": {
        "your-domain": {
          "default": "your-domain"
        }
      }
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/customer": {
      "post": {
        "summary": "createCustomer",
        "description": "Create a new customer",
        "operationId": "createcustomer",
        "parameters": [
          {
            "name": "x-sf-user-email",
            "in": "header",
            "description": "The email id of the Khoros Care agent performing the action.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-sf-initiative",
            "in": "header",
            "description": "The id of the active Khoros Care Initiative the user is in when performing the action.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-sf-company-id",
            "in": "header",
            "description": "The Khoros Care id of the company the user is in when making the request.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "customNonSearchableCustomerFieldOne": {
                    "type": "string",
                    "description": "An example of a custom field on the Customer object with `\"searchable\": false`."
                  },
                  "customNonSearchableCustomerFieldTwo": {
                    "type": "string",
                    "description": "An example of a custom field on the Customer object with `\"searchable\": false`."
                  },
                  "customSearchableCustomerFieldOne": {
                    "type": "string",
                    "description": "An example of a custom field on the Customer object with `\"searchable\": true`."
                  },
                  "customSearchableCustomerFieldTwo": {
                    "type": "string",
                    "description": "An example of a custom field on the Customer object with `\"searchable\": true`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "text/plain": {
                "examples": {
                  "Result": {
                    "value": ""
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```