> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Resend email verification code

> Resend email verificaion code.



## OpenAPI

````yaml /api-spec/ias-public-api.yaml post /users/email-verification-code
openapi: 3.0.3
info:
  title: IAM Service API
  description: APIs for IAM Service.
  version: 2.4.0
servers:
  - url: https://console.gmicloud.ai/api/v1
    description: IAM Service API
security: []
paths:
  /users/email-verification-code:
    post:
      tags:
        - users
      summary: Resend email verification code
      description: Resend email verificaion code.
      operationId: resendEmailCodeRequest
      responses:
        '201':
          description: Successfully resent email verfication code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resendEmailVerificationCodeResponse'
        '401':
          description: |
            - [group:**user**, code:**406**]: Invalid email verification token.
            - [group:**user**, code:**407**]: Expired email verification token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrStatusMsg'
              examples:
                Invalid email verification token:
                  summary: Invalid email verification token.
                  value:
                    group: user
                    code: 406
                    message: Invalid email verification token.
        '429':
          description: >
            - [group:**user**, code:**400**]: Too many email verification code
            resend requests.
          headers:
            Retry-After:
              description: The number of seconds the user should wait before retrying.
              schema:
                type: integer
                example: 300
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrStatusMsg'
              examples:
                Too many email verification code resend attempts:
                  summary: Too many email verification code resend attempts.
                  value:
                    group: user
                    code: 400
                    message: Too many email verification code resend attempts.
        '500':
          description: >
            - [group:**user**, code:**401**]: Get user email verification data
            encountered error.

            - [group:**user**, code:**402**]: Get user email verification data
            TTL encountered error.

            - [group:**user**, code:**403**]: Save user email verification data
            encountered error.

            - [group:**user**, code:**404**]: Create OTP code encountered error.

            - [group:**user**, code:**405**]: Create email verification token
            encountered error.

            - [group:**email**, code:**0**]: Failed to send email.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrStatusMsg'
              examples:
                Get user email verification data encountered error:
                  summary: Get user email verification data encountered error.
                  value:
                    group: user
                    code: 401
                    message: Get user email verification data encountered error.
                    traces:
                      - error occurred.
      security:
        - bearerEmailVerificationToken: []
components:
  schemas:
    resendEmailVerificationCodeResponse:
      type: object
      x-go-name: resendEmailVerificationCodeResponse
      properties:
        emailVerificationToken:
          type: string
          description: A token used to verify the validity of an email address.
          example: eyJhbGciOiJIUzI1NiIsInR...
      required:
        - emailVerificationToken
    ErrStatusMsg:
      type: object
      properties:
        group:
          type: string
          description: >-
            API function group\n -Will be "request" if there are invalid request
            parameters.
          x-oapi-codegen-extra-tags:
            binding: required
        code:
          type: integer
          description: The substatus error code for the API response.
          x-oapi-codegen-extra-tags:
            binding: required
        message:
          type: string
          description: The substatus error Message for API response.
          x-go-type-skip-optional-pointer: true
        traces:
          type: array
          items:
            type: string
          description: The original error messages.
          x-go-type-skip-optional-pointer: true
        validationDetail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationDetail'
          description: >-
            Returned when there are invalid request
            paremeters(group="request")\n List of invalid fields and the reason
            of error.
          x-go-type-skip-optional-pointer: true
      example:
        group: request
        code: 0
        validationDetail:
          - field: email
            expression: required
            originalValue: ''
            reason: This field is required.
      required:
        - group
        - code
    ValidationDetail:
      type: object
      properties:
        field:
          type: string
          description: The field of the request data.
          x-go-type-skip-optional-pointer: true
        expression:
          type: string
          description: The form of violation.
          x-go-type-skip-optional-pointer: true
        argument:
          type: string
          description: The number or data to support the expression.
          x-go-type-skip-optional-pointer: true
        originalValue:
          description: The original value from the request.
          x-go-type-skip-optional-pointer: true
        reason:
          type: string
          description: The reason for the validation error.
          x-go-type-skip-optional-pointer: true
      example:
        - field: fieldXXX
          expression: required
          originalValue: ''
          reason: This field is required.
  securitySchemes:
    bearerEmailVerificationToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A token used to verify the validity of an email address.

        It must be included in the Authorization header when verifying the email
        address.

````