Send OTP

This API is to send OTP to registered email address of the user for login


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/users
GRAPHQLstringMUTATION
content-typestringJSONapplication/json

Request

mutation {
  send_otp(email: "johndoe@gmail.com") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
emailstringregistered email of the user

Success

{
    "data": {
        "send_otp": {
            "message": "OTP sent successfully"
        }
    }
}

Error

{
    "errors": [
        {
            "message": "email not registered",
            "locations": [
                {
                    "line": 2,
                    "column": 3
                }
            ],
            "path": ["send_otp"]
        }
    ],
    "data": {
        "send_otp": null
    }
}