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

# Update OTP login config

> Update an OTP login configuration by its identifier.



## OpenAPI

````yaml put /v2/session/apps/{appID}/config/login/otp/{loginConfigID}
openapi: 3.1.1
info:
  title: Prelude Session Management API
  version: 0.0.1
  summary: The Prelude API for Session Management
  description: The Prelude API for Session Management.
  contact:
    email: support@prelude.so
    url: https://prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - Authorization: []
tags:
  - name: Mode
    description: Manage the mode (dev/prod) of your application.
  - name: Users
    description: Manage the users of your application.
  - name: Webhooks
    description: Manage the webhooks of your application.
  - name: Domains
    description: Manage the domains of your application.
  - name: Config - Scopes
    description: Manage the scope configuration of your application.
  - name: Config - Claims
    description: Manage the claims mapping configuration of your application.
  - name: Config - Step-up
    description: Manage the step-up authentication configuration of your application.
  - name: Config - Migration
    description: Manage the user migration configuration of your application.
  - name: Config - Login OTP
    description: Manage the OTP login configuration of your application.
  - name: Config - Login OAuth
    description: Manage the OAuth login configuration of your application.
  - name: Config - Login Password
    description: Manage the password login configuration of your application.
paths:
  /v2/session/apps/{appID}/config/login/otp/{loginConfigID}:
    parameters:
      - $ref: '#/components/parameters/appIDParam'
      - $ref: '#/components/parameters/loginConfigIDParam'
    put:
      tags:
        - Config - Login OTP
      summary: Update OTP login config
      description: Update an OTP login configuration by its identifier.
      operationId: updateLoginOtpConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutLoginOtpConfigRequest'
      responses:
        '200':
          description: OK
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/InvalidRequestError'
                  - $ref: '#/components/schemas/InvalidTemplateTypeError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/AppNotFoundError'
                  - $ref: '#/components/schemas/LoginConfigNotFoundError'
components:
  parameters:
    appIDParam:
      in: path
      name: appID
      required: true
      description: The id of the app the request refers to.
      schema:
        $ref: '#/components/schemas/AppID'
    loginConfigIDParam:
      in: path
      name: loginConfigID
      required: true
      description: The identifier of the login configuration.
      schema:
        $ref: '#/components/schemas/LoginConfigID'
  schemas:
    PutLoginOtpConfigRequest:
      type: object
      properties:
        config_type:
          type: string
          enum:
            - otp
          examples:
            - otp
        channel_type:
          type: string
          enum:
            - sms
            - email
          examples:
            - sms
        template_id:
          type: string
          examples:
            - tpl_01jqebhswje1ka1z7ahr9rfsgt
        sender_id:
          type: string
          examples:
            - Prelude
        is_default:
          type: boolean
          examples:
            - true
        grant_change_password:
          type: boolean
          description: >-
            Whether this OTP configuration can be used to grant a password
            change to the user.
          examples:
            - false
      required:
        - config_type
        - channel_type
    InvalidRequestError:
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid_request
          examples:
            - invalid_request
        status:
          type: string
          enum:
            - bad_request
          examples:
            - bad_request
        message:
          type: string
          examples:
            - The request body is invalid.
      required:
        - code
        - status
        - message
    InvalidTemplateTypeError:
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid_template_type
          examples:
            - invalid_template_type
        status:
          type: string
          enum:
            - bad_request
          examples:
            - bad_request
        message:
          type: string
          examples:
            - The template type is invalid for this configuration.
      required:
        - code
        - status
        - message
    AppNotFoundError:
      type: object
      properties:
        code:
          type: string
          enum:
            - app_not_found
          examples:
            - app_not_found
        status:
          type: string
          enum:
            - not_found
          examples:
            - not_found
        message:
          type: string
          examples:
            - The application was not found.
      required:
        - code
        - status
        - message
    LoginConfigNotFoundError:
      type: object
      properties:
        code:
          type: string
          enum:
            - login_config_not_found
          examples:
            - login_config_not_found
        status:
          type: string
          enum:
            - not_found
          examples:
            - not_found
        message:
          type: string
          examples:
            - The login configuration was not found.
      required:
        - code
        - status
        - message
    AppID:
      type: string
      description: An application's unique identifier.
      examples:
        - 54e9ujn
        - fvua38g
    LoginConfigID:
      type: string
      description: A login config unique identifier. It is prefixed with 'lcfg_'
      examples:
        - lcfg_01jqebhswje1ka1z7ahr9rfsgt
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````