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 through an organization’s SSO connection.
Users may belong to organizations as members.
See the events reference documentation for the user events.
Get the details of an existing user.
curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" }
| curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| import { WorkOS } from '@workos-inc/node'; | |
| const workos = new WorkOS('sk_example_123456789'); | |
| const user = await workos.userManagement.getUser( | |
| 'user_01E4ZCR3C56J083X43JQXF3JK5', | |
| ); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| user = WorkOS::UserManagement.get_user( | |
| id: "user_01E4ZCR3C56J083X43JQXF3JK5" | |
| ) |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| user = workos_client.user_management.get_user(user_id="user_01E4ZCR3C56J083X43JQXF3JK5") |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v2/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| user, err := usermanagement.GetUser( | |
| context.Background(), | |
| usermanagement.GetUserOpts{ | |
| User: "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| }, | |
| ) | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| $user = $userManagement->getUser("user_01E4ZCR3C56J083X43JQXF3JK5"); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.models.User; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| User user = workos.userManagement.getUser("user_01E4ZCR3C56J083X43JQXF3JK5"); |
| { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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/user_management /users /:idParameters Returns Get the details of an existing user by an external identifier.
curl "https://api.workos.com/user_management/users/external_id/f1ffa2b2-c20b-4d39-be5c-212726e11222" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" }
| curl "https://api.workos.com/user_management/users/external_id/f1ffa2b2-c20b-4d39-be5c-212726e11222" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| import { WorkOS } from '@workos-inc/node'; | |
| const workos = new WorkOS('sk_example_123456789'); | |
| const user = await workos.userManagement.getUserByExternalId( | |
| 'f1ffa2b2-c20b-4d39-be5c-212726e11222', | |
| ); |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| user = workos_client.user_management.get_user_by_external_id( | |
| external_id="f1ffa2b2-c20b-4d39-be5c-212726e11222" | |
| ) |
| { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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/user_management /users /external_id /:external_idParameters Returns Get a list of all of your existing users matching the criteria specified.
curl "https://api.workos.com/user_management/users" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "list", "data": [ { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" } }
| curl "https://api.workos.com/user_management/users" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| import { WorkOS } from '@workos-inc/node'; | |
| const workos = new WorkOS('sk_example_123456789'); | |
| const users = await workos.userManagement.listUsers(); | |
| console.log(users.data); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| users = WorkOS::UserManagement.list_users |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| users = workos_client.user_management.list_users() |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v2/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| users, err := usermanagement.ListUsers( | |
| context.Background(), | |
| usermanagement.ListUsersOpts{}, | |
| ) | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| [$before, $after, $users] = $userManagement->listUsers(); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.models.Users; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| Users users = workos.userManagement.listUsers(); |
| { | |
| "object": "list", | |
| "data": [ | |
| { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } | |
| } |
GET/user_management /usersParameters Returns objectCreate a new user in the current environment.
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
{ "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" }
| 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 |
| 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', | |
| }); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| user = WorkOS::UserManagement.create_user( | |
| email: "marcelina@example.com", | |
| first_name: "Marcelina", | |
| last_name: "Davis", | |
| password: "i8uv6g34kd490s" | |
| ) |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| create_user_payload = { | |
| "email": "marcelina@example.com", | |
| "password": "i8uv6g34kd490s", | |
| "first_name": "Marcelina", | |
| "last_name": "Davis", | |
| } | |
| user = workos_client.user_management.create_user(**create_user_payload) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v4/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| user, err := usermanagement.CreateUser( | |
| context.Background(), | |
| usermanagement.CreateUserOpts{ | |
| Email: "marcelina@example.com", | |
| Password: "i8uv6g34kd490s", | |
| FirstName: "Marcelina", | |
| LastName: "Davis", | |
| }, | |
| ) | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| $user = $userManagement->createUser( | |
| "marcelina@example.com", | |
| "i8uv6g34kd490s", | |
| "Marcelina", | |
| "Davis" | |
| ); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.builders.CreateUserOptionsBuilder; | |
| import com.workos.usermanagement.models.User; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| User user = | |
| workos.userManagement.createUser(new CreateUserOptionsBuilder("marcelina@example.com") | |
| .firstName("Marcelina") | |
| .lastName("Davis") | |
| .password("i8uv6g34kd490s") | |
| .build()); |
| { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } |
POST/user_management /usersReturns Updates properties of a user. The omitted properties will be left unchanged.
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
{ "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" }
| 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 |
| 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', | |
| }, | |
| }); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| users = WorkOS::UserManagement.update_user( | |
| id: "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| first_name: "Marcelina", | |
| last_name: "Davis" | |
| ) |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| update_user_payload = { | |
| "first_name": "Marcelina", | |
| "last_name": "Davis", | |
| "email_verified": True, | |
| } | |
| user = workos_client.user_management.update_user( | |
| user_id="user_01EHQ7ZGZ2CZVQJGZ5ZJZ1ZJGZ", | |
| **update_user_payload, | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v4/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| user, err := usermanagement.UpdateUser( | |
| context.Background(), | |
| usermanagement.UpdateUserOpts{ | |
| User: "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| FirstName: "Marcelina", | |
| EmailVerified: true, | |
| ExternalID: "2fe01467-f7ea-4dd2-8b79-c2b4f56d0191", | |
| Metadata: map[string]string{ | |
| "timezone": "America/New_York", | |
| }, | |
| }, | |
| ) | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| $user = $userManagement->updateUser( | |
| "user_01EHQ7ZGZ2CZVQJGZ5ZJZ1ZJGZ", | |
| "Marcelina", | |
| "Davis" | |
| ); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.builders.UpdateUserOptionsBuilder; | |
| import com.workos.usermanagement.models.User; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| User user = | |
| workos.userManagement.updateUser(new UpdateUserOptionsBuilder("marcelina@example.com") | |
| .id("user_01E4ZCR3C56J083X43JQXF3JK5") | |
| .firstName("Marcelina") | |
| .lastName("Davis") | |
| .build()); |
| { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } |
PUT/user_management /users /:idParameters Returns Permanently deletes a user in the current environment. It cannot be undone.
curl --request DELETE \ --url https://api.workos.com/user_management/users/user_01F3GZ5ZGZBZVQGZVHJFVXZJGZ \ --header "Authorization: Bearer sk_example_123456789"
import { WorkOS } from '@workos-inc/node'; const workos = new WorkOS('sk_example_123456789'); await workos.userManagement.deleteUser('user_01F3GZ5ZGZBZVQGZVHJFVXZJGZ');
require "workos" WorkOS.configure do |config| config.key = "sk_example_123456789" end WorkOS::UserManagement.delete_user( id: "user_01E4ZCR3C56J083X43JQXF3JK5" )
from workos import WorkOSClient workos_client = WorkOSClient( api_key="sk_example_123456789", client_id="client_123456789" ) workos_client.user_management.delete_user(user_id="user_01E4ZCR3C56J083X43JQXF3JK5")
package main import ( "context" "github.com/workos/workos-go/v2/pkg/usermanagement" ) func main() { usermanagement.SetAPIKey( "sk_example_123456789", ) usermanagement.DeleteUser( context.Background(), usermanagement.DeleteUserOpts{ User: "user_01E4ZCR3C56J083X43JQXF3JK5", }, ) }
<?php WorkOS\WorkOS::setApiKey("sk_example_123456789"); $userManagement = new WorkOS\UserManagement(); $userManagement->deleteUser("user_01E4ZCR3C56J083X43JQXF3JK5");
import com.workos.WorkOS; WorkOS workos = new WorkOS("sk_example_123456789"); workos.userManagement.deleteUser("user_01E4ZCR3C56J083X43JQXF3JK5");
DELETE/user_management /users /:idParameters Verifies an email address using the one-time code received by the user.
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
{ "user": { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" } }
| 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 |
| { | |
| "user": { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } | |
| } |
POST/user_management /users /:id /email_verification /confirmParameters Returns Sends an email that contains a one-time code used to verify a user’s email address.
curl --request POST \ --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_verification/send" \ --header "Authorization: Bearer sk_example_123456789"
{ "user": { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" } }
| curl --request POST \ | |
| --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/email_verification/send" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| { | |
| "user": { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } | |
| } |
POST/user_management /users /:id /email_verification /sendParameters Returns Get a list of all Connect applications that the user has authorized.
curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications" \ --header "Authorization: Bearer sk_example_123456789"
{ "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" } }
| curl "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| { | |
| "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" | |
| } | |
| } |
GET/user_management /users /:user_id /authorized_applicationsParameters Returns objectDelete an existing Authorized Connect Application.
curl --request DELETE \ --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications/conn_app_01HXYZ123456789ABCDEFGHIJ" \ --header "Authorization: Bearer sk_example_123456789"
| curl --request DELETE \ | |
| --url "https://api.workos.com/user_management/users/user_01E4ZCR3C56J083X43JQXF3JK5/authorized_applications/conn_app_01HXYZ123456789ABCDEFGHIJ" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
DELETE/user_management /users /:user_id /authorized_applications /:application_idParameters Returns Confirms an email change using the one-time code received by the user.
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
{ "object": "email_change_confirmation", "user": { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" } }
| 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 |
| { | |
| "object": "email_change_confirmation", | |
| "user": { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } | |
| } |
POST/user_management /users /:id /email_change /confirmParameters Returns Sends an email that contains a one-time code used to change a user’s email address.
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
{ "object": "email_change", "user": { "object": "user", "id": "user_01E4ZCR3C56J083X43JQXF3JK5", "first_name": "Marcelina", "last_name": "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" }
| 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 |
| { | |
| "object": "email_change", | |
| "user": { | |
| "object": "user", | |
| "id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "first_name": "Marcelina", | |
| "last_name": "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" | |
| } |
POST/user_management /users /:id /email_change /sendParameters Returns