---
title: Create New User
slug: api-documentation/create-new-user
docTags: 
createdAt: 2026-08-27T16:18:26.773Z
---

{
  "id": "SPwJs1aKa7X4vLRgtuyTJ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/user",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/user"
      }
    ],
    "name": "Create New User",
    "description": "This endpoint creates a new user with access to the management APIs for the NoChannel platform.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site this call is for."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "<p>The request must contain the JSON-formatted set of properties for the new user.</p>",
          "customType": "CreateUser",
          "schema": [
            {
              "name": "emailAddress",
              "kind": "required",
              "type": "string<email>",
              "description": "The user's email address",
              "example": "example@example.com",
              "format": "email"
            },
            {
              "name": "id",
              "kind": "optional",
              "type": "string<uuid>",
              "description": "Unique identifier for the user. If it is not provided a UUID will be allocated.",
              "format": "uuid"
            },
            {
              "name": "login",
              "kind": "required",
              "type": "string",
              "description": "<p>The login (username) that is being requested for the user.</p>"
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "<p>First, last, and (optional) middle names of the user.</p>"
            },
            {
              "name": "password",
              "kind": "required",
              "type": "string<password>",
              "description": "User's chosen password. Minimum 8 characters.",
              "format": "password",
              "minLength": 8
            },
            {
              "name": "phoneNumber",
              "kind": "optional",
              "type": "string",
              "description": "The contact phone number for this user."
            },
            {
              "name": "isPasswordAllowed",
              "kind": "optional",
              "type": "boolean",
              "description": "Indicates if the user is allowed to set a password or must use social authentication."
            },
            {
              "name": "roles",
              "kind": "optional",
              "type": "map",
              "deprecated": true,
              "description": "Warning: Deprecated\n<p>The roles section should have one array for each tenant; keyed by the tenant name.\nfor example -\n{\n\"johndoe_store\" : [\n\"some.role\",\n\"some.other.role\"\n],\n\"jonhndoe_other_store\" : [\n\"some.other.role\"\n]\n}</p>",
              "example": "",
              "customType": "map<string, string[]>",
              "schema": [
                {
                  "name": "default",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                }
              ]
            },
            {
              "name": "userRoles",
              "kind": "optional",
              "type": "object",
              "description": "<p>A map indexed by a tenant name listing all tenant-level roles and site-level roles.\nFor example:\n{\n\"tenant1\" : {\n\"roleIds\" : [\"some.role1\",\"some.role2\"],\nsites: {\n\"site1\": {\n\"roleIds\": [\"some.role3\",\"some.role4\"]\n},\n\"site2\": {\n\"roleIds\": [\"some.role4\",\"some.role6\"]\n}\n}\n},\n\"tenant2\" : {\n\"roleIds\" : [\"some.other.role1\",\"some.other.role2\"],\nsites: {\n\"site1\": {\n\"roleIds\": [\"some.other.role3\",\"some.other.role4\"]\n},\n\"site2\": {\n\"roleIds\": [\"some.other.role5\",\"some.other.role6\"]\n}\n}\n}\n}</p>",
              "example": "{\"tenant-name-1\":{\"roleIds\":[\"catalog.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[\"order.mgmt\"]},\"example-site-name-2\":{\"roleIds\":[\"order.mgmt\"]}}},\"tenant-name-2\":{\"roleIds\":[\"user.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[]},\"example-site-name-2\":{\"roleIds\":[\"inventory.mgmt\"]}}}}",
              "modelRef": "#/components/schemas/UserRoles",
              "customType": "UserRoles",
              "schema": []
            },
            {
              "name": "tenant",
              "kind": "required",
              "type": "string",
              "description": "The id of the tenant that this user is to be associated with."
            }
          ],
          "modelRef": "#/components/schemas/CreateUser",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>(DEPRECATED) This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to ''LoggedIn'', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        },
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "<p>Success-user created.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Summary of a user: identity, contact details, tenant, role assignments and lock state.</p>",
            "customType": "UserSummary",
            "schema": [
              {
                "name": "emailAddress",
                "kind": "required",
                "type": "string<email>",
                "description": "The user's email address.",
                "example": "example@example.com",
                "format": "email"
              },
              {
                "name": "id",
                "kind": "required",
                "type": "string<UUID>",
                "description": "Unique identifier for this user. If it is not provided a UUID will be allocated.",
                "format": "UUID"
              },
              {
                "name": "lock",
                "kind": "required",
                "type": "boolean",
                "description": "This indicates whether the user is currently locked out of the system.",
                "default": false
              },
              {
                "name": "login",
                "kind": "required",
                "type": "string",
                "description": "<p>The login (username) that is being requested for the user.</p>"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "<p>First, last, and (optional) middle names of the user.</p>"
              },
              {
                "name": "userRoles",
                "kind": "optional",
                "type": "object",
                "description": "<p>A map indexed by a tenant name listing all tenant-level roles and site-level roles.\nFor example:\n{\n\"tenant1\" : {\n\"roleIds\" : [\"some.role1\",\"some.role2\"],\nsites: {\n\"site1\": {\n\"roleIds\": [\"some.role3\",\"some.role4\"]\n},\n\"site2\": {\n\"roleIds\": [\"some.role4\",\"some.role6\"]\n}\n}\n},\n\"tenant2\" : {\n\"roleIds\" : [\"some.other.role1\",\"some.other.role2\"],\nsites: {\n\"site1\": {\n\"roleIds\": [\"some.other.role3\",\"some.other.role4\"]\n},\n\"site2\": {\n\"roleIds\": [\"some.other.role5\",\"some.other.role6\"]\n}\n}\n}\n}</p>",
                "example": "{\"tenant-name-1\":{\"roleIds\":[\"catalog.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[\"order.mgmt\"]},\"example-site-name-2\":{\"roleIds\":[\"order.mgmt\"]}}},\"tenant-name-2\":{\"roleIds\":[\"user.mgmt\"],\"sites\":{\"example-site-name-1\":{\"roleIds\":[]},\"example-site-name-2\":{\"roleIds\":[\"inventory.mgmt\"]}}}}",
                "modelRef": "#/components/schemas/UserRoles",
                "customType": "UserRoles",
                "schema": []
              },
              {
                "name": "phoneNumber",
                "kind": "optional",
                "type": "string",
                "description": "The contact phone number for this user."
              },
              {
                "name": "registrationDate",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "<p>The date/time on which this user was created.</p>",
                "format": "date-time"
              },
              {
                "name": "tenant",
                "kind": "required",
                "type": "string",
                "description": "This is the id of the tenant that this user is associated with."
              },
              {
                "name": "isPasswordAllowed",
                "kind": "optional",
                "type": "boolean",
                "description": "Indicates if the user is allowed to set a password or must use social authentication."
              }
            ],
            "modelRef": "#/components/schemas/UserSummary",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Details of a request that failed validation.",
            "customType": "ValidationErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Credentials are missing, expired or insufficient (HTTP 401).</p>",
            "customType": "UnauthorizedError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "<p>An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request is understood but refused (HTTP 403).</p>",
            "customType": "ForbiddenError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ForbiddenError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "The requested resource was not found in the NoChannel system.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The addressed resource does not exist (HTTP 404).</p>",
            "customType": "NotFoundError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFoundError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "The request conflicts with the current state of the resource.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request conflicts with existing state (HTTP 409).</p>",
            "customType": "ConflictError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ConflictError",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>The request failed for an unexpected reason (HTTP 500).</p>",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "8VO6igRzhZr8t2Cko6OfV",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/user \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data-raw '{\n     \"emailAddress\": \"example@example.com\",\n     \"login\": \"\",\n     \"name\": \"\",\n     \"password\": \"\",\n     \"roles\": \"\",\n     \"tenant\": \"\"\n     }'"
        },
        {
          "id": "Gd5MyQfU1ZRvBfR2rgANH",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify({\n   \"emailAddress\": \"example@example.com\",\n   \"login\": \"\",\n   \"name\": \"\",\n   \"password\": \"\",\n   \"roles\": \"\",\n   \"tenant\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/user\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "O5QHPNgAklVJ2a0OFGkZZ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/user\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump({\n   \"emailAddress\": \"example@example.com\",\n   \"login\": \"\",\n   \"name\": \"\",\n   \"password\": \"\",\n   \"roles\": \"\",\n   \"tenant\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qHndpt0Mw3OgH3DZHVwO0",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/user\"\n\npayload = json.dumps({\n   \"emailAddress\": \"example@example.com\",\n   \"login\": \"\",\n   \"name\": \"\",\n   \"password\": \"\",\n   \"roles\": \"\",\n   \"tenant\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "8VO6igRzhZr8t2Cko6OfV"
    },
    "results": {
      "languages": [
        {
          "id": "dLtDqhBlBszMjbwno7Zj6",
          "language": "201",
          "code": "// Success-user created.\n{\n  \"emailAddress\": \"example@example.com\",\n  \"id\": \"\",\n  \"lock\": false,\n  \"login\": \"\",\n  \"name\": \"\",\n  \"userRoles\": {},\n  \"phoneNumber\": \"\",\n  \"registrationDate\": \"\",\n  \"tenant\": \"\",\n  \"isPasswordAllowed\": false\n}"
        },
        {
          "id": "YaCitKknYYk-x-8zfJiFV",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": [\n    \"\"\n  ],\n  \"reason\": \"\"\n}"
        },
        {
          "id": "AgcpCmYL43zjueeVyIaGN",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint. It may be that they are expired or that the user's roles are insufficient.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "VO9Xb_Z1GwEXN91uzNify",
          "language": "403",
          "code": "// An update to this resource requires the if-match and if-unmodified-since headers to be sent in order to process the request.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "P0EpwE_w9jhIWqGQ1x2y2",
          "language": "404",
          "code": "// The requested resource was not found in the NoChannel system.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "Lqtnz94fDNwSL9A1JE4RO",
          "language": "409",
          "code": "// The request conflicts with the current state of the resource.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "dMDW8YtrgQMjVzOamHRPL",
          "language": "500",
          "code": "// Internal server error. The server encountered an unexpected condition that prevented it from fulfilling the request.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "dLtDqhBlBszMjbwno7Zj6"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}