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

field

type

constraints

default

Req

W

U

newEmail

string

valid email address unique within marktplaats

yes

yes

no

newEmail

The new email address for the user

Reference

POST /v1/users/{userId}/change-email

Change a user’s email

Errors

http

error code

description

400

email-change-not-allowed

Email is not allowed to be changed for this account

400

validation-failure

Validation failed.
There should be more information in the field errors.

Field errors

field

error code

error value

description

newEmail

email-in-use

The specified email is already in use

newEmail

input-invalid

The email is in an invalid format

Examples

Changing the email of a user :

Request :

POST /v1/users/1/change-email HTTP/1.1
Host: api.marktplaats.nl
Content-Type: application/json

{
  "newEmail": "new-email@marktplaats.com"
}

Response :

HTTP/1.1 200 OK
Content-Type: application/json

{
  "_links":{
    "self":{
      "href":"/v1/users/1"
    }
  },
  "message": "A confirmation email has been sent to old-email@marktplaats.nl"
}