Skip to content

register-with-password

Method: POST
Path: /auth/register/password

Tags: Auth

Summary

Register with password

Description

The User Registration with Password API facilitates user onboarding by allowing registration through a combination of phone number and email. API collects essential registration details, including phone number, email, password and the confirmation of the chosen password. The response will include a message indicating the success or failure of the registration process, as well as additional information such as the user's information, access token and refresh token.

TypeScript Definition

typescript
"register-with-password": {
        parameters: {
            query?: never;
            header?: never;
            path?: never;
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["RegisterWithEmailPassword"] | components["schemas"]["RegisterWithPhonePassword"];
            };
        };
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        /** @description A descriptive message confirming the success or failure of the Registration process. */
                        message: string;
                        /** @description Indicates whether the request was successful or failure (true for success, false for failure). */
                        success: boolean;
                        /** @description An object containing the response content. */
                        content: {
                            /** @description An object representing user details. */
                            user: components["schemas"]["User"];
                            /** @description It is a string-based token utilized for authentication and authorization. */
                            access_token: string;
                            /** @description It is a string-based token designed for refreshing the user's access token. */
                            refresh_token: string;
                        };
                    };
                };
            };
            400: components["responses"]["BadRequest"];
            401: components["responses"]["Unauthorized"];
        };
    };

Component References

ReferenceResolves To
components["schemas"]["RegisterWithEmailPassword"]RegisterWithEmailPassword
components["schemas"]["RegisterWithPhonePassword"]RegisterWithPhonePassword
components["schemas"]["User"]User
components["responses"]["BadRequest"]BadRequest
components["responses"]["Unauthorized"]Unauthorized

Request Body

Content Types: application/json

Responses

200

OK

400

Bad request

401

Not authorized for given operation on the Resource

OpenAPI Definition

json
{
  "tags": [
    "Auth"
  ],
  "operationId": "register-with-password",
  "summary": "Register with password",
  "description": "The User Registration with Password API facilitates user onboarding by allowing registration through a combination of phone number and email. API collects essential registration details, including phone number, email, password and the confirmation of the chosen password.\nThe response will include a message indicating the success or failure of the registration process, as well as additional information such as the user's information, access token and refresh token.",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/operations/register-with-password",
    "description": "API reference for the register-with-password operation"
  },
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/RegisterWithEmailPassword"
            },
            {
              "$ref": "#/components/schemas/RegisterWithPhonePassword"
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "message",
              "success",
              "content"
            ],
            "properties": {
              "message": {
                "description": "A descriptive message confirming the success or failure of the Registration process.",
                "type": "string"
              },
              "success": {
                "description": "Indicates whether the request was successful or failure (true for success, false for failure).",
                "type": "boolean"
              },
              "content": {
                "description": "An object containing the response content.",
                "properties": {
                  "user": {
                    "description": "An object representing user details.",
                    "$ref": "#/components/schemas/User"
                  },
                  "access_token": {
                    "description": "It is a string-based token utilized for authentication and authorization.",
                    "type": "string"
                  },
                  "refresh_token": {
                    "description": "It is a string-based token designed for refreshing the user's access token.",
                    "type": "string"
                  }
                },
                "required": [
                  "user",
                  "access_token",
                  "refresh_token"
                ],
                "type": "object"
              }
            }
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/Unauthorized"
    }
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "x-speakeasy-group": "auth",
  "x-speakeasy-ignore": true,
  "x-speakeasy-name-override": "registerWithPassword"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: