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

# Resend challenge

> Resend a challenge delivery (OTP code or magic link). This cancels the current challenge and creates a new one with a fresh code.

Only applicable to delivery-based methods: `email_otp`, `sms_otp`, `magic_link`




## OpenAPI

````yaml /swagger.json post /v1/auth/{app_id}/challenges/{token}/resend
openapi: 3.0.1
info:
  title: Scute API
  version: v1
  description: API for managing users in Scute applications
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.scute.io
  - url: http://localhost:3333
    description: Development server
security:
  - apiSecret: []
    userAccess: []
paths:
  /v1/auth/{app_id}/challenges/{token}/resend:
    parameters:
      - name: app_id
        in: path
        required: true
        description: App ID
        schema:
          type: string
      - name: token
        in: path
        description: Challenge token
        required: true
        schema:
          type: string
    post:
      tags:
        - Challenges
      summary: Resend challenge
      description: >
        Resend a challenge delivery (OTP code or magic link). This cancels the
        current challenge and creates a new one with a fresh code.


        Only applicable to delivery-based methods: `email_otp`, `sms_otp`,
        `magic_link`
      operationId: resendChallenge
      responses:
        '200':
          description: challenge resent
          content:
            application/json:
              schema:
                type: object
                properties:
                  challenge:
                    $ref: '#/components/schemas/Challenge'
                description: Returns the new challenge with updated token
        '422':
          description: cannot resend
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: This challenge type cannot be resent
                  error_code:
                    type: string
                    example: cannot_resend
      security: []
components:
  schemas:
    Challenge:
      type: object
      properties:
        token:
          type: string
          description: Unique challenge token
          example: ch_abc123xyz789
        status:
          type: string
          enum:
            - pending
            - completed
            - failed
            - expired
            - cancelled
            - denied
          description: Current challenge status
        purpose:
          type: string
          enum:
            - authenticate
            - mfa
            - step_up
            - verify_contact
            - verify_identity
            - custom
            - change_identifier
          description: Purpose of the challenge
        method:
          type: string
          enum:
            - email_otp
            - sms_otp
            - magic_link
            - totp
            - backup_code
            - webauthn
            - push
            - plaid_idv
          description: Verification method
        expires_at:
          type: string
          format: date-time
          description: When the challenge expires
        remaining_attempts:
          type: integer
          description: Number of verification attempts remaining
          example: 3
        time_remaining:
          type: integer
          description: Seconds until challenge expires
          example: 540
        intent:
          type: string
          nullable: true
          description: Custom intent name for custom challenges
        delivery_required:
          type: boolean
          description: Whether this challenge type requires delivery (OTP/magic link)
      required:
        - token
        - status
        - purpose
        - method
        - expires_at
  securitySchemes:
    apiSecret:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Secret token
    userAccess:
      type: apiKey
      name: X-Authorization
      in: header
      description: User Access token

````