openapi: 3.0.0
info:
title: Auth0 Authentication actions users API
description: Auth0 Authentication API. Endpoints for authentication and authorization using OpenID Connect, OAuth 2.0, SAML, WS-Federation, and Passwordless flows.
version: 1.0.0
servers:
- url: '{auth0_domain}'
description: The Authentication API is served over HTTPS.
variables:
auth0_domain:
description: Auth0 domain
default: https://demo.us.auth0.com
tags:
- name: users
paths:
/users:
get:
summary: List or Search Users
description: "Retrieve details of users. It is possible to:\n\n- Specify a search criteria for users\n- Sort the users to be returned\n- Select the fields to be returned\n- Specify the number of users to retrieve per page and the page index\n \nThe q query parameter can be used to get users that match the specified criteria using query string syntax.\n\nLearn more about searching for users.\n\nRead about best practices when working with the API endpoints for retrieving users.\n\nAuth0 limits the number of users you can return. If you exceed this threshold, please redefine your search, use the export job, or the User Import / Export extension.\n"
tags:
- users
parameters:
- name: page
in: query
description: Page index of the results to return. First page is 0.
schema:
type: integer
minimum: 0
- name: per_page
in: query
description: Number of results per page.
schema:
type: integer
minimum: 0
maximum: 100
- name: include_totals
in: query
description: Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
schema:
type: boolean
- name: sort
in: query
description: Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1
schema:
type: string
pattern: ^(([a-zA-Z0-9_\\.]+))\:(1|-1)$
- name: connection
in: query
description: Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name"
schema:
type: string
- name: fields
in: query
description: Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
schema:
type: string
- name: include_fields
in: query
description: Whether specified fields are to be included (true) or excluded (false).
schema:
type: boolean
- name: q
in: query
description: Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.
schema:
type: string
- name: search_engine
in: query
description: The version of the search engine
schema:
$ref: '#/components/schemas/SearchEngineVersionsEnum'
- name: primary_order
in: query
description: If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required.
schema:
type: boolean
responses:
'200':
description: Users successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/ListUsersResponseContent'
'400':
description: Invalid request query string. The message will vary depending on the cause.
x-description-1: The 'q' parameter is available only if you specify 'search_engine=v2|v3'.
x-description-2: You are not allowed to use search_engine=v1.
x-description-3: You are not allowed to use search_engine=v2. Use search_engine=v3 instead.
x-description-4: You are not allowed to use search_engine=v3.
x-description-5: You can only page through the first 1000 records. See https://auth0.com/docs/users/search/v3/view-search-results-by-page#limitation.
'401':
description: Client is not global.
x-description-1: Invalid signature received for JSON Web Token validation.
x-description-2: Invalid token.
'403':
description: 'Insufficient scope, expected any of: read:users.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
'503':
description: The query exceeded the timeout. Please try refining your search criteria. See https://auth0.com/docs/best-practices/search-best-practices.
operationId: get_users
x-release-lifecycle: GA
x-operation-name: list
x-operation-request-parameters-name: ListUsersRequestParameters
x-operation-group: users
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:users
- read:user_idp_tokens
post:
summary: Create a User
description: 'Create a new user for a given database or passwordless connection.
Note: connection is required but other parameters such as email and password are dependent upon the type of connection.'
tags:
- users
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserRequestContent'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateUserRequestContent'
responses:
'201':
description: User successfully created.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserResponseContent'
'400':
description: Invalid request body. The message will vary depending on the cause.
x-description-1: Connection does not support user creation through the API. It must either be a database or passwordless connection.
x-description-2: Cannot set username for connection without requires_username.
x-description-3: Connection does not exist.
x-description-4: Connection is disabled.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: 'Insufficient scope, expected any of: create:users.'
'409':
description: User already exists.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: post_users
x-release-lifecycle: GA
x-operation-name: create
x-operation-group: users
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- create:users
/users/{id}:
get:
summary: Get a User
description: 'Retrieve user details. A list of fields to include or exclude may also be specified. For more information, see Retrieve Users with the Get Users Endpoint.
'
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to retrieve.
required: true
schema:
type: string
- name: fields
in: query
description: Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
schema:
type: string
pattern: ^((phone_number)|(email)|(email_verified)|(picture)|(username)|(user_id)|(name)|(nickname)|(created_at)|(identities)|(app_metadata)|(user_metadata)|(last_ip)|(last_login)|(logins_count)|(updated_at)|(blocked)|(family_name)|(given_name))(,((phone_number)|(email)|(email_verified)|(picture)|(username)|(user_id)|(name)|(nickname)|(created_at)|(identities)|(app_metadata)|(user_metadata)|(last_ip)|(last_login)|(logins_count)|(updated_at)|(blocked)|(family_name)|(given_name)))*$
- name: include_fields
in: query
description: Whether specified fields are to be included (true) or excluded (false).
schema:
type: boolean
responses:
'200':
description: User successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: read:users, read:user_idp_tokens, read:current_user.'
'404':
description: User not found.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_users_by_id
x-release-lifecycle: GA
x-operation-name: get
x-operation-request-parameters-name: GetUserRequestParameters
x-operation-group: users
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:users
- read:current_user
- read:user_idp_tokens
delete:
summary: Delete a User
description: 'Delete a user by user ID. This action cannot be undone. For Auth0 Dashboard instructions, see Delete Users.
'
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to delete.
required: true
schema:
type: string
responses:
'204':
description: User successfully deleted.
'400':
description: Invalid request URI. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: delete:users,delete:current_user.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: delete_users_by_id
x-release-lifecycle: GA
x-operation-name: delete
x-operation-group: users
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- delete:users
- delete:current_user
patch:
summary: Update a User
description: "Update a user.\n\nThese are the attributes that can be updated at the root level:\n\n
user_metadata and app_metadata). These properties are merged instead of being replaced but be careful, the merge only occurs on the first level.email, email_verified, phone_number, phone_verified, username or password of a secondary identity, you need to specify the connection property too.email or phone_number you can specify, optionally, the client_id property.email_verified is not supported for enterprise and passwordless sms connections.blocked to false does not affect the user's blocked state from an excessive amount of incorrectly provided credentials. Use the \"Unblock a user\" endpoint from the \"User Blocks\" API to change the user's state.null as the value.{ \"email_verified\": true }\n\nuser_metadata:\n{ \"user_metadata\" : { \"profileCode\": 1479 } }\n\nTo add the field addresses the body to send should be:\n{ \"user_metadata\" : { \"addresses\": {\"work_address\": \"100 Industrial Way\"} }}\n\nThe modified object ends up with the following user_metadata property:{\n \"user_metadata\": {\n \"profileCode\": 1479,\n \"addresses\": { \"work_address\": \"100 Industrial Way\" }\n }\n}\n\n\"home_address\": \"742 Evergreen Terrace\" (using the addresses property) we should send the whole addresses object. Since this is a first-level object, the object will be merged in, but its own properties will not be. The body to send should be:\n{\n \"user_metadata\": {\n \"addresses\": {\n \"work_address\": \"100 Industrial Way\",\n \"home_address\": \"742 Evergreen Terrace\"\n }\n }\n}\n\nThe modified object ends up with the following user_metadata property:\n{\n \"user_metadata\": {\n \"profileCode\": 1479,\n \"addresses\": {\n \"work_address\": \"100 Industrial Way\",\n \"home_address\": \"742 Evergreen Terrace\"\n }\n }\n}\n"
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to update.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserRequestContent'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UpdateUserRequestContent'
responses:
'200':
description: User successfully updated.
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request body. The message will vary depending on the cause.
x-description-2: Connection does not exist.
x-description-3: Connection is not supported for this operation.
x-description-4: Cannot update password and email simultaneously.
x-description-5: Cannot update password and email_verified simultaneously.
x-description-6: Cannot update username and email simultaneously.
x-description-7: Cannot update username and email_verified simultaneously.
x-description-8: Cannot update username and password simultaneously.
x-description-9: Cannot update email for non-database user.
x-description-10: Cannot change email or password for users in a disabled connection.
x-description-11: Email verification is not supported for enterprise users.
x-description-12: 'Your account is not allowed to update the following user attributes: family_name, given_name, name, nickname, picture.'
x-description-13: 'The following user attributes cannot be updated: family_name, given_name, name, nickname, picture. The connection must either be a database connection (using the Auth0 store), a passwordless connection (email or sms) or has disabled ''Sync user profile attributes at each login''.'
x-description-14: 'The following user attributes cannot be updated: family_name, given_name, name, nickname, picture. The specified connection belongs to a secondary identity.'
x-description-15: 'The following user attributes cannot be removed: family_name, given_name, name, nickname, picture. The connection (non-federated-conn) must either be a custom database connection with import mode disabled, a social or enterprise connection.'
x-description-16: 'The following user attributes cannot be removed: foo, bar. The connection (some-connection) should have disabled ''Sync user profile attributes at each login'' (see Configuring Connection Sync with Auth0) or defined these attributes in ''options.non_persistent_attrs'' array (see Add User Attributes to DenyList).'
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: Some fields cannot be read with the permissions granted by the bearer token scopes. The message will vary depending on the fields and the scopes.
x-description-2: 'Insufficient scope; expected any of: update:users,update:users_app_metadata,update:current_user_metadata.'
'404':
description: User not found.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: patch_users_by_id
x-release-lifecycle: GA
x-operation-name: update
x-operation-group: users
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- update:users
- update:users_app_metadata
- update:current_user_metadata
/users/{id}/authentication-methods:
get:
summary: Get a List of Authentication Methods
description: Retrieve detailed list of authentication methods associated with a specified user.
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
- name: page
in: query
description: Page index of the results to return. First page is 0. Default is 0.
schema:
type: integer
minimum: 0
- name: per_page
in: query
description: Number of results per page. Default is 50.
schema:
type: integer
minimum: 0
maximum: 100
- name: include_totals
in: query
description: Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
schema:
type: boolean
responses:
'200':
description: The authentication methods for the user were retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/ListUserAuthenticationMethodsResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
x-description-2: The number of user identifiers associated with a user exceeds the maximum allowed.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope, expected any of: read:authentication_methods'
'404':
description: The user does not exist.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_authentication-methods
x-release-lifecycle: GA
x-operation-name: list
x-operation-request-parameters-name: ListUserAuthenticationMethodsRequestParameters
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:authentication_methods
delete:
summary: Delete All Authentication Methods for the Given User
description: 'Remove all authentication methods (i.e., enrolled MFA factors) from the specified user account. This action cannot be undone. '
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
responses:
'204':
description: Authentication methods successfully deleted.
'400':
description: Invalid request URI. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: delete:authentication_methods'
x-description-2: Operation not permitted when the user has registered at least 1 passkey
x-description-3: The number of user identifiers associated with a user exceeds the maximum allowed.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: delete_authentication-methods
x-release-lifecycle: GA
x-operation-name: deleteAll
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- delete:authentication_methods
post:
summary: Creates an Authentication Method for a Given User
description: Create an authentication method. Authentication methods created via this endpoint will be auto confirmed and should already have verification completed.
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user to whom the new authentication method will be assigned.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserAuthenticationMethodRequestContent'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateUserAuthenticationMethodRequestContent'
responses:
'201':
description: Authentication method created.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateUserAuthenticationMethodResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation
'403':
description: You reached the limit of entities of this type for this user.
x-description-1: User to be acted on does not match subject in bearer token.
x-description-2: 'Insufficient scope, expected: create:authentication_methods'
'404':
description: The user does not exist.
'409':
description: Authentication method already exists.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: post_authentication-methods
x-release-lifecycle: GA
x-operation-name: create
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- create:authentication_methods
put:
summary: Update All Authentication Methods by Replacing Them with the Given Ones
description: "Replace the specified user authentication methods with supplied values.\n\n Note: Authentication methods supplied through this action do not iterate on existing methods. Instead, any methods passed will overwrite the user’s existing settings."
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetUserAuthenticationMethodsRequestContent'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SetUserAuthenticationMethodsRequestContent'
responses:
'200':
description: All authentication methods successfully updated.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SetUserAuthenticationMethodResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected: update:authentication_methods'
x-description-2: Operation not permitted when the user has registered at least 1 passkey
x-description-3: The number of user identifiers associated with a user exceeds the maximum allowed.
'409':
description: Authentication method already exists.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: put_authentication-methods
x-release-lifecycle: GA
x-operation-name: set
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- update:authentication_methods
/users/{id}/authentication-methods/{authentication_method_id}:
get:
summary: Get an Authentication Method by ID
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
- name: authentication_method_id
in: path
description: The ID of the authentication methods in question.
required: true
schema:
type: string
responses:
'200':
description: Authentication method retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserAuthenticationMethodResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope, expected: read:authentication_methods.'
x-description-2: The number of user identifiers associated with a user exceeds the maximum allowed.
'404':
description: The user does not exist.
x-description-1: The authentication method could not be found.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_authentication-methods_by_authentication_method_id
x-release-lifecycle: GA
x-operation-name: get
x-operation-request-parameters-name: GetUserAuthenticationMethodRequestParameters
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:authentication_methods
delete:
summary: Delete an Authentication Method by ID
description: Remove the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API.
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
- name: authentication_method_id
in: path
description: The ID of the authentication method to delete.
required: true
schema:
type: string
responses:
'204':
description: Authentication method successfully deleted.
'400':
description: Invalid request URI. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: delete:authentication_methods'
x-description-2: The number of user identifiers associated with a user exceeds the maximum allowed.
'404':
description: The user does not exist.
x-description-1: The authentication method could not be found.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: delete_authentication-methods_by_authentication_method_id
x-release-lifecycle: GA
x-operation-name: delete
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- delete:authentication_methods
patch:
summary: Update an Authentication Method
description: Modify the authentication method with the given ID from the specified user. For more information, review Manage Authentication Methods with Management API.
tags:
- users
parameters:
- name: id
in: path
description: The ID of the user in question.
required: true
schema:
type: string
- name: authentication_method_id
in: path
description: The ID of the authentication method to update.
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserAuthenticationMethodRequestContent'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UpdateUserAuthenticationMethodRequestContent'
responses:
'200':
description: Authentication method updated.
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateUserAuthenticationMethodResponseContent'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope, expected: update:authentication_methods.'
'404':
description: The user does not exist.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: patch_authentication-methods_by_authentication_method_id
x-release-lifecycle: GA
x-operation-name: update
x-operation-group:
- users
- authenticationMethods
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- update:authentication_methods
/users/{id}/authenticators:
delete:
summary: Delete All Authenticators
description: Remove all authenticators registered to a given user ID, such as OTP, email, phone, and push-notification. This action cannot be undone. For more information, review Manage Authentication Methods with Management API.
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to delete.
required: true
schema:
type: string
responses:
'204':
description: All authenticators successfully deleted.
'400':
description: Invalid request URI. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: remove:authenticators'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: delete_authenticators
x-release-lifecycle: GA
x-operation-name: deleteAll
x-operation-group:
- users
- authenticators
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- delete:guardian_enrollments
/users/{id}/connected-accounts:
get:
summary: Get a User's Connected Accounts
description: Retrieve all connected accounts associated with the user.
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to list connected accounts for.
required: true
schema:
type: string
- name: from
in: query
description: Optional Id from which to start selection.
schema:
type: string
- name: take
in: query
description: Number of results to return. Defaults to 10 with a maximum of 20
schema:
type: integer
minimum: 1
maximum: 100
responses:
'200':
description: Connected accounts successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/ListUserConnectedAccountsResponseContent'
'400':
description: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Invalid signature received for JSON Web Token validation.
x-description-2: Client is not global.
'403':
description: 'Insufficient scope; expected any of: read:users.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_connected-accounts
x-release-lifecycle: GA
x-operation-name: list
x-operation-request-parameters-name: GetUserConnectedAccountsRequestParameters
x-operation-group:
- users
- connectedAccounts
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:users
/users/{id}/enrollments:
get:
summary: Get the First Confirmed Multi-factor Authentication (MFA) Enrollment
description: Retrieve the first multi-factor authentication enrollment that a specific user has confirmed.
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to list enrollments for.
required: true
schema:
type: string
responses:
'200':
description: Enrollments successfully retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UsersEnrollment'
'400':
description: Invalid request URI. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Client is not global.
x-description-2: Invalid signature received for JSON Web Token validation.
'403':
description: User to be acted on does not match subject in bearer token.
x-description-1: 'Insufficient scope; expected any of: read:users,read:current_user.'
'404':
description: User not found.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_enrollments
x-release-lifecycle: GA
x-operation-name: get
x-operation-request-parameters-name: GetUserEnrollmentsRequestParameters
x-operation-group:
- users
- enrollments
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:users
- read:current_user
/users/{id}/federated-connections-tokensets:
get:
summary: Get Tokensets for a User
description: List active federated connections tokensets for a provided user
tags:
- users
parameters:
- name: id
in: path
description: User identifier
required: true
schema:
type: string
maxLength: 300
responses:
'200':
description: Flows successfully retrieved.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/FederatedConnectionTokenSet'
'401':
description: Invalid token.
x-description-1: Invalid signature received for JSON Web Token validation.
x-description-2: Client is not global.
'403':
description: 'Insufficient scope; expected any of: read:federated_connections_tokens.'
'404':
description: The user does not exist.
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_federated-connections-tokensets
x-release-lifecycle: GA
x-operation-name: list
x-operation-group:
- users
- federatedConnectionsTokensets
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:federated_connections_tokens
/users/{id}/federated-connections-tokensets/{tokenset_id}:
delete:
summary: Deletes a Tokenset for Federated Connections by Id.
tags:
- users
parameters:
- name: id
in: path
description: Id of the user that owns the tokenset
required: true
schema:
type: string
maxLength: 300
- name: tokenset_id
in: path
description: The tokenset id
required: true
schema:
type: string
maxLength: 36
responses:
'204':
description: Tokenset successfully deleted.
'400':
description: Invalid request body. The message will vary depending on the cause.
x-description-1: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Invalid signature received for JSON Web Token validation.
x-description-2: Client is not global.
'403':
description: 'Insufficient scope; expected any of: delete:federated_connections_tokens.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: delete_federated-connections-tokensets_by_tokenset_id
x-release-lifecycle: GA
x-operation-name: delete
x-operation-group:
- users
- federatedConnectionsTokensets
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- delete:federated_connections_tokens
/users/{id}/groups:
get:
summary: Get User's Groups
description: 'List all groups to which this user belongs.
'
tags:
- users
parameters:
- name: id
in: path
description: ID of the user to list groups for.
required: true
schema:
type: string
- name: fields
in: query
description: A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields
schema:
type: string
maxLength: 256
pattern: ^((id)|(name)|(external_id)|(organization_id)|(connection_id)|(tenant_name)|(description)|(created_at)|(updated_at)|(membership_created_at))(,((id)|(name)|(external_id)|(organization_id)|(connection_id)|(tenant_name)|(description)|(created_at)|(updated_at)|(membership_created_at)))*$
- name: include_fields
in: query
description: Whether specified fields are to be included (true) or excluded (false).
schema:
type: boolean
- name: page
in: query
description: Page index of the results to return. First page is 0.
schema:
type: integer
minimum: 0
- name: per_page
in: query
description: Number of results per page. Defaults to 50.
schema:
type: integer
minimum: 1
maximum: 100
- name: include_totals
in: query
description: Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
schema:
type: boolean
- name: from
in: query
description: Optional Id from which to start selection.
schema:
type: string
- name: take
in: query
description: Number of results per page. Defaults to 50.
schema:
type: integer
minimum: 1
maximum: 100
responses:
'200':
description: Groups successfully retrieved.
content:
application/json:
schema:
$ref: '#/components/schemas/GetUserGroupsResponseContent'
'400':
description: Invalid request query string. The message will vary depending on the cause.
'401':
description: Invalid token.
x-description-1: Invalid signature received for JSON Web Token validation.
x-description-2: Client is not global.
'403':
description: 'Insufficient scope; expected any of: read:groups.'
'429':
description: Too many requests. Check the X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
operationId: get_user_groups
x-release-lifecycle: EA
x-operation-name: get
x-operation-request-parameters-name: GetUserGroupsRequestParameters
x-operation-group:
- users
- groups
security:
- bearerAuth: []
- oAuth2ClientCredentials:
- read:groups
/users/{id}/identities:
post:
summary: Link a User Account
description: "Link two user accounts together forming a primary and secondary relationship. On successful linking, the endpoint returns the new array of the primary account identities.\n\nNote: There are two ways of invoking the endpoint:\n\nupdate:current_user_identities scope:\n \n POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities\n Authorization: \"Bearer PRIMARY_ACCOUNT_JWT\"\n {\n \"link_with\": \"SECONDARY_ACCOUNT_JWT\"\n }\n \n In this case, only the link_with param is required in the body, which also contains the JWT obtained upon the secondary account's authentication.\n update:users scope:\n \n POST /api/v2/users/PRIMARY_ACCOUNT_USER_ID/identities\n Authorization: \"Bearer YOUR_API_V2_TOKEN\"\n {\n \"provider\": \"SECONDARY_ACCOUNT_PROVIDER\",\n \"connection_id\": \"SECONDARY_ACCOUNT_CONNECTION_ID(OPTIONAL)\",\n \"user_id\": \"SECONDARY_ACCOUNT_USER_ID\"\n }\n \n In this case you need to send provider and user_id in the body. Optionally you can also send the connection_id param which is suitable for identifying a particular database connection for the 'auth0' provider.\n true if the identity provider is a social provider, falses otherwise
access_token:
type: string
description: IDP access token returned only if scope read:user_idp_tokens is defined
access_token_secret:
type: string
description: IDP access token secret returned only if scope read:user_idp_tokens is defined.
refresh_token:
type: string
description: IDP refresh token returned only if scope read:user_idp_tokens is defined.
profileData:
$ref: '#/components/schemas/UserProfileData'
SessionIp:
type:
- string
- 'null'
description: First IP address associated with this session
OrganizationBranding:
type: object
description: Theme defines how to style the login pages.
additionalProperties: false
properties:
logo_url:
type: string
description: URL of logo to display on login page.
format: strict-https-uri-or-null
colors:
$ref: '#/components/schemas/OrganizationBrandingColors'
RefreshTokenDateObject:
type: object
description: The date and time when the refresh token was created
additionalProperties: true
PreferredAuthenticationMethodEnum:
type: string
description: Applies to phone authentication methods only. The preferred communication method.
enum:
- voice
- sms
UserDateSchema:
oneOf:
- type: string
description: Date and time when this user was created (ISO_8601 format).
- type: object
description: Date and time when this user was created (ISO_8601 format).
additionalProperties: true
ListUsersResponseContent:
oneOf:
- type: array
items:
$ref: '#/components/schemas/UserResponseSchema'
- $ref: '#/components/schemas/ListUsersOffsetPaginatedResponseContent'
GetUserGroupsPaginatedResponseContent:
type: object
additionalProperties: false
required:
- groups
properties:
groups:
type: array
items:
$ref: '#/components/schemas/UserGroupsResponseSchema'
next:
type: string
description: A cursor to be used as the "from" query parameter for the next page of results.
start:
type: number
limit:
type: number
total:
type: number
UpdateUserAuthenticationMethodResponseContent:
type: object
description: The successfully created authentication method.
additionalProperties: false
required:
- type
properties:
id:
type: string
description: The ID of the newly created authentication method (automatically generated by the application)
format: authenticator-id
type:
$ref: '#/components/schemas/CreatedAuthenticationMethodTypeEnum'
name:
type: string
description: A human-readable label to identify the authentication method.
totp_secret:
type: string
description: Base32 encoded secret for TOTP generation
phone_number:
type: string
description: Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.
minLength: 2
maxLength: 30
email:
type: string
description: Applies to email authentication methods only. The email address used to send verification messages.
authentication_methods:
type: array
items:
$ref: '#/components/schemas/UserAuthenticationMethodProperties'
preferred_authentication_method:
$ref: '#/components/schemas/PreferredAuthenticationMethodEnum'
key_id:
type: string
description: Applies to webauthn authentication methods only. The id of the credential.
public_key:
type: string
description: Applies to webauthn authentication methods only. The public key.
aaguid:
type: string
description: Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.
relying_party_identifier:
type: string
description: Applies to webauthn authentication methods only. The relying party identifier.
confirmed:
type: boolean
description: Whether the authentication method has been confirmed.
created_at:
type: string
description: Authentication method creation date
format: date-time
LinkUserIdentityRequestContent:
type: object
additionalProperties: false
minProperties: 1
properties:
provider:
$ref: '#/components/schemas/UserIdentityProviderEnum'
description: Identity provider of the secondary user account being linked.
connection_id:
type: string
description: connection_id of the secondary user account being linked when more than one `auth0` database provider exists.
pattern: ^con_[A-Za-z0-9]{16}$
user_id:
$ref: '#/components/schemas/UserId'
link_with:
type: string
description: JWT for the secondary account being linked. If sending this parameter, `provider`, `user_id`, and `connection_id` must not be sent.
default: '{SECONDARY_ACCOUNT_JWT}'
UserAuthenticationMethod:
type: object
additionalProperties: false
required:
- id
- type
- created_at
properties:
id:
type: string
description: The ID of the authentication method (auto generated)
type:
$ref: '#/components/schemas/AuthenticationMethodTypeEnum'
confirmed:
type: boolean
description: The authentication method status
name:
type: string
description: A human-readable label to identify the authentication method
maxLength: 20
authentication_methods:
type: array
items:
$ref: '#/components/schemas/UserAuthenticationMethodProperties'
preferred_authentication_method:
$ref: '#/components/schemas/PreferredAuthenticationMethodEnum'
link_id:
type: string
description: The ID of a linked authentication method. Linked authentication methods will be deleted together.
phone_number:
type: string
description: Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.
email:
type: string
description: Applies to email and email-verification authentication methods only. The email address used to send verification messages.
key_id:
type: string
description: Applies to webauthn authentication methods only. The ID of the generated credential.
public_key:
type: string
description: Applies to webauthn authentication methods only. The public key.
created_at:
type: string
description: Authenticator creation date
format: date-time
enrolled_at:
type: string
description: Enrollment date
format: date-time
last_auth_at:
type: string
description: Last authentication
format: date-time
credential_device_type:
type: string
description: Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.
credential_backed_up:
type: boolean
description: Applies to passkeys only. Whether the credential was backed up.
identity_user_id:
type: string
description: Applies to passkeys only. The ID of the user identity linked with the authentication method.
user_agent:
type: string
description: Applies to passkeys only. The user-agent of the browser used to create the passkey.
aaguid:
type: string
description: Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.
relying_party_identifier:
type: string
description: Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.
SessionResponseContent:
type: object
additionalProperties: true
properties:
id:
type: string
description: The ID of the session
user_id:
type: string
description: ID of the user which can be used when interacting with other APIs.
created_at:
$ref: '#/components/schemas/SessionDate'
updated_at:
$ref: '#/components/schemas/SessionDate'
authenticated_at:
$ref: '#/components/schemas/SessionDate'
idle_expires_at:
$ref: '#/components/schemas/SessionDate'
expires_at:
$ref: '#/components/schemas/SessionDate'
last_interacted_at:
$ref: '#/components/schemas/SessionDate'
device:
$ref: '#/components/schemas/SessionDeviceMetadata'
clients:
type: array
description: List of client details for the session
items:
$ref: '#/components/schemas/SessionClientMetadata'
authentication:
$ref: '#/components/schemas/SessionAuthenticationSignals'
cookie:
$ref: '#/components/schemas/SessionCookieMetadata'
session_metadata:
$ref: '#/components/schemas/SessionMetadata'
SessionCookieMetadataModeEnum:
type: string
description: '[Private Early Access] The persistence mode of the session cookie. When set to "non-persistent" (ephemeral), the cookie will be deleted when the browser is closed. When set to "persistent", the cookie will be stored until it expires or is deleted by the user.'
enum:
- non-persistent
- persistent
OrganizationBrandingColors:
type: object
description: Color scheme used to customize the login pages.
additionalProperties: false
required:
- primary
- page_background
properties:
primary:
type: string
description: HEX Color for primary elements.
format: html-color
page_background:
type: string
description: HEX Color for background.
format: html-color
GetUserAuthenticationMethodResponseContent:
type: object
additionalProperties: false
required:
- id
- type
- created_at
properties:
id:
type: string
description: The ID of the authentication method (auto generated)
type:
$ref: '#/components/schemas/AuthenticationMethodTypeEnum'
confirmed:
type: boolean
description: The authentication method status
name:
type: string
description: A human-readable label to identify the authentication method
maxLength: 20
authentication_methods:
type: array
items:
$ref: '#/components/schemas/UserAuthenticationMethodProperties'
preferred_authentication_method:
$ref: '#/components/schemas/PreferredAuthenticationMethodEnum'
link_id:
type: string
description: The ID of a linked authentication method. Linked authentication methods will be deleted together.
phone_number:
type: string
description: Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice.
email:
type: string
description: Applies to email and email-verification authentication methods only. The email address used to send verification messages.
key_id:
type: string
description: Applies to webauthn authentication methods only. The ID of the generated credential.
public_key:
type: string
description: Applies to webauthn authentication methods only. The public key.
created_at:
type: string
description: Authenticator creation date
format: date-time
enrolled_at:
type: string
description: Enrollment date
format: date-time
last_auth_at:
type: string
description: Last authentication
format: date-time
credential_device_type:
type: string
description: Applies to passkeys only. The kind of device the credential is stored on as defined by backup eligibility. "single_device" credentials cannot be backed up and synced to another device, "multi_device" credentials can be backed up if enabled by the end-user.
credential_backed_up:
type: boolean
description: Applies to passkeys only. Whether the credential was backed up.
identity_user_id:
type: string
description: Applies to passkeys only. The ID of the user identity linked with the authentication method.
user_agent:
type: string
description: Applies to passkeys only. The user-agent of the browser used to create the passkey.
aaguid:
type: string
description: Applies to passkey authentication methods only. Authenticator Attestation Globally Unique Identifier.
relying_party_identifier:
type: string
description: Applies to webauthn/passkey authentication methods only. The credential's relying party identifier.
TokenQuotaClientCredentials:
type: object
description: The token quota configuration
additionalProperties: false
minProperties: 1
properties:
enforce:
type: boolean
description: If enabled, the quota will be enforced and requests in excess of the quota will fail. If disabled, the quota will not be enforced, but notifications for requests exceeding the quota will be available in logs.
per_day:
type: integer
description: Maximum number of issued tokens per day
minimum: 1
maximum: 2147483647
per_hour:
type: integer
description: Maximum number of issued tokens per hour
minimum: 1
maximum: 2147483647
AssignUserRolesRequestContent:
type: object
additionalProperties: false
required:
- roles
properties:
roles:
type: array
description: List of roles IDs to associated with the user.
minItems: 1
items:
type: string
minLength: 1
RefreshTokenDate:
oneOf:
- type: string
description: The date and time when the refresh token was created
format: date-time
- $ref: '#/components/schemas/RefreshTokenDateObject'
- type: 'null'
RefreshTokenDevice:
type: object
description: Device used while issuing/exchanging the refresh token
additionalProperties: true
properties:
initial_ip:
type: string
description: First IP address associated with the refresh token
initial_asn:
type: string
description: First autonomous system number associated with the refresh token
initial_user_agent:
type: string
description: First user agent associated with the refresh token
last_ip:
type: string
description: Last IP address associated with the refresh token
last_asn:
type: string
description: Last autonomous system number associated with the refresh token
last_user_agent:
type: string
description: Last user agent associated with the refresh token
PermissionRequestPayload:
type: object
additionalProperties: false
required:
- resource_server_identifier
- permission_name
properties:
resource_server_identifier:
type: string
description: Resource server (API) identifier that this permission is for.
permission_name:
type: string
description: Name of this permission.
UserMultifactorProviderEnum:
type: string
enum:
- duo
- google-authenticator
description: The multi-factor provider. Supported values 'duo' or 'google-authenticator'
ListUserAuthenticationMethodsOffsetPaginatedResponseContent:
type: object
additionalProperties: false
properties:
start:
type: number
description: Index of the starting record. Derived from the page and per_page parameters.
limit:
type: number
description: Maximum amount of records to return.
total:
type: number
description: Total number of pageable records.
authenticators:
type: array
description: The paginated authentication methods. Returned in this structure when include_totals is true.
items:
$ref: '#/components/schemas/UserAuthenticationMethod'
ListUserPermissionsResponseContent:
oneOf:
- type: array
items:
$ref: '#/components/schemas/UserPermissionSchema'
- $ref: '#/components/schemas/ListUserPermissionsOffsetPaginatedResponseContent'
ClearAssessorsRequestContent:
type: object
additionalProperties: false
required:
- connection
- assessors
properties:
connection:
type: string
description: The name of the connection containing the user whose assessors should be cleared.
minLength: 1
maxLength: 128
pattern: ^[a-zA-Z0-9](-[a-zA-Z0-9]|[a-zA-Z0-9])*$
assessors:
type: array
description: List of assessors to clear.
minItems: 1
items:
$ref: '#/components/schemas/AssessorsTypeEnum'