.. index:: Users .. _change_email: Change email ============ You can change the email address of a user by posting to the change-email endpoint. This will trigger an email being sent to the old email address. The user will have to click a link in this email to confirm the email change. Fields ------ .. apifields:: .. apifield:: :name: newEmail :type: string :constraints: valid email address unique within marktplaats :required: true :updateable: false :writable: true The new email address for the user Reference --------- .. endpoint:: POST /v1/users/{userId}/change-email Change a user's email Errors ------ .. errors:: .. error:: :http: 400 :code: validation-failure Validation failed. There should be more information in the field errors. .. error:: :http: 400 :code: email-change-not-allowed Email is not allowed to be changed for this account Field errors ------------ .. fielderrors:: .. error:: :field: newEmail :code: input-invalid :description: The email is in an invalid format .. error:: :field: newEmail :code: email-in-use :description: The specified email is already in use Examples -------- .. include:: examples/change-email-example.rst