> ## 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.

# Send OTP code

> Send a one-time passcode to the user's phone number via SMS or email. Creates a new user if the identifier doesn't exist.



## OpenAPI

````yaml /swagger.json post /v1/auth/{app_id}/otps/login
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}/otps/login:
    parameters:
      - name: app_id
        in: path
        required: true
        description: App ID
        schema:
          type: string
    post:
      tags:
        - OTP
      summary: Send OTP code
      description: >-
        Send a one-time passcode to the user's phone number via SMS or email.
        Creates a new user if the identifier doesn't exist.
      operationId: sendOtp
      parameters: []
      responses:
        '200':
          description: OTP sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  otp:
                    type: object
                    properties:
                      success:
                        type: boolean
                        example: true
                      sent_at:
                        type: string
                        format: date-time
                        description: When the OTP was sent
                      id:
                        type: string
                        description: Challenge token ID for verification
                  user_id:
                    type: string
                    description: >-
                      Challenge token (used as user_id for backwards
                      compatibility with SDK)
                  user_meta_errors:
                    type: object
                    nullable: true
                    description: Validation errors for user metadata if provided
        '400':
          description: invalid identifier
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Identifier invalid
                  error_code:
                    type: string
                    example: invalid_identifier
components:
  securitySchemes:
    apiSecret:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Secret token
    userAccess:
      type: apiKey
      name: X-Authorization
      in: header
      description: User Access token

````