---
title: Create user
slug: organization-api/create-user
docTags: 
createdAt: 2024-07-01T11:14:05.780Z
---

{
  "id": "_4q_9iAzwFi5ywEt093Mm",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/v2/scim/v2/Users",
    "servers": [
      {
        "url": "https://api.catenda.com/v2/scim/v2/Users"
      }
    ],
    "name": "Create user",
    "description": "Add a new SCIM user.\n\nCurrent user must be of organization type.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "active",
              "kind": "required",
              "type": "boolean",
              "description": "Active state of the user",
              "example": true
            },
            {
              "name": "emails",
              "kind": "required",
              "type": "array",
              "description": "List of emails for the user",
              "example": "",
              "itemType": "object",
              "customType": "object[]",
              "schema": [
                {
                  "name": "value",
                  "kind": "optional",
                  "type": "string",
                  "description": "Value of the email address",
                  "example": "user_name@example.com"
                },
                {
                  "name": "primary",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Whether is the primary email address for the user",
                  "example": true
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "Category of the email",
                  "example": "work"
                }
              ]
            },
            {
              "name": "externalId",
              "kind": "required",
              "type": "string",
              "description": "Identifier of the original source where the user data is taken from",
              "example": "user name"
            },
            {
              "name": "name",
              "kind": "required",
              "type": "object",
              "description": "Name object for the user",
              "example": "",
              "schema": [
                {
                  "name": "formatted",
                  "kind": "optional",
                  "type": "string",
                  "description": "Formatted representation of the user name",
                  "example": "user name"
                },
                {
                  "name": "familyName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The family name of the user",
                  "example": "name"
                },
                {
                  "name": "givenName",
                  "kind": "optional",
                  "type": "string",
                  "description": "The given name of the user",
                  "example": "user"
                }
              ]
            },
            {
              "name": "schemas",
              "kind": "required",
              "type": "array",
              "description": "List of schemas",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "urn:ietf:params:scim:schemas:core:2.0:User",
              "itemDefault": ""
            },
            {
              "name": "userName",
              "kind": "required",
              "type": "string",
              "description": "Human readable user name",
              "example": "user_name@example.com"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "scim-user",
            "schema": [
              {
                "name": "active",
                "kind": "optional",
                "type": "string",
                "description": "Active state of the user",
                "example": true
              },
              {
                "name": "schemas",
                "kind": "optional",
                "type": "array",
                "description": "List of schemas",
                "example": "[\"urn:ietf:params:scim:schemas:core:2.0:User\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "urn:ietf:params:scim:schemas:core:2.0:User",
                "itemDefault": ""
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "A unique identifier for the user, represented as compacted UUID using 32 hexadecimal characters",
                "example": "2819c223-7f76-453a-919d-413861904646"
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "Meta object for the user",
                "example": "",
                "schema": [
                  {
                    "name": "resourceType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Resource type",
                    "example": "User"
                  },
                  {
                    "name": "created",
                    "kind": "optional",
                    "type": "string",
                    "description": "The date and time the user was created in ISO 8601 format",
                    "example": "2011-08-01T18:29:49.793Z"
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string",
                    "description": "The date and time the user was last modified in ISO 8601 format",
                    "example": "2011-08-01T18:29:49.793Z"
                  },
                  {
                    "name": "location",
                    "kind": "optional",
                    "type": "string",
                    "description": "The location of the user",
                    "example": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646"
                  },
                  {
                    "name": "version",
                    "kind": "optional",
                    "type": "string",
                    "description": "The version of the user",
                    "example": "W\\/\\\"f250dd84f0671c3\\\""
                  }
                ]
              },
              {
                "name": "userName",
                "kind": "optional",
                "type": "string",
                "description": "Human readable user name",
                "example": "john_smith@example.com"
              },
              {
                "name": "externalId",
                "kind": "optional",
                "type": "string",
                "description": "Identifier of the original source where the user data is taken from",
                "example": "john_smith"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "object",
                "description": "Name object for the user",
                "example": "",
                "schema": [
                  {
                    "name": "formatted",
                    "kind": "optional",
                    "type": "string",
                    "description": "Formatted representation of the user name",
                    "example": "JohnSmith"
                  },
                  {
                    "name": "familyName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The family name of the user",
                    "example": "Smith"
                  },
                  {
                    "name": "givenName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The given name of the user",
                    "example": "John"
                  }
                ]
              },
              {
                "name": "emails",
                "kind": "optional",
                "type": "array",
                "description": "List of emails for the user",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "value",
                    "kind": "optional",
                    "type": "string",
                    "description": "Value of the email address",
                    "example": "john_smith@example.com"
                  },
                  {
                    "name": "primary",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether is the primary email address for the user",
                    "example": true
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Category of the email",
                    "example": "work"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/scim-user",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "XUuaDJjh-e7KsURgq7DQu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/v2/scim/v2/Users \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data-raw '{\n     \"active\": true,\n     \"emails\": [\n     {}\n     ],\n     \"externalId\": \"user name\",\n     \"name\": {},\n     \"schemas\": [],\n     \"userName\": \"user_name@example.com\"\n     }'"
        },
        {
          "id": "IzmLbErAGnGsl1AGDlU2G",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"active\": true,\n   \"emails\": [\n      {}\n   ],\n   \"externalId\": \"user name\",\n   \"name\": {},\n   \"schemas\": [],\n   \"userName\": \"user_name@example.com\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/v2/scim/v2/Users\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_q3cT4iBfgMXbeoF7bwUc",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/v2/scim/v2/Users\")\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.body = JSON.dump({\n   \"active\": true,\n   \"emails\": [\n      {}\n   ],\n   \"externalId\": \"user name\",\n   \"name\": {},\n   \"schemas\": [],\n   \"userName\": \"user_name@example.com\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "EvXgnNk2-YDU9dHQV3few",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/v2/scim/v2/Users\"\n\npayload = json.dumps({\n   \"active\": True,\n   \"emails\": [\n      {}\n   ],\n   \"externalId\": \"user name\",\n   \"name\": {},\n   \"schemas\": [],\n   \"userName\": \"user_name@example.com\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "XUuaDJjh-e7KsURgq7DQu"
    },
    "results": {
      "languages": [
        {
          "id": "-dB7S8o9SdXO4Yj4riS_B",
          "language": "200",
          "code": "// OK\n{\n  \"active\": true,\n  \"schemas\": [\n    \"urn:ietf:params:scim:schemas:core:2.0:User\"\n  ],\n  \"id\": \"2819c223-7f76-453a-919d-413861904646\",\n  \"meta\": {\n    \"resourceType\": \"User\",\n    \"created\": \"2011-08-01T18:29:49.793Z\",\n    \"lastModified\": \"2011-08-01T18:29:49.793Z\",\n    \"location\": \"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646\",\n    \"version\": \"W\\\\/\\\\\\\"f250dd84f0671c3\\\\\\\"\"\n  },\n  \"userName\": \"john_smith@example.com\",\n  \"externalId\": \"john_smith\",\n  \"name\": {\n    \"formatted\": \"JohnSmith\",\n    \"familyName\": \"Smith\",\n    \"givenName\": \"John\"\n  },\n  \"emails\": [\n    {\n      \"value\": \"john_smith@example.com\",\n      \"primary\": true,\n      \"type\": \"work\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "-dB7S8o9SdXO4Yj4riS_B"
    }
  },
  "children": [
    {
      "id": "QYV7zKqVqfGUrLfVp6L7v",
      "type": "paragraph",
      "children": [
        {
          "text": "Add a new SCIM user."
        }
      ]
    },
    {
      "id": "vE4VICY7BwlMv4IH1kjDw",
      "type": "paragraph",
      "children": [
        {
          "text": "Current user must be of organization type."
        }
      ]
    }
  ]
}