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

# Verify Phone OTP and Connect

> Verifies the OTP code and connects the phone number to the user profile.



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/phone_verifications/connect
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/phone_verifications/connect:
    post:
      tags:
        - Identity
      summary: Verify Phone OTP and Connect
      description: Verifies the OTP code and connects the phone number to the user profile.
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                phoneNumber:
                  type: string
                  pattern: ^\+[1-9]\d{1,14}$
                  title: Phone Number
                  description: Phone number in E.164 format (e.g., +14155552671)
                  example: '+14155552671'
                code:
                  type: string
                  minLength: 4
                  maxLength: 10
                  title: Verification Code
                  description: The OTP code received via SMS
                  example: '123456'
                websiteId:
                  type: string
                  format: uuid
                  title: Website ID
                  description: The ID of the website
                  example: 123e4567-e89b-12d3-a456-426614174000
                userId:
                  type: string
                  format: uuid
                  title: User ID
                  description: The ID of the user
                  example: 123e4567-e89b-12d3-a456-426614174001
                walletAddress:
                  type: string
                  title: Wallet Address
                  description: The wallet address of the user
                  example: '0x1234567890abcdef1234567890abcdef12345678'
              required:
                - phoneNumber
                - code
              title: Phone Auth Connect Body
              description: Request body for verifying OTP and connecting phone number
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                        title: Success
                        description: Whether the phone number was verified successfully
                        example: true
                      message:
                        type: string
                        title: Message
                        description: Status message
                        example: Phone number verified.
                      error:
                        type: string
                        title: Error
                        description: Error code if verification failed
                        example: MAXIMUM_ACCOUNT_LINKED
                      accountLinkData:
                        type: string
                        title: Account Link Data
                        description: >-
                          JWT-encoded data for resolving account link conflicts
                          when the phone is already linked
                        example: jwt_verification_token
                    required:
                      - success
                    title: Phone Auth Connect Response Data
                    description: >-
                      Response payload after verifying the OTP code and
                      connecting the phone number
                required:
                  - data
                title: Phone Auth Connect Response
                description: >-
                  Standard response wrapper after verifying OTP and connecting
                  phone number
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Request body is invalid
                required:
                  - message
                title: Bad Request Response
                description: Schema for bad request response
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    title: Success
                    description: Indicates operation success
                    example: false
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Internal server error
                  debugInfo:
                    type: string
                    title: Debug Info
                    description: Optional debug information
                    example: Stack trace or additional error details
                required:
                  - success
                  - message
                title: Internal Server Error Response
                description: Schema for internal server error response
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````