> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/004_telephone_number/002__create_user_telephone_number_verification_code.md).

# Create User Telephone Number Verification Code

GraphQL endpoint: `/user`

Generates a verification code (OTP) for an unverified telephone number. The verification code will be sent via SMS to the telephone number and can be used to verify ownership.

## Query

```graphql
mutation (
  $telephoneNumberId: ID!
) {
  createUserTelephoneNumberVerificationCode (
    telephoneNumberId: $telephoneNumberId
  ) {
    expiresAt
    remainingOtpAttempts
    nextOtpAt
    otpStatus
  }
}

```

## Variables

```json
{
  "telephoneNumberId": "00000000-0000-4000-8000-000000000001"
}
```

## Response

```json
{
  "data": {
    "createUserTelephoneNumberVerificationCode": {
      "expiresAt": "2026-01-15T09:00:01.000000",
      "nextOtpAt": "2026-01-15T09:00:00",
      "otpStatus": "OTP sent",
      "remainingOtpAttempts": 5
    }
  }
}
```
