Stytch · Schema

api_otp_v1_otp_whatsapp_LoginOrCreateRequest

Request type

AuthenticationIdentityPasswordlessSecurityB2BConnected AppsMCPAI AgentsDeveloper Tools

Properties

Name Type Description
phone_number string The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/ho
expiration_minutes integer Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes.
attributes object Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application.
create_user_as_pending boolean Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false. If true, users will be saved with status pending in Stytch's backend until authenticated. If false, users will
locale object Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `"en"`. C
View JSON Schema on GitHub

JSON Schema

stytch-api-otp-v1-otp-whatsapp-loginorcreaterequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/api_otp_v1_otp_whatsapp_LoginOrCreateRequest",
  "title": "api_otp_v1_otp_whatsapp_LoginOrCreateRequest",
  "type": "object",
  "properties": {
    "phone_number": {
      "type": "string",
      "description": "The phone number to use for one-time passcodes. The phone number should be in E.164 format (i.e. +1XXXXXXXXXX). You may use +10000000000 to test this endpoint, see [Testing](https://stytch.com/docs/home#resources_testing) for more detail."
    },
    "expiration_minutes": {
      "type": "integer",
      "format": "int32",
      "description": "Set the expiration for the one-time passcode, in minutes. The minimum expiration is 1 minute and the maximum is 10 minutes. The default expiration is 2 minutes."
    },
    "attributes": {
      "$ref": "#/components/schemas/api_attribute_v1_Attributes",
      "description": "Provided attributes to help with fraud detection. These values are pulled and passed into Stytch endpoints by your application."
    },
    "create_user_as_pending": {
      "type": "boolean",
      "description": "Flag for whether or not to save a user as pending vs active in Stytch. Defaults to false.\n        If true, users will be saved with status pending in Stytch's backend until authenticated.\n        If false, users will be created as active. An example usage of\n        a true flag would be to require users to verify their phone by entering the OTP code before creating\n        an account for them."
    },
    "locale": {
      "$ref": "#/components/schemas/api_otp_v1_LoginOrCreateRequestLocale",
      "description": "Used to determine which language to use when sending the user this delivery method. Parameter is an [IETF BCP 47 language tag](https://www.w3.org/International/articles/language-tags/), e.g. `\"en\"`.\n\nCurrently supported languages are English (`\"en\"`), Spanish (`\"es\"`), French (`\"fr\"`) and Brazilian Portuguese (`\"pt-br\"`); if no value is provided, the copy defaults to English.\n\nRequest support for additional languages [here](https://docs.google.com/forms/d/e/1FAIpQLScZSpAu_m2AmLXRT3F3kap-s_mcV6UTBitYn6CdyWP0-o7YjQ/viewform?usp=sf_link\")!\n"
    }
  },
  "description": "Request type",
  "required": [
    "phone_number"
  ]
}