Skip to Content

InitiateEmailChange

PUT
/auth/v1/users/current/emails/change

Requests changing the email. The account keeps its address until the new one is verified with VerifyEmailChange.

Authorization

headerX-API-Key<token>

API key for protected endpoints, supplied in the X-API-Key header.

Request Body

required
application/json
{
  "$ref": "#/components/schemas/auth.v1.InitiateEmailChangeRequest",
  "$ref-value": {
    "type": "object",
    "properties": {
      "user_id": {
        "type": "string",
        "title": "user_id"
      },
      "new_email": {
        "type": "string",
        "title": "new_email"
      }
    },
    "title": "InitiateEmailChangeRequest",
    "additionalProperties": false
  }
}

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/auth.v1.VerificationSentResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "title": "message"
      },
      "code_sent": {
        "type": "boolean",
        "title": "code_sent"
      },
      "can_resend_at": {
        "type": "string",
        "title": "can_resend_at"
      },
      "verification_id": {
        "type": "string",
        "title": "verification_id"
      }
    },
    "title": "VerificationSentResponse",
    "additionalProperties": false
  }
}
default
curl -X PUT 'https://api.rixl.com/auth/v1/users/current/emails/change'

Success

application/json

{
  "$ref": "#/components/schemas/auth.v1.VerificationSentResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "message": {
        "type": "string",
        "title": "message"
      },
      "code_sent": {
        "type": "boolean",
        "title": "code_sent"
      },
      "can_resend_at": {
        "type": "string",
        "title": "can_resend_at"
      },
      "verification_id": {
        "type": "string",
        "title": "verification_id"
      }
    },
    "title": "VerificationSentResponse",
    "additionalProperties": false
  }
}