> 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/002_email/002__create_user_email_verification_code.md).

# Create User Email Verification Code

GraphQL endpoint: `/user`

Generates a verification code (OTP) for an unverified email address. The verification code will be sent to the email address and can be used to verify ownership.

## Query

```graphql
mutation (
  $emailId: ID!
) {
  createUserEmailVerificationCode (
    emailId: $emailId
  ) {
    expiresAt
    remainingOtpAttempts
    nextOtpAt
    otpStatus
  }
}

```

## Variables

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

## Response

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