v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14101465558.4 KB

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

This action might generate an SMS text message. Starting June 1, 2021, US telecom carriers require you to register an origination phone number before you can send SMS messages to US phone numbers. If you use SMS text messages in Amazon Cognito, you must register a phone number with Amazon Pinpoint. Amazon Cognito uses the registered number automatically. Otherwise, Amazon Cognito users who must receive SMS messages might not be able to sign up, activate their accounts, or sign in.

If you have never used SMS text messages with Amazon Cognito or any other Amazon Web Service, Amazon Simple Notification Service might place your account in the SMS sandbox. In sandbox mode , you can send messages only to verified phone numbers. After you test your app while in the sandbox environment, you can move out of the sandbox and into production. For more information, see SMS message settings for Amazon Cognito user pools in the Amazon Cognito Developer Guide.

post/#X-Amz-Target=AWSCognitoIdentityProviderService.CreateUserPool

Headers

X-Amz-Target'AWSCognitoIdentityProviderService.CreateUserPool' required

Request body

PoolNamestring required

A string used to name the user pool.

DeletionProtection'ACTIVE' | 'INACTIVE'
<p>When active, <code>DeletionProtection</code> prevents accidental deletion of your user pool. Before you can delete a user pool that you have protected against deletion, you must deactivate this feature.</p> <p>When you try to delete a protected user pool in a <code>DeleteUserPool</code> API request, Amazon Cognito returns an <code>InvalidParameterException</code> error. To delete a protected user pool, send a new <code>DeleteUserPool</code> request after you deactivate deletion protection in an <code>UpdateUserPool</code> API request.</p>
AutoVerifiedAttributesVerifiedAttributeType[]

The attributes to be auto-verified. Possible values: <b>email</b>, <b>phone_number</b>.

AliasAttributesAliasAttributeType[]

Attributes supported as an alias for this user pool. Possible values: <b>phone_number</b>, <b>email</b>, or <b>preferred_username</b>.

UsernameAttributesUsernameAttributeType[]

Specifies whether a user can use an email address or phone number as a username when they sign up.

SmsVerificationMessagestring

This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.

EmailVerificationMessagestring

This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.

EmailVerificationSubjectstring

This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.

SmsAuthenticationMessagestring

A string representing the SMS authentication message.

MfaConfiguration'OFF' | 'ON' | 'OPTIONAL'

Specifies MFA configuration details.

UserPoolTagsobject

The tag keys and values to assign to the user pool. A tag is a label that you can use to categorize and manage user pools in different ways, such as by purpose, owner, environment, or other criteria.

Response

Success