> ## Documentation Index
> Fetch the complete documentation index at: https://docs.attio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a SCIM user

> Creates a SCIM user in the workspace. For verified domains the user is added as an active member immediately. For unverified domains an invite is sent and the invite ID is returned as the SCIM user ID.

Required scopes: `user_management:read-write`.

<h4 style={{borderBottom:"none"}}>Authorizations</h4>

<ParamField header="Authorization" type="string" required>
  This API uses OAuth 2.0 with the authorization code grant flow.
</ParamField>

<div style={{display:"flex",justifyContent:"space-between",alignItems:"center"}}><h4 style={{borderBottom:"none",margin:"0"}}>Body</h4><span style={{fontSize:"0.75rem",fontWeight:"400",color:"#9ca3af"}}>application/json</span></div>

<ParamField body="schemas" type="string[]" required>
  Must include `"urn:ietf:params:scim:schemas:core:2.0:User"`.
</ParamField>

<ParamField body="userName" type="string" required>
  The user's email address.
</ParamField>

<ParamField body="name" type="object">
  <Expandable title="name">
    <ParamField body="givenName" type="string">
      The user's first name.
    </ParamField>

    <ParamField body="familyName" type="string">
      The user's last name.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="active" type="boolean" default="true">
  Whether the user should be active. Setting to `false` creates a suspended member (only applies to verified domains).
</ParamField>

<ParamField body="appRole" type="string">
  The user's role in the workspace. Must be `"admin"` or `"member"`. Defaults to `"member"` if not specified.
</ParamField>

<h4 style={{borderBottom:"none"}}>Response</h4>

<ResponseField name="schemas" type="string[]">
  Always `["urn:ietf:params:scim:schemas:core:2.0:User"]`.
</ResponseField>

<ResponseField name="id" type="string">
  The workspace membership ID, or the workspace invite ID for unverified domains.
</ResponseField>

<ResponseField name="userName" type="string">
  The user's email address.
</ResponseField>

<ResponseField name="name" type="object">
  <Expandable title="name">
    <ResponseField name="givenName" type="string">
      The user's first name.
    </ResponseField>

    <ResponseField name="familyName" type="string">
      The user's last name.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="emails" type="object[]">
  <Expandable title="emails[]">
    <ResponseField name="value" type="string">
      The email address.
    </ResponseField>

    <ResponseField name="primary" type="boolean">
      Whether this is the primary email address.
    </ResponseField>

    <ResponseField name="type" type="string">
      Always `"work"`.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="active" type="boolean">
  Whether the user is active. Pending invites always return `true`.
</ResponseField>

<ResponseField name="appRole" type="string">
  The user's role: `"admin"` or `"member"`. Not present for suspended users.
</ResponseField>

<ResponseField name="meta" type="object">
  <Expandable title="meta">
    <ResponseField name="resourceType" type="string">
      Always `"User"`.
    </ResponseField>

    <ResponseField name="created" type="string">
      ISO 8601 timestamp of when the user was created.
    </ResponseField>

    <ResponseField name="lastModified" type="string">
      ISO 8601 timestamp of when the user was last modified.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```json theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "userName": "john.doe@example.com",
    "name": {
      "givenName": "John",
      "familyName": "Doe"
    },
    "appRole": "member",
    "active": true
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={"system"}
  {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "3a8f5b2c-9e14-4d7a-b832-1c6f85d90e47",
    "userName": "john.doe@example.com",
    "name": {
      "givenName": "John",
      "familyName": "Doe"
    },
    "emails": [
      {
        "value": "john.doe@example.com",
        "primary": true,
        "type": "work"
      }
    ],
    "appRole": "member",
    "active": true,
    "meta": {
      "resourceType": "User",
      "created": "2024-01-01T00:00:00.000Z",
      "lastModified": "2024-01-01T00:00:00.000Z"
    }
  }
  ```
</ResponseExample>
