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

# Resend a code

> Resends the OTP for the verification identified by `session_id` over the specified channel. Previously sent codes are invalidated.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml post /v1/two-fa/verification/{session_id}
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/two-fa/verification/{session_id}:
    post:
      tags:
        - 2FA
      summary: Resend a code
      description: >-
        Resends the OTP for the verification identified by `session_id` over the
        specified channel. Previously sent codes are invalidated.
      operationId: two_fa_verification_resend
      parameters:
        - name: session_id
          in: path
          description: The unique ID of the 2FA verification session.
          required: true
          style: simple
          schema:
            type: string
            example: 2953d4308f2e11ecb75fcdafd6d2d687
      requestBody:
        description: Channel to resend the OTP over.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwoFactorVerificationResendRequest'
        required: true
      responses:
        '200':
          description: Returns the resend result, including the channel used.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/TwoFactorVerificationResendResponse'
                  - example:
                      success: true
                      channel: voice
                      destination: '447919433768'
                      created_at: '2022-02-16T13:41:38.000Z'
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    channel: voice
                    destination: '447919433768'
                    created_at: '2022-02-16T13:41:38.000Z'
        '400':
          description: >-
            Returns a validation error when a required field is missing or
            invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
              examples:
                default:
                  value:
                    success: false
                    message: 'Request validation errors: Field "channel" is required'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - two_fa:write
components:
  schemas:
    TwoFactorVerificationResendRequest:
      title: TwoFactorVerificationResendRequest
      required:
        - channel
      type: object
      additionalProperties: false
      properties:
        channel:
          type: string
          description: >-
            Channel used to resend the verification code. One of `sms` (sent as
            a text message) or `voice` (read aloud over a phone call).
          enum:
            - sms
            - voice
          example: voice
    TwoFactorVerificationResendResponse:
      title: TwoFactorVerificationResendResponse
      required:
        - success
        - channel
        - destination
        - created_at
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the verification code was successfully sent
          example: true
        channel:
          type: string
          description: Indicates whether the code was sent via an SMS or a voice call
          example: voice
        destination:
          type: string
          description: The destination phone number the code was sent to
          example: '447919433768'
        created_at:
          type: string
          description: Date and time the code was sent
          format: date-time
          example: '2022-02-16T13:41:38.000Z'
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: >-
            Human-readable description naming the missing or invalid request
            parameter.
          example: Missing or invalid parameter <param_name>
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
  responses:
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````