<!-- llms.txt: https://workos.com/llms.txt -->

# User

Represents a user identity in your application. A user can sign up in your application directly with a method like password, or they can be [JIT-provisioned](https://workos.com/docs/authkit/jit-provisioning) through an organization's SSO connection.

Users may belong to [organizations](https://workos.com/docs/reference/organization) as members.

See the [events reference](https://workos.com/docs/events/user) documentation for the user events.

## Delete an authorized application

Delete an existing Authorized Connect Application.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request DELETE \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications/conn_app_01HXYZ123456789ABCDEFGHIJ" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.delete_user_authorized_application(
  application_id: "conn_app_01HXYZ123456789ABCDEFGHIJ",
  user_id: "user_01E4ZCR3C56J083X43JQXF3JK5"
)
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.delete_user_authorized_application(
    application_id="conn_app_01HXYZ123456789ABCDEFGHIJ",
    user_id="user_01E4ZCR3C56J083X43JQXF3JK5",
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().DeleteAuthorizedApplication(context.Background(), "conn_app_01HXYZ123456789ABCDEFGHIJ", "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->deleteUserAuthorizedApplication(
        applicationId: "conn_app_01HXYZ123456789ABCDEFGHIJ",
        userId: "user_01E4ZCR3C56J083X43JQXF3JK5",
    );
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.deleteUserAuthorizedApplication(
    "conn_app_01HXYZ123456789ABCDEFGHIJ", "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.DeleteAuthorizedApplicationAsync("conn_app_01HXYZ123456789ABCDEFGHIJ",
                                                             "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .delete_user_authorized_application(
            "conn_app_01HXYZ123456789ABCDEFGHIJ",
            "user_01E4ZCR3C56J083X43JQXF3JK5"
        )
        .await?;

    Ok(())
}
```

:::

## List authorized applications

Get a list of all Connect applications that the user has authorized.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.list_user_authorized_applications(user_id: "user_01E4ZCR3C56J083X43JQXF3JK5")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.list_user_authorized_applications(
    user_id="user_01E4ZCR3C56J083X43JQXF3JK5"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().ListAuthorizedApplications(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->listUserAuthorizedApplications(userId: "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.listUserAuthorizedApplications("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.ListAuthorizedApplicationsAsync("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .list_user_authorized_applications("user_01E4ZCR3C56J083X43JQXF3JK5")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "list",
  "data": [
    {
      "object": "authorized_connect_application",
      "id": "authorized_connect_app_01HXYZ123456789ABCDEFGHIJ",
      "granted_scopes": [
        "openid",
        "profile",
        "email"
      ],
      "oauth_resource": "https://api.example.com/resource",
      "application": {
        "application_type": "oauth",
        "redirect_uris": [
          {
            "uri": "https://example.com/callback",
            "default": true
          }
        ],
        "uses_pkce": true,
        "is_first_party": true,
        "object": "connect_application",
        "id": "conn_app_01HXYZ123456789ABCDEFGHIJ",
        "client_id": "client_01HXYZ123456789ABCDEFGHIJ",
        "description": "An application for managing user access",
        "name": "My Application",
        "scopes": [
          "openid",
          "profile",
          "email"
        ],
        "created_at": "2026-01-15T12:00:00.000Z",
        "updated_at": "2026-01-15T12:00:00.000Z"
      }
    }
  ],
  "list_metadata": {
    "before": "authorized_connect_app_01HXYZ123456789ABCDEFGHIJ",
    "after": "authorized_connect_app_01HXYZ987654321KJIHGFEDCBA"
  }
}
```

:::

## Confirm email change

Confirms an email change using the one-time code received by the user.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_change/confirm" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "code": "123456"
    }
BODY
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.confirm_email_change(
  id: "user_01E4ZCR3C56J083X43JQXF3JK5",
  code: "123456"
)
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.confirm_email_change(
    id_="user_01E4ZCR3C56J083X43JQXF3JK5", code="123456"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().ConfirmEmailChange(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5", &workos.UserManagementConfirmEmailChangeParams{
		Code: "123456",
	})
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->confirmEmailChange(id: "user_01E4ZCR3C56J083X43JQXF3JK5", code: "123456");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;
import com.workos.usermanagement.UserManagementApi.ConfirmEmailChangeOptions;

WorkOS workos = new WorkOS("sk_example_123456789");

ConfirmEmailChangeOptions options =
    ConfirmEmailChangeOptions.builder().code("123456").build();

workos.userManagement.confirmEmailChange("user_01E4ZCR3C56J083X43JQXF3JK5", options);
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.ConfirmEmailChangeAsync("user_01E4ZCR3C56J083X43JQXF3JK5",
                                                    new UserManagementConfirmEmailChangeOptions {
                                                        Code = "123456",
                                                    });
```

```rust language="rust" title="Request" tab="1"
use workos::Client;
use workos::user_management::ConfirmEmailChangeParams;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .confirm_email_change(
            "user_01E4ZCR3C56J083X43JQXF3JK5",
            ConfirmEmailChangeParams {
                code: "123456".into(),
                ..Default::default()
            }
        )
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "email_change_confirmation",
  "user": {
    "object": "user",
    "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
    "first_name": "Marcelina",
    "last_name": "Davis",
    "name": "Marcelina Davis",
    "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
    "email": "new.email@example.com",
    "email_verified": true,
    "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
    "metadata": {
      "timezone": "America/New_York"
    },
    "last_sign_in_at": "2025-06-25T19:07:33.155Z",
    "locale": "en-US",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z"
  }
}
```

:::

## Create a user

Create a new user in the current environment.

:::code-group{title="Request"}

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/user_management/users" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "email": "marcelina.davis@example.com",
        "password": "i8uv6g34kd490s",
        "first_name": "Marcelina",
        "last_name": "Davis",
        "email_verified": false
    }
BODY
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const user = await workos.userManagement.createUser({
  email: 'marcelina@example.com',
  password: 'i8uv6g34kd490s',
  firstName: 'Marcelina',
  lastName: 'Davis',
});
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.create_user(email: "marcelina.davis@example.com")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.create_user(email="marcelina.davis@example.com")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().Create(context.Background(), &workos.UserManagementCreateParams{
		Email: "marcelina.davis@example.com",
	})
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->userManagement()->createUser(email: "marcelina.davis@example.com");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;
import com.workos.usermanagement.UserManagementApi.CreateUserOptions;

WorkOS workos = new WorkOS("sk_example_123456789");

CreateUserOptions options =
    CreateUserOptions.builder().email("marcelina.davis@example.com").build();

workos.userManagement.createUser(options);
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.CreateAsync(new UserManagementCreateOptions {
    Email = "marcelina.davis@example.com",
});
```

```rust language="rust" title="Request" tab="1"
use workos::Client;
use workos::user_management::CreateUserParams;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .create_user(
            CreateUserParams {
                email: "marcelina.davis@example.com".into(),
                ..Default::default()
            }
        )
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "user",
  "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "first_name": "Marcelina",
  "last_name": "Davis",
  "name": "Marcelina Davis",
  "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
  "email": "marcelina.davis@example.com",
  "email_verified": true,
  "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
  "metadata": {
    "timezone": "America/New_York"
  },
  "last_sign_in_at": "2025-06-25T19:07:33.155Z",
  "locale": "en-US",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z",
  "radar_auth_attempt_id": "radar_auth_attempt_01HXYZ123456789ABCDEFGHIJ"
}
```

:::

## Delete a user

Permanently deletes a user in the current environment. It cannot be undone.

:::code-group{title="Request"}

```bash language="curl"
curl --request DELETE \
  --url https://api.workos.com/user_management/users/user_01F3GZ5ZGZBZVQGZVHJFVXZJGZ \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

await workos.userManagement.deleteUser('user_01F3GZ5ZGZBZVQGZVHJFVXZJGZ');
```

```rb language="ruby"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.delete_user(id: "user_01E4ZCR3C56J083X43JQXF3JK5")
```

```py language="python"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.delete_user(id_="user_01E4ZCR3C56J083X43JQXF3JK5")
```

```go language="go"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().Delete(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->userManagement()->deleteUser(id: "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```java language="java"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.deleteUser("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.DeleteAsync("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .delete_user("user_01E4ZCR3C56J083X43JQXF3JK5")
        .await?;

    Ok(())
}
```

:::

## Verify email

Verifies an email address using the one-time code received by the user.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_verification/confirm" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "code": "123456"
    }
BODY
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.verify_email(
  id: "user_01E4ZCR3C56J083X43JQXF3JK5",
  code: "123456"
)
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.verify_email(
    id_="user_01E4ZCR3C56J083X43JQXF3JK5", code="123456"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().VerifyEmail(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5", &workos.UserManagementVerifyEmailParams{
		Code: "123456",
	})
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->verifyEmail(id: "user_01E4ZCR3C56J083X43JQXF3JK5", code: "123456");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;
import com.workos.usermanagement.UserManagementApi.VerifyEmailOptions;

WorkOS workos = new WorkOS("sk_example_123456789");

VerifyEmailOptions options = VerifyEmailOptions.builder().code("123456").build();

workos.userManagement.verifyEmail("user_01E4ZCR3C56J083X43JQXF3JK5", options);
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.VerifyEmailAsync("user_01E4ZCR3C56J083X43JQXF3JK5", new UserManagementVerifyEmailOptions {
    Code = "123456",
});
```

```rust language="rust" title="Request" tab="1"
use workos::Client;
use workos::user_management::VerifyEmailParams;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .verify_email(
            "user_01E4ZCR3C56J083X43JQXF3JK5",
            VerifyEmailParams {
                code: "123456".into(),
                ..Default::default()
            }
        )
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "user": {
    "object": "user",
    "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
    "first_name": "Marcelina",
    "last_name": "Davis",
    "name": "Marcelina Davis",
    "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
    "email": "marcelina.davis@example.com",
    "email_verified": true,
    "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
    "metadata": {
      "timezone": "America/New_York"
    },
    "last_sign_in_at": "2025-06-25T19:07:33.155Z",
    "locale": "en-US",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z"
  }
}
```

:::

## Get a user by external ID

Get the details of an existing user by an [external identifier](https://workos.com/docs/authkit/metadata/external-identifiers).

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/user_management/users/external_id/f1ffa2b2-c20b-4d39-be5c-212726e11222" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const user = await workos.userManagement.getUserByExternalId(
  'f1ffa2b2-c20b-4d39-be5c-212726e11222',
);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.get_user_by_external_id(external_id: "f1ffa2b2-c20b-4d39-be5c-212726e11222")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.get_user_by_external_id(
    external_id="f1ffa2b2-c20b-4d39-be5c-212726e11222"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().GetByExternalID(context.Background(), "f1ffa2b2-c20b-4d39-be5c-212726e11222")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->getUserByExternalId(externalId: "f1ffa2b2-c20b-4d39-be5c-212726e11222");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.getUserByExternalId("f1ffa2b2-c20b-4d39-be5c-212726e11222");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.GetByExternalIdAsync("f1ffa2b2-c20b-4d39-be5c-212726e11222");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .get_user_by_external_id("f1ffa2b2-c20b-4d39-be5c-212726e11222")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "user",
  "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "first_name": "Marcelina",
  "last_name": "Davis",
  "name": "Marcelina Davis",
  "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
  "email": "marcelina.davis@example.com",
  "email_verified": true,
  "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
  "metadata": {
    "timezone": "America/New_York"
  },
  "last_sign_in_at": "2025-06-25T19:07:33.155Z",
  "locale": "en-US",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## Get a user

Get the details of an existing user.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const user = await workos.userManagement.getUser(
  'user_01E4ZCR3C56J083X43JQXF3JK5',
);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.get_user(id: "user_01E4ZCR3C56J083X43JQXF3JK5")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.get_user(id_="user_01E4ZCR3C56J083X43JQXF3JK5")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().Get(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->userManagement()->getUser(id: "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.getUser("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.GetAsync("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .get_user("user_01E4ZCR3C56J083X43JQXF3JK5")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "user",
  "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "first_name": "Marcelina",
  "last_name": "Davis",
  "name": "Marcelina Davis",
  "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
  "email": "marcelina.davis@example.com",
  "email_verified": true,
  "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
  "metadata": {
    "timezone": "America/New_York"
  },
  "last_sign_in_at": "2025-06-25T19:07:33.155Z",
  "locale": "en-US",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## List users

Get a list of all of your existing users matching the criteria specified.

:::code-group

```bash language="curl" title="Request" tab="1"
curl "https://api.workos.com/user_management/users" \
  --header "Authorization: Bearer sk_example_123456789"
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const users = await workos.userManagement.listUsers();

console.log(users.data);
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.list_users
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.list_users()
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().List(context.Background())
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->userManagement()->listUsers();
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.listUsers();
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.ListAsync();
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .list_users()
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "list",
  "data": [
    {
      "object": "user",
      "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
      "first_name": "Marcelina",
      "last_name": "Davis",
      "name": "Marcelina Davis",
      "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
      "email": "marcelina.davis@example.com",
      "email_verified": true,
      "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
      "metadata": {
        "timezone": "America/New_York"
      },
      "last_sign_in_at": "2025-06-25T19:07:33.155Z",
      "locale": "en-US",
      "created_at": "2026-01-15T12:00:00.000Z",
      "updated_at": "2026-01-15T12:00:00.000Z"
    }
  ],
  "list_metadata": {
    "before": "user_01HXYZ123456789ABCDEFGHIJ",
    "after": "user_01HXYZ987654321KJIHGFEDCBA"
  }
}
```

:::

## Send email change code

Sends an email that contains a one-time code used to change a user's email address.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_change/send" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "new_email": "new.email@example.com"
    }
BODY
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.send_email_change(
  id: "user_01E4ZCR3C56J083X43JQXF3JK5",
  new_email: "new.email@example.com"
)
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.send_email_change(
    id_="user_01E4ZCR3C56J083X43JQXF3JK5", new_email="new.email@example.com"
)
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().SendEmailChange(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5", &workos.UserManagementSendEmailChangeParams{
		NewEmail: "new.email@example.com",
	})
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->sendEmailChange(
        id: "user_01E4ZCR3C56J083X43JQXF3JK5",
        newEmail: "new.email@example.com",
    );
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;
import com.workos.usermanagement.UserManagementApi.SendEmailChangeOptions;

WorkOS workos = new WorkOS("sk_example_123456789");

SendEmailChangeOptions options =
    SendEmailChangeOptions.builder().newEmail("new.email@example.com").build();

workos.userManagement.sendEmailChange("user_01E4ZCR3C56J083X43JQXF3JK5", options);
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.SendEmailChangeAsync("user_01E4ZCR3C56J083X43JQXF3JK5",
                                                 new UserManagementSendEmailChangeOptions {
                                                     NewEmail = "new.email@example.com",
                                                 });
```

```rust language="rust" title="Request" tab="1"
use workos::Client;
use workos::user_management::SendEmailChangeParams;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .send_email_change(
            "user_01E4ZCR3C56J083X43JQXF3JK5",
            SendEmailChangeParams {
                new_email: "new.email@example.com".into(),
                ..Default::default()
            }
        )
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "email_change",
  "user": {
    "object": "user",
    "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
    "first_name": "Marcelina",
    "last_name": "Davis",
    "name": "Marcelina Davis",
    "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
    "email": "marcelina.davis@example.com",
    "email_verified": true,
    "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
    "metadata": {
      "timezone": "America/New_York"
    },
    "last_sign_in_at": "2025-06-25T19:07:33.155Z",
    "locale": "en-US",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z"
  },
  "new_email": "new.email@example.com",
  "expires_at": "2026-01-15T12:00:00.000Z",
  "created_at": "2026-01-15T12:00:00.000Z"
}
```

:::

## Send verification email

Sends an email that contains a one-time code used to verify a user's email address.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request POST \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_verification/send" \
  --header "Authorization: Bearer sk_example_123456789"
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.send_verification_email(id: "user_01E4ZCR3C56J083X43JQXF3JK5")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.send_verification_email(id_="user_01E4ZCR3C56J083X43JQXF3JK5")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().SendVerificationEmail(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos
    ->userManagement()
    ->sendVerificationEmail(id: "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.sendVerificationEmail("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.SendVerificationEmailAsync("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .send_verification_email("user_01E4ZCR3C56J083X43JQXF3JK5")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "user": {
    "object": "user",
    "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
    "first_name": "Marcelina",
    "last_name": "Davis",
    "name": "Marcelina Davis",
    "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
    "email": "marcelina.davis@example.com",
    "email_verified": true,
    "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
    "metadata": {
      "timezone": "America/New_York"
    },
    "last_sign_in_at": "2025-06-25T19:07:33.155Z",
    "locale": "en-US",
    "created_at": "2026-01-15T12:00:00.000Z",
    "updated_at": "2026-01-15T12:00:00.000Z"
  }
}
```

:::

## Update a user

Updates properties of a user. The omitted properties will be left unchanged.

:::code-group

```bash language="curl" title="Request" tab="1"
curl --request PUT \
  --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5" \
  --header "Authorization: Bearer sk_example_123456789" \
  --header "Content-Type: application/json" \
  -d @- <<'BODY'
    {
        "first_name": "Marcelina",
        "last_name": "Davis",
        "email_verified": true,
        "external_id": "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191",
        "metadata": {
            "timezone": "America/New_York"
        },
        "locale": "en-US"
    }
BODY
```

```js language="js" title="Request" tab="1"
import { WorkOS } from '@workos-inc/node';

const workos = new WorkOS('sk_example_123456789');

const user = await workos.userManagement.updateUser({
  userId: 'user_01EHQ7ZGZ2CZVQJGZ5ZJZ1ZJGZ',
  firstName: 'Marcelina',
  lastName: 'Davis',
  emailVerified: true,
  externalId: '2fe01467-f7ea-4dd2-8b79-c2b4f56d0191',
  metadata: {
    timezone: 'America/New_York',
  },
});
```

```rb language="ruby" title="Request" tab="1"
require "workos"

WorkOS.configure do |config|
  config.api_key = "sk_example_123456789"
end

WorkOS.client.user_management.update_user(id: "user_01E4ZCR3C56J083X43JQXF3JK5")
```

```py language="python" title="Request" tab="1"
from workos import WorkOSClient

client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789")

client.user_management.update_user(id_="user_01E4ZCR3C56J083X43JQXF3JK5")
```

```go language="go" title="Request" tab="1"
package main

import (
	"context"

	"github.com/workos/workos-go/v10"
)

func main() {
	client := workos.NewClient("sk_example_123456789")

	_, err := client.UserManagement().Update(context.Background(), "user_01E4ZCR3C56J083X43JQXF3JK5")
	if err != nil {
		panic(err)
	}
}
```

```php language="php" title="Request" tab="1"
<?php

use WorkOS\WorkOS;

$workos = new WorkOS(
    apiKey: "sk_example_123456789",
    clientId: "client_123456789",
);

$workos->userManagement()->updateUser(id: "user_01E4ZCR3C56J083X43JQXF3JK5");
```

```java language="java" title="Request" tab="1"
import com.workos.WorkOS;

WorkOS workos = new WorkOS("sk_example_123456789");

workos.userManagement.updateUser("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```cs language="dotnet" title="Request" tab="1"
using WorkOS;

var client = new WorkOSClient(new WorkOSOptions {
    ApiKey = "sk_example_123456789",
    ClientId = "client_123456789",
});

await client.UserManagement.UpdateAsync("user_01E4ZCR3C56J083X43JQXF3JK5");
```

```rust language="rust" title="Request" tab="1"
use workos::Client;

#[tokio::main]
async fn main() -> Result<(), workos::Error> {
    let client = Client::builder()
        .api_key("sk_example_123456789")
        .client_id("client_123456789")
        .build();

    let _result = client
        .user_management()
        .update_user("user_01E4ZCR3C56J083X43JQXF3JK5")
        .await?;

    Ok(())
}
```

```json language="json" title="Response" tab="2"
{
  "object": "user",
  "id": "user_01E4ZCR3C56J083X43JQXF3JK5",
  "first_name": "Marcelina",
  "last_name": "Davis",
  "name": "Marcelina Davis",
  "profile_picture_url": "https://workoscdn.com/images/v1/123abc",
  "email": "marcelina.davis@example.com",
  "email_verified": true,
  "external_id": "f1ffa2b2-c20b-4d39-be5c-212726e11222",
  "metadata": {
    "timezone": "America/New_York"
  },
  "last_sign_in_at": "2025-06-25T19:07:33.155Z",
  "locale": "en-US",
  "created_at": "2026-01-15T12:00:00.000Z",
  "updated_at": "2026-01-15T12:00:00.000Z"
}
```

:::

### userland_user

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | "user" | Yes | Distinguishes the user object. |
| `id` | string | Yes | The unique ID of the user. |
| `first_name` | string | No | The first name of the user. |
| `last_name` | string | No | The last name of the user. |
| `name` | string | No | The user's full name. |
| `profile_picture_url` | string | No | A URL reference to an image representing the user. |
| `email` | string | Yes | The email address of the user. |
| `email_verified` | boolean | Yes | Whether the user's email has been verified. |
| `external_id` | string | No | The external ID of the user. |
| `metadata` | object | No | Object containing metadata key/value pairs associated with the user. |
| `last_sign_in_at` | string | No | The timestamp when the user last signed in. |
| `locale` | string | No | The user's preferred locale. |
| `created_at` | string | Yes | An ISO 8601 timestamp. |
| `updated_at` | string | Yes | An ISO 8601 timestamp. |

### DELETE /user_management/users/{user_id}/authorized_applications/{application_id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `application_id` | string | Yes | The ID or client ID of the application. |
| `user_id` | string | Yes | The ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `empty` | empty | Returns an empty response on success. |

### GET /user_management/users/{user_id}/authorized_applications

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `user_id` | string | Yes | The ID of the user. |
| `before` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. |
| `after` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. |
| `limit` | integer | No | Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`. |
| `order` | "normal" \| "desc" \| "asc" | No | Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `normal`. |

### POST /user_management/users/{id}/email_change/confirm

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | The one-time code used to confirm the email change. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `email_change_confirmation` | object | Distinguishes the email change confirmation object. |

### POST /user_management/users

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | Yes | The email address of the user. |
| `first_name` | string | No | The first name of the user. |
| `last_name` | string | No | The last name of the user. |
| `name` | string | No | The user's full name. |
| `email_verified` | boolean | No | Whether the user's email address was previously verified. You should normally use the [email verification flow](/reference/authkit/authentication/email-verification) to verify a user's email address. However, if the user's email was previously verified, or is being migrated from an existing user store, this can be set to `true` to mark it as already verified. |
| `metadata` | object | No | Object containing [metadata](/authkit/metadata) key/value pairs associated with the user. |
| `external_id` | string | No | The [external identifier](/authkit/metadata/external-identifiers) of the user. |
| `ip_address` | string | No | The IP address of the user's request. |
| `user_agent` | string | No | The user agent string from the user's request. |
| `signals_id` | string | No | An optional Radar signals ID to correlate client-side signals with this request. |
| `password` | string | No | The password to set for the user. |
| `password_hash` | string | No | The hashed password to set for the user. Mutually exclusive with `password`. |
| `password_hash_type` | "bcrypt" \| "firebase-scrypt" \| "ssha" \| ... | No | The algorithm originally used to hash the password, used when providing a `password_hash`. Valid values are `bcrypt`, `scrypt`, `firebase-scrypt`, `ssha`, `ssha256`, `pbkdf2`, and `argon2`. See the [Firebase Migration guide](/migrate/firebase) for an example of how to format the `password_hash` when importing `firebase-scrypt` passwords. |
| `password_salt_position` | "prefix" \| "suffix" | No | The position of the salt relative to the password when the `password_hash` digest was computed: `prefix` for `sha256(salt + password)` or `suffix` for `sha256(password + salt)`. Only supported with the `ssha256` hash type and only valid when a `password_hash` is provided. Defaults to `suffix`. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | Distinguishes the user object. |

### DELETE /user_management/users/{id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the user. |

### POST /user_management/users/{id}/email_verification/confirm

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | Yes | The one-time email verification code. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | The user whose email was verified. |

### GET /user_management/users/external_id/{external_id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `external_id` | string | Yes | The external ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | Distinguishes the user object. |

### GET /user_management/users/{id}

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | Distinguishes the user object. |

### GET /user_management/users

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `before` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. |
| `after` | string | No | An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. |
| `limit` | integer | No | Upper limit on the number of objects to return, between `1` and `100`. Defaults to `10`. |
| `order` | "normal" \| "desc" \| "asc" | No | Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `desc`. |
| `organization` | string | No | Filter users by the organization they are a member of. Deprecated in favor of `organization_id`. |
| `organization_id` | string | No | Filter users by the organization they are members of. |
| `email` | string | No | Filter users by their email. |

### POST /user_management/users/{id}/email_change/send

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `new_email` | string | Yes | The new email address to change to. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `email_change` | object | Distinguishes the email change object. |

### POST /user_management/users/{id}/email_verification/send

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | The user to whom the verification email was sent. |

### PUT /user_management/users/{id}

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string | No | The user's email address. Changing a user's email will set `email_verified` to false. [Identities](/reference/authkit/identity) that do not match the new email will be unlinked. |
| `first_name` | string | No | The user's first name. |
| `last_name` | string | No | The user's last name. |
| `name` | string | No | The user's full name. |
| `email_verified` | boolean | No | Whether the user's email address was previously verified. You should normally use the [email verification flow](/reference/authkit/authentication/email-verification) to verify a user's email address. However, if the user's email was previously verified, or is being migrated from an existing user store, this can be set to `true` to mark it as already verified. |
| `metadata` | object | No | Object containing [metadata](/authkit/metadata) key/value pairs associated with the user. |
| `external_id` | string | No | The [external identifier](/authkit/metadata/external-identifiers) of the user. |
| `locale` | string | No | The user's preferred locale. |
| `password` | string | No | The password to set for the user. Mutually exclusive with `password_hash`, `password_hash_type`, and `password_salt_position`. |
| `password_hash` | string | No | The hashed password to set for the user. Required with `password_hash_type`. Mutually exclusive with `password`. |
| `password_hash_type` | "bcrypt" \| "firebase-scrypt" \| "ssha" \| ... | No | The algorithm originally used to hash the password, used when providing a `password_hash`. Required with `password_hash`. Mutually exclusive with `password`. |
| `password_salt_position` | "prefix" \| "suffix" | No | The position of the salt relative to the password when the `password_hash` digest was computed: `prefix` for `hash(salt + password)` or `suffix` for `hash(password + salt)`. Only supported with the `ssha256` hash type and only valid when a `password_hash` is provided. Defaults to `suffix`. Mutually exclusive with `password`. |

#### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The unique ID of the user. |

#### Returns

| Field | Type | Description |
| --- | --- | --- |
| `user` | object | Distinguishes the user object. |