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

# Set Consumer SDK Configuration

> SetConsumerConfig updates the SDK configuration for a B2C project environment



## OpenAPI

````yaml PUT /pwa/v3/projects/:project_slug/environments/:environment_slug/sdk/consumer
openapi: 3.0.3
info:
  title: Stytch API
  description: The Stytch API provides endpoints for authentication and user management.
  version: 1.0.0
  contact:
    name: Stytch Support
    url: https://stytch.com/docs
    email: support@stytch.com
servers:
  - url: https://management.stytch.com
    description: Production server
security:
  - basicAuth: []
paths:
  /pwa/v3/projects/:project_slug/environments/:environment_slug/sdk/consumer:
    put:
      tags:
        - Sdk
      summary: Setconsumerconfig
      description: >-
        SetConsumerConfig updates the SDK configuration for a B2C project
        environment
      operationId: pwa_sdk_v3_SetConsumerConfig
      parameters:
        - name: project_slug
          in: path
          required: true
          schema:
            type: string
        - name: environment_slug
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pwa_sdk_v3_SetConsumerConfigRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pwa_sdk_v3_SetConsumerConfigResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                status_code: 401
                request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141
                error_type: unauthorized_credentials
                error_message: Unauthorized credentials.
                error_url: https://stytch.com/docs/api/errors/401
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                status_code: 429
                request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141
                error_type: too_many_requests
                error_message: Too many requests have been made.
                error_url: https://stytch.com/docs/api/errors/429
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                status_code: 500
                request_id: request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141
                error_type: internal_server_error
                error_message: >-
                  Oops, something seems to have gone wrong, please reach out to
                  support@stytch.com to let us know what went wrong.
                error_url: https://stytch.com/docs/api/errors/500
components:
  schemas:
    pwa_sdk_v3_SetConsumerConfigRequest:
      type: object
      properties:
        config:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerConfig'
      description: Request type
    pwa_sdk_v3_SetConsumerConfigResponse:
      type: object
      properties:
        request_id:
          type: string
        config:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerConfig'
        status_code:
          type: integer
          format: int32
      description: Response type
      required:
        - request_id
        - config
        - status_code
    pwa_sdk_v3_ConsumerConfig:
      type: object
      properties:
        basic:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerBasicConfig'
        sessions:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerSessionsConfig'
        magic_links:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerMagicLinksConfig'
        otps:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerOTPsConfig'
        oauth:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerOAuthConfig'
        totps:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerTOTPsConfig'
        webauthn:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerWebAuthnConfig'
        crypto_wallets:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerCryptoWalletsConfig'
        dfppa:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerDFPPAConfig'
        biometrics:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerBiometricsConfig'
        passwords:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerPasswordsConfig'
        cookies:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerCookiesConfig'
    pwa_sdk_v3_ConsumerBasicConfig:
      type: object
      properties:
        enabled:
          type: boolean
        domains:
          type: array
          items:
            type: string
        bundle_ids:
          type: array
          items:
            type: string
      required:
        - enabled
        - domains
        - bundle_ids
    pwa_sdk_v3_ConsumerSessionsConfig:
      type: object
      properties:
        max_session_duration_minutes:
          type: integer
          format: int32
      required:
        - max_session_duration_minutes
    pwa_sdk_v3_ConsumerMagicLinksConfig:
      type: object
      properties:
        login_or_create_enabled:
          type: boolean
        send_enabled:
          type: boolean
        pkce_required:
          type: boolean
      required:
        - login_or_create_enabled
        - send_enabled
        - pkce_required
    pwa_sdk_v3_ConsumerOTPsConfig:
      type: object
      properties:
        sms_login_or_create_enabled:
          type: boolean
        whatsapp_login_or_create_enabled:
          type: boolean
        email_login_or_create_enabled:
          type: boolean
        sms_send_enabled:
          type: boolean
        whatsapp_send_enabled:
          type: boolean
        email_send_enabled:
          type: boolean
        sms_autofill_metadata:
          type: array
          items:
            $ref: '#/components/schemas/pwa_sdk_v3_SMSAutofillMetadata'
      required:
        - sms_login_or_create_enabled
        - whatsapp_login_or_create_enabled
        - email_login_or_create_enabled
        - sms_send_enabled
        - whatsapp_send_enabled
        - email_send_enabled
        - sms_autofill_metadata
    pwa_sdk_v3_ConsumerOAuthConfig:
      type: object
      properties:
        enabled:
          type: boolean
        pkce_required:
          type: boolean
      required:
        - enabled
        - pkce_required
    pwa_sdk_v3_ConsumerTOTPsConfig:
      type: object
      properties:
        create_totps:
          type: boolean
        enabled:
          type: boolean
      required:
        - create_totps
        - enabled
    pwa_sdk_v3_ConsumerWebAuthnConfig:
      type: object
      properties:
        create_webauthns:
          type: boolean
        enabled:
          type: boolean
      required:
        - create_webauthns
        - enabled
    pwa_sdk_v3_ConsumerCryptoWalletsConfig:
      type: object
      properties:
        enabled:
          type: boolean
        siwe_required:
          type: boolean
      required:
        - enabled
        - siwe_required
    pwa_sdk_v3_ConsumerDFPPAConfig:
      type: object
      properties:
        enabled:
          $ref: '#/components/schemas/pwa_sdk_v3_DFPPASetting'
        on_challenge:
          $ref: '#/components/schemas/pwa_sdk_v3_DFPPAOnChallengeAction'
    pwa_sdk_v3_ConsumerBiometricsConfig:
      type: object
      properties:
        create_biometrics_enabled:
          type: boolean
        enabled:
          type: boolean
      required:
        - create_biometrics_enabled
        - enabled
    pwa_sdk_v3_ConsumerPasswordsConfig:
      type: object
      properties:
        enabled:
          type: boolean
        pkce_required_for_password_resets:
          type: boolean
      required:
        - enabled
        - pkce_required_for_password_resets
    pwa_sdk_v3_ConsumerCookiesConfig:
      type: object
      properties:
        http_only:
          $ref: '#/components/schemas/pwa_sdk_v3_ConsumerCookiesConfigHttpOnly'
      required:
        - http_only
    pwa_sdk_v3_SMSAutofillMetadata:
      type: object
      properties:
        metadata_type:
          $ref: '#/components/schemas/pwa_sdk_v3_SMSAutofillMetadataMetadataType'
        metadata_value:
          type: string
        bundle_id:
          type: string
      required:
        - metadata_type
        - metadata_value
        - bundle_id
    pwa_sdk_v3_DFPPASetting:
      type: string
      enum:
        - ENABLED
        - PASSIVE
        - DISABLED
    pwa_sdk_v3_DFPPAOnChallengeAction:
      type: string
      enum:
        - ALLOW
        - BLOCK
        - TRIGGER_CAPTCHA
    pwa_sdk_v3_ConsumerCookiesConfigHttpOnly:
      type: string
      enum:
        - DISABLED
        - ENABLED
        - ENFORCED
    pwa_sdk_v3_SMSAutofillMetadataMetadataType:
      type: string
      enum:
        - domain
        - hash
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````